Can someone please how RET command works and where exactly it is useful?
RET command
-
the_indiRoboter -
September 29, 2020 at 8:21 AM -
Thread is Unresolved
-
-
RET instruction will return to the calling job. You use it in a job that is being called for in case there are some lines or instructions after the RET that you don't want the controller to go through. If you add IF to the RET you can manipulate if the lines after RET will be executed or not.
-
Adding to Reintz's, if you use RET in a program that wasn't called by another (for example, in the master job), the controller will throw a UNDEFINED RETURN JOB alarm or something like that.
-
You also can return Local Variable too
-
You also can return Local Variable too
Possibly. That is not available on every generation. The OP doesn't specify what controller.
-
The RET (Return) INFORM command isn't really necessary and simply using the default program/job END will work just as well in any jobs called.
Reintz is also correct, the RET is helpful if used in IFTHEN or ENDIF instructions too.