Rockwell Automation 1785-Lxxx Enhanced and Ethernet PLC-5 Programmable Controllers User Manual

Page 323

Advertising
background image

Publication 1785-UM012D-EN-P - July 2005

Instruction Set Quick Reference D-23

Jump to Subroutine
JSR

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.

Subroutine
SBR

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.

Return
RET

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.

Always False
AFI

The AFI instruction disables the rung (i.e., the rung is always
false).

Temporary End
TND

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).

One Shot
ONS

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.

One Shot Falling
OSF

Status Bits:
OB - Output Bit
SB - Storage Bit

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.

One Shot Rising
OSR

Status Bits:
OB - Output Bit
SB - Storage Bit

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.

Instruction

Description

JSR

JUMP TO SUBROUTINE

Program File

Input par

90

N16:24

N16:23

231

Input par

Input par
Return par
Return par

N19:11
N19:12

SBR

SUBROUTINE

Input par

N43:1

N43:0

N43:2

Input par

Input par

RET

RETURN ( )

Return par

N43:4

N43:3

Return par

AFI

(

)

TND

B3

110

ONS

OSF

ONE SHOT FALLING

Output Bit

15

B3/0

N7:0

Storage Bit

Output Word

OSR

ONE SHOT RISING

Output Bit

15

B3/0

N7:0

Storage Bit

Output Word

Advertising