David000000
Hello,
I am a beginner working with OpenPLC, and I’ve been exploring Structured Text (ST) programming. However, I am encountering an issue when trying to use the JMP and CONTINUE statements. Every time I include these statements in my code, I receive an error, and the program fails to run or compile successfully.
My questions are:
  1. Does OpenPLC support the JMP and CONTINUE statements as specified in the IEC 61131-3 standard?
  2. If supported, are there any special syntax rules or limitations I need to know about?
  3. If not supported, are there alternative methods I can use to implement similar jump or loop-skipping functionality
I would be very grateful if you could guide me on how to correctly use these statements or suggest alternatives.
Thank you in advance for your time and support! Wishing you a great day and success in all your work!
[203128%2F9143826%2Fmceclip0]
[203128%2F9143832%2Fmceclip0]
Reply 0 0
PeBi
[203128%2F9143850%2Fmceclip0]
 
Variablentypen passen nit zusammen!!! --> T#100S ...
 
[203128%2F9143851%2Fmceclip0]
 
!!! COMTINUE !!! ist kein gültiger Befehl --> CONTINUE
Reply 0 0
David000000
Thanks for the reply,but I tried CONTINUE and it still shows an error.
[203128%2F9146677%2Fmceclip0]
Here after modifying the variable type, the error is still reported, and HELLO is an lable, and it will still report an error after trying different settings.
[203128%2F9146682%2Fmceclip0]
[203128%2F9146683%2Fmceclip0]
Reply 0 0
PeBi
[203128%2F9146785%2Fmceclip0]
 
Löschen Sie die Variable 'HELLO'. 'HELLO' ist ja eine Sprungmarke innerhalb ihres Codes.
Reply 0 0
David000000
Thanks for the reply,I posted two images above to test whether it is necessary to add a variable for the label, but unfortunately, neither method seems to work.
[203128%2F9146848%2Fmceclip0]
Reply 0 0
fg71
I couldn't answer your question how to use it but I do see from the source code of matiec that JMP is a keyword.
So maybe you could test it with IL.
Reply 0 0
thiagoralves
JMP and CONTINUE are an extension of the IEC 61131-3 standard. I don't think MatIEC supports that on ST language. I believe JMP instruction is only supported in IL. In any case, you should be able to achieve the same effect using loops and conditional checks with FOR..IF..ELSE.
Reply 0 0
David000000
Thanks for the reply!
Reply 0 0
Reply