IF M2 THEN
OUT_T(M1,TC1,30);(*3s开启Y1*)
IF T1 =30 THEN
M1 := 0;
Y1 := 1;
END_IF;
OUT_T(Y1,TC2,30);(*3s关闭Y1*)
IF T2 = 30 THEN
M1 := 1;
Y1 := 0;
END_IF;
END_IF;
IF LDP( 1, M1 ) THEN
number := number + 1;
END_IF;
IF number >= D100 THEN(*D100设置循环次数*)
M2 := 0;
M1 := 0;
number := 0;
T2 := 0;
T1 := 0;
END_IF;
[ 此帖被sunzengli在2023-08-10 17:03重新编辑 ]