code:
PROGRAM
VAR_IN_OUT
I0 new-xx01-0001 In
Q1 new-xx01-0002 In
Q2 new-xx01-0003 In
Q3 new-xx01-0005 In
END_VAR
Q1 = TM.SEC
F0 = I0
WHILE F0
F0 - 1
END_WHILE
Q2 = TM.CLK
code:F0=I0
IF E0==0
THEN
SETTMR 1 F0
E0=1
Q0=0
ELSE
CHECKTMR 1
JMPC M1
END_IF
EXIT
M1:
Q0=1
E0=0