一:STL/RET/CMP/ZCP

[PLC]ST语言五:STL/RET/CMP/ZCP-LMLPHP

说明:简单的顺控指令不做其他说明。

控制要求:无

编程梯形图:

[PLC]ST语言五:STL/RET/CMP/ZCP-LMLPHP

[PLC]ST语言五:STL/RET/CMP/ZCP-LMLPHP

[PLC]ST语言五:STL/RET/CMP/ZCP-LMLPHP

结构化编程ST语言:

(*步进指令STL(EN,s);*)

SET(M8002,S3);

STL(TRUE,S3)

M419:=TRUE;

OUT_T(TRUE,TC0,K10);

SET(TS0,S20);

STL(TRUE,S20);

M420:=TRUE;

OUT_T(TRUE,TC1,K15);

S3:=TS1;

(*步进指令RET(EN);*)

RET(TRUE);

(*比较指令CMP(EN,s1,s2,d);*)

CMP(M37,K100,D51,M38);

M421:=M37 AND M38;

M422:=M37 AND M39;

M423:=M37 AND M40;

(*区间比较ZCP(EN,s1,s2,s3,d);*)

ZCP(M41,K5,K10,D52,M42);

M424:=M41 AND M42;

M425:=M41 AND M43;

M426:=M41 AND M44;

ZCP(M45,K10,K5,D53,M46);

M427:=M45 AND M46;

M428:=M45 AND M47;

M429:=M45 AND M48;

  [PLC]ST语言五:STL/RET/CMP/ZCP-LMLPHP

[PLC]ST语言五:STL/RET/CMP/ZCP-LMLPHP

[PLC]ST语言五:STL/RET/CMP/ZCP-LMLPHP

[PLC]ST语言五:STL/RET/CMP/ZCP-LMLPHP

05-11 20:07