請(qǐng)叫我老鐵
人生就像蒲公英,看似自由,卻身不由己。
級(jí)別: 工控俠客
|
順序啟動(dòng),每按一次啟動(dòng)按鈕啟動(dòng)一臺(tái)電機(jī),I0.0為啟動(dòng)按鈕,Q0.0----Q0. IF "I0.0" AND "M0.0" = 0 THEN "Q0.4" := "Q0.3"; "Q0.3" := "Q0.2"; "Q0.2" := "Q0.1"; "Q0.1" := "Q0.0"; "Q0.0" := 1; END_IF; "M0.0" := "I0.0"; 逆序停止,每按一次停止按鈕停掉最后啟動(dòng)的那臺(tái)電機(jī),I0.1為停止按鈕,Q0.4----Q0.0 IF "M0.1" AND NOT "I0.1" THEN "Q0.0" := "Q0.1"; "Q0.1" := "Q0.2"; "Q0.2" := "Q0.3"; "Q0.3" := "Q0.4"; "Q0.4" := 0; END_IF; "M0.1" := "I0.1"; |
---|---|
|