SCL语言(入门初级笔记)「建议收藏」
程序
//點(diǎn)動(dòng)陳序
IF “點(diǎn)動(dòng)啟動(dòng)” = 1 THEN
“KM1點(diǎn)動(dòng)” := 1;
ELSE
“KM1點(diǎn)動(dòng)” := 0;
END_IF;
// 起保停電路
IF “自鎖啟動(dòng)” = 1 THEN
“kM2輸出” := 1;
END_IF;
IF “自鎖停止” = 1 THEN
“kM2輸出” := 0;
END_IF;
//雙重連鎖正反轉(zhuǎn)
IF “正轉(zhuǎn)啟動(dòng)” = 1 AND “反轉(zhuǎn)啟動(dòng)” = 0 THEN
“km3反轉(zhuǎn)” := 0;
“KM3正轉(zhuǎn)” := 1;
END_IF;
IF “反轉(zhuǎn)啟動(dòng)” = 1 AND “正轉(zhuǎn)啟動(dòng)” = 0 THEN
“KM3正轉(zhuǎn)” := 0;
“km3反轉(zhuǎn)” := 1;
END_IF;
IF “停止正反轉(zhuǎn)” = 1 THEN
“km3反轉(zhuǎn)” := 0;
“KM3正轉(zhuǎn)” := 0;
END_IF;
//星角降壓?jiǎn)?dòng)
IF “星角啟動(dòng)”=1 AND “星角停止”=0 THEN
“KM1” := 1;
“KM2(星)”:=1 ;
END_IF;
“T1”.TON(IN:=”KM1″,//延時(shí)接通 T1,KM1得電是T1開(kāi)始計(jì)時(shí) ,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;
//雙速電機(jī)低速啟動(dòng)5秒后高速運(yùn)行
IF “雙速啟” = 1 THEN //低速運(yùn)行
“雙速km1” := 1;
END_IF;
“T2”.TON(IN:=”雙速km1″, //計(jì)時(shí)5秒
PT:=T#5S);
IF “T2”.Q = 1 THEN //T2得電時(shí),高速運(yùn)行
“雙速km1” := 0;
“雙速km2” := 1;
“雙速km3” := 1;
END_IF;
IF “雙速停” = 1 THEN // 停止
“雙速km1” := 0;
“雙速km2” := 0;
“雙速km3” := 0;
END_IF;
總結(jié)
以上是生活随笔為你收集整理的SCL语言(入门初级笔记)「建议收藏」的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 使用phantomjs操作DOM并对页面
- 下一篇: node-mysql中的连接池代码学习