你的位置: 首页> 电力配电> 人机界面

施耐德XBTG系列人机登录密码制作

2016-10-26 12:09:48 |人围观 | 评论:

1、在Popup windows/action confirmation/下创建1001和1002两个窗口如图1、2所示,其中密码输入框由蓝色矩形框和密码显示功能块组成,密码显示功能块位于Toochest/Miscellaneous/PassDisp-0001-01,属性设置中Variable为String01,Status为String02。
图11001Popup窗口画面
图21002Popup窗口画面
2、在系统登录画面主窗口上设置登陆按钮,配置如图3所示。
3、定义以下四个内部变量:“PasswordString”属性设为String/Internal/Initial“ 210” 值设定密码;“String 01” 属性设为String/Internal;“String 02” 属性设为String/Internal;“Protected Variable”属性设为Discrete/Internal/Initial“off”。
4、在1001窗口下创建如下脚本
String Original, Edited;
boolean IsValidPassword= false;
Original = PasswordString.getStringValue();
Edited = String01.getStringValue();
if (Edited.compareTo(Original)==0)
{

if (ProtectedVariable.getIntValue()==1)
ProtectedVariable.write(0);
else
ProtectedVariable.write(1);
actionconfirmation.move(0, 0, 640, 480);
actionconfirmation.changePanel(41);
}
else
{
actionconfirmation.changePanel(10002);
}




标签:

相关内容推荐: