I'm trying to create alternating outputs on my PLC (Mistubishi Melsec Q00UJCPU) in structured text. out1 and out2 - are outputs. IN1 - input.
Here's the code
IF IN1=TRUE THEN;
timer1(IN:= TRUE, PT:=T#0s , Q:=timer1.Q);
END_IF;
IF timer1.Q THEN;
out1:=FALSE;
out2:=TRUE;
timer1(IN:=FALSE, PT:=T#1s);
timer2(IN:= TRUE, PT:=T#500ms , Q:=timer2.Q);
END_IF;
IF timer2.Q THEN;
out2:=FALSE;
out1:=TRUE;
timer2(IN:=FALSE, PT:=T#1s);
timer1(IN:=TRUE , PT:=T#500ms , Q:=timer1.Q);
END_IF;
Same code works in Codesys, but is not working in GX Works2. What could be wrong with it? And are there so many differents in Codesys and GX Works ST programming? Thanks!