CASEiMyStateOF
  1:
   //Dosomething
   // ....
   IFxEverythingIsFineTHEN
    iMyState :=2;
   ELSE
    iMyState :=999;
   END_IF
  2:
   //Dosomethingelse....
  999:
END_CASE
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi friends,
How to implement "Jump" in statement logic in codesys.I have not find any instruction.
jmp test;
test:
is my syntax showing errors.Help me on this
Thanks
Hi,
use the CASE instruction: