程序
//点动陈序 IF “点动启动” = 1 THEN “KM1点动” := 1; ELSE “KM1点动” := 0; END_IF;
// 起保停电路 IF “自锁启动” = 1 THEN “kM2输出” := 1; END_IF; IF “自锁停止” = 1 THEN “kM2输出” := 0; END_IF;
//双重连锁正反转 IF “正转启动” = 1 AND “反转启动” = 0 THEN “km3反转” := 0; “KM3正转” := 1; END_IF; IF “反转启动” = 1 AND “正转启动” = 0 THEN “KM3正转” := 0; “km3反转” := 1; END_IF; IF “停止正反转” = 1 THEN “km3反转” := 0; “KM3正转” := 0; END_IF;
//星角降压启动 IF “星角启动”=1 AND “星角停止”=0 THEN “KM1” := 1; “KM2(星)”:=1 ; END_IF; “T1”.TON(IN:=”KM1″,//延时接通 T1,KM1得电是T1开始计时 ,5秒 PT:=t#5S); IF “T1”.Q = 1 AND “星角停止”=0 THEN “KM2(星)” := 0; “KM3(角)”:=1; END_IF; IF “星角停止” = 1 THEN//停止 “KM1” := 0; “KM2(星)” := 0; “KM3(角)” := 0; END_IF;
//双速电机低速启动5秒后高速运行 IF “双速启” = 1 THEN //低速运行 “双速km1” := 1; END_IF; “T2”.TON(IN:=”双速km1″, //计时5秒 PT:=T#5S); IF “T2”.Q = 1 THEN //T2得电时,高速运行 “双速km1” := 0; “双速km2” := 1; “双速km3” := 1; END_IF; IF “双速停” = 1 THEN // 停止 “双速km1” := 0; “双速km2” := 0; “双速km3” := 0; END_IF;
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/184913.html原文链接:https://javaforall.cn