Allen-Bradley PLC-5 User Manual page 323

Enhanced and ethernet plc-5 programmable controllers
Hide thumbs Also See for PLC-5:
Table of Contents

Advertisement

Instruction
Jump to Subroutine
JSR
JSR
JUMP TO SUBROUTINE
Program File
90
Input par
N16:23
Input par
N16:24
Input par
231
Return par
N19:11
Return par
N19:12
Subroutine
SBR
SBR
SUBROUTINE
Input par
N43:0
Input par
N43:1
Input par
N43:2
Return
RET
RET
RETURN ( )
Return par
N43:3
Return par
N43:4
Always False
AFI
AFI
Temporary End
(
TND
)
TND
One Shot
B3
ONS
ONS
110
One Shot Falling
OSF
OSF
ONE SHOT FALLING
Storage Bit
B3/0
Status Bits:
Output Bit
15
OB - Output Bit
Output Word
N7:0
SB - Storage Bit
One Shot Rising
OSR
OSR
ONE SHOT RISING
Storage Bit
B3/0
Status Bits:
Output Bit
15
OB - Output Bit
Output Word
N7:0
SB - Storage Bit
Instruction Set Quick Reference
Description
If the input conditions are true, the controller starts running a
subroutine Program File (90). The controller passes the Input
Parameters (N16:23, N16:24, 231) to the subroutine and the RET
instruction passes Return Parameters (N19:11, N19:12) back to
the main program, where the controller encountered the JSR
instruction.
The SBR instruction is the first instruction in a subroutine file.
This instruction identifies Input Parameters (N43:0, N43:1,
N43:2) the controller receives from the corresponding JSR
instruction. You do not need the SBR instruction if you do not
pass input parameters to the subroutine.
If the input conditions are true, the RET instruction ends the
subroutine and stores the Return Parameters (N43:3, N43:4) to
be returned to the JSR instruction in the main program.
The AFI instruction disables the rung (i.e., the rung is always
false).
If the input conditions are true, the TND instruction stops the
controller from scanning the rest of the program (i.e., this
instruction temporarily ends the program).
If the input conditions preceding the ONS instructions on the
same rung go from false-to-true, the ONS instruction conditions
the rung so that the output is true for one scan. The rung is
false on successive scans.
See page F-8 for a description of prescan operation for
this instruction.
The OSF instruction triggers an event to occur one time. Use the
OSF instruction whenever an event must start based on the
change of state of a rung from true-to-false, not on the resulting
rung status. The output bit (N7:0/15) is set (1) for one program
scan when the rung goes from true-to-false.
See page F-8 for a description of prescan operation for
this instruction.
The OSR instruction triggers an event to occur one time. Use
the OSR instruction whenever an event must start based on the
change of state of a rung from false-to-true, not on the resulting
rung status. The output bit (N7:0/15) is set (1) for one program
scan when the rung goes from false-to-true.
See page F-8 for a description of prescan operation for
this instruction.
Publication 1785-UM012D-EN-P - July 2005
D-23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents