Код:
check_ON(CLK := START);
if check_ON.q then
stepTP := 1;
end_if
if NOT START AND stepTP <> 0 then stepTP := 0; end_if
case stepTP of
1:
tStepTP.IN := TRUE;
tStepTP.PT := 5;
if tStepTP.Q THEN
tStepTP.IN:= FALSE;
tStepTP.PT := 0;
stepTP := 2;
end_if
2:
tStepTP.IN := TRUE;
tStepTP.PT := 10;
if tStepTP.Q THEN
tStepTP.IN:= FALSE;
tStepTP.PT := 0;
stepTP := 3;
end_if
3:
tStepTP.IN := TRUE;
tStepTP.PT := 15;
if tStepTP.Q THEN
tStepTP.IN:= FALSE;
tStepTP.PT := 0;
stepTP := 4;
end_if
else ;
end_case
tStepTP(sec := sec);