From the course: PLC Program Flow and Control Instructions
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Return from subroutine (RET) - Ladder Logic Tutorial
From the course: PLC Program Flow and Control Instructions
Return from subroutine (RET)
- [Instructor] The return from subroutine is an output instruction that marks the end of the subroutine file. It causes the scan to return to the main program, at the instruction following the GSR instruction where it left the program. It is a block type. Nothing is written inside because it simply just returned the scan back to where the subroutine came from. So the three instructions work together. JSR to jump to a subroutine, SBR to specify the number of the subroutine, and return is to return back to the main program.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Intro to program control instructions42s
-
(Locked)
Jump (JMP) to label (LBL) instructions1m 53s
-
(Locked)
Master control rest (MCR) instruction2m 22s
-
(Locked)
Difference between JMP and MCR1m 7s
-
(Locked)
Introduction to subroutines2m 13s
-
(Locked)
Jump to subroutine (JSR) instruction35s
-
(Locked)
Subroutine (SBR) instruction38s
-
(Locked)
Return from subroutine (RET)43s
-
(Locked)
Nested subroutines38s
-
-