-
Shawn Tierney commented on lesson Lesson 22: Motor Control Ladder Routine 3 years, 11 months ago
Good morning Chris,
Thanks for your question.
JSR's can be used to pass parameters to and from subroutines, so the same subroutine can be used by multiple processes.
For instance, if you have a subroutine that calculated the result of a mathematical expression, you could jump / call it from different places in your code, each time passing in a unique set of variables to be used in the expression and then passing back the results.
For more details, check out “help” on the JSR instruction 🙂
Hope this helps,
Shawn Tierney,
Instructor at The Automation School