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重新編輯 ]