Publication 1766-RM001A-EN-P - October 2008
Program Control Instructions
299
RET - Return from
Subroutine
Instruction Type: output
The RET instruction marks the end of subroutine execution or the end of
the subroutine file. It causes the controller to resume execution at the
instruction following the JSR instruction, user interrupt, or user fault
routine that caused this subroutine to execute.
SUS - Suspend
Instruction Type: output
The SUS instruction is used to trap and identify specific conditions for
program debugging and system troubleshooting. This instruction causes
the processor to enter the suspend idle mode, causing all outputs to be
de-energized. The suspend ID and the suspend file (program file number
or subroutine file number identifying where the suspend instruction
resides) are placed in the status file (S:7 and S:8).
The immediate data range for the suspend ID is from -32768…32767.
TND - Temporary End
Instruction Type: output
The TND instruction is used to denote a premature end-of-ladder program
execution. The TND instruction cannot be executed from a STI
subroutine, HSC subroutine, EII subroutine, or a user fault subroutine.
This instruction may appear more than once in a ladder program.
On a true rung, TND stops the processor from scanning the rest of the
program file. In addition, this instruction performs the output scan, input
scan, and housekeeping aspects of the processor scan cycle prior to
resuming scanning at rung 0 of the main program (file 2). If this
instruction is executed in a nested subroutine, it terminates execution of
all nested subroutines.
RET
Return
RET
Execution Time for the RET Instruction
Controller
When Rung Is:
True
False
MicroLogix 1400
0.3710 µs
0.2510 µs
SUS
Suspend
Suspend ID
1
SUS
TND
Execution Time for the TND Instruction
Controller
When Rung Is:
True
False
MicroLogix 1400
0.3320 µs
0.2100 µs
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive