Question:
(* 2. Impulse relay logic. The RIGHT button turns output Q2 on or off *)
IF P03 AND NOT M02 THEN // Initiate impulse relay function - RIGHT button switches memory M3.
M03 := NOT M03; // Memory, which is switched on the first time, off the second time, on the third time, etc.
END_IF;
M02 := P03; // Impulse relay function termination - button RIGHT affects memory M2.
Is there any way to make this function shorter or easier?
Andrus