阀门的报警(开与关)故障报警求救这样在报警记录组太.
注释:阀门没开位与阀门没关到位报警
如有这方面的例题能发给本人更好
本人万分感谢!!!!
油箱:tankzl@163.com
最佳答案
network 1
O #INTERLOCK_OFF
O #INTERLOCK_ON
JC LOCK
A #MANUAL //手动
JCN AUTO
A #SWITCH
S #VALVE
AN #SWITCH
R #VALVE
JU END
LOCK: A #INTERLOCK_ON //联锁
S #AUTO_VALVE
A #INTERLOCK_OFF
R #AUTO_VALVE
AUTO: A #AUTO_VALVE //自动开
= #VALVE
= #SWITCH
END: CLR
network 2
X #VALVE
X #PRE_VALVE
JCN SEG3
CALL "TIME_TCK"
RET_VAL:=#ACTION_STARTTIME
SET
= #ACTION_MONIT //在循环时间监视
SEG3: A #ENRESPONSE
JC SEG5
A #ACTION_MONIT
JCN SEG4
CALL "TIME_TCK"
RET_VAL:=LD20
L LD 20
L #ACTION_STARTTIME
-D
L #MONITORING
>=D
JCN SEG4
CLR
= #ACTION_MONIT
SEG4: AN #ACTION_MONIT //不在监视状态
A #VALVE //输出开
AN #RESPONSE //反馈不开
S #FAULT //则错误
AN #ACTION_MONIT //不在监视状态
AN #VALVE //输出关
A #RESPONSE //当反馈不关
S #FAULT //则错误
SEG5: A #VALVE
= #PRE_VALVE
network 3
A #ENRESPONSE
JC _001
A #VALVE
A #RESPONSE
JC _001
AN #VALVE
AN #RESPONSE
R #ACTION_MONIT
_001: R #FAULT
上位机取db块的fault位
提问者对于答案的评价:
很好
原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc275224.html