if ([w:LS1000]==[w:LS0030]) //如果密码等于一级密码设定
{[w:LS0008]=3 //进入页面三
clear([b:LS020100]) //清报警触发
[w:LS0200]=0 //清密码输入“***”
[b:LS020100]=0 //清报警触发
}
endif
if ([w:LS1000]==[w:LS0032]) //如果密码等于二级密码设定
{[w:LS0008]=4 //进入页面四
clear([b:LS020100]) //清报警触发
[w:LS0200]=0 //清密码输入“***”
[b:LS020100]=0 //清报警触发
}
endif
if ([w:LS1000]==[w:LS0034]) //如果密码等于三级密码设定
{[w:LS0008]=5 //进入页面五
clear([b:LS020100]) //清报警触发
[w:LS0200]=0 //清密码输入“***”
[b:LS020100]=0 //清报警触发
}
endif
if ([w:LS1000]<>[w:LS0030]and[w:LS1000]<>[w:LS0032]and[w:LS1000]<>[w:LS0034])
{set([b:LS020100]) //如果三级密码都不正确,报警触发
[w:LS1000]=0
}
endif
//这是以前做的样例,3级密码分别储存在[w:LS0030],[w:LS0032],[w:LS0034];修改对应的寄存器的值即可修改密码。这是用的触摸屏内部地址,你也可以用PLC地址。
Nothing is difficult in the world if you dare to climb.
Come on .Just work hard and enjoy yourself!