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)

Return from subroutine (RET) - Ladder Logic Tutorial

From the course: PLC Program Flow and Control Instructions

Start my 1-month free trial

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.

Contents