Instruction Set Quick Reference

D-23

 

 

Instruction

Description

 

 

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

Jump to Subroutine

If the input conditions are true, the controller starts running a

JSR

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.

 

SBR

 

 

 

 

 

 

SUBROUTINE

 

 

Input par

N43:0

 

Input par

N43:1

 

Input par

N43:2

 

 

 

 

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.

 

RET

 

 

 

 

 

 

RETURN ( )

 

 

Return par

N43:3

 

Return par

N43:4

 

 

 

 

Return

If the input conditions are true, the RET instruction ends the

RET

subroutine and stores the Return Parameters (N43:3, N43:4) to

 

be returned to the JSR instruction in the main program.

AFI

Always False

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

AFI

false).

 

 

 

 

 

 

( TND )

 

Temporary End

If the input conditions are true, the TND instruction stops the

 

 

 

 

 

 

 

TND

controller from scanning the rest of the program (i.e., this

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

instruction temporarily ends the program).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

B3

 

One Shot

If the input conditions preceding the ONS instructions on the

 

 

 

 

 

 

ONS

 

 

 

ONS

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

110

 

 

 

 

 

 

false on successive scans.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

See page F-8 for a description of prescan operation for

 

 

 

 

 

 

 

 

 

 

 

this instruction.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

One Shot Falling

The OSF instruction triggers an event to occur one time. Use the

 

 

 

OSF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ONE SHOT FALLING

 

OSF

OSF instruction whenever an event must start based on the

 

 

 

 

 

change of state of a rung from true-to-false, not on the resulting

 

 

Storage Bit

B3/0

 

 

 

Status Bits:

rung status. The output bit (N7:0/15) is set (1) for one program

 

 

Output Bit

15

OB - Output Bit

scan when the rung goes from true-to-false.

 

 

Output Word

N7:0

SB - Storage Bit

 

 

 

 

 

 

 

 

 

 

 

See page F-8 for a description of prescan operation for

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

this instruction.

 

 

 

 

 

 

 

 

 

 

 

 

OSR

 

 

 

 

ONE SHOT RISING

 

Storage Bit

B3/0

Output Bit

15

Output Word

N7:0

 

 

 

One Shot Rising

The OSR instruction triggers an event to occur one time. Use

OSR

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

Status Bits:

rung status. The output bit (N7:0/15) is set (1) for one program

OB - Output Bit

scan when the rung goes from false-to-true.

SB - Storage Bit

See page F-8 for a description of prescan operation for

 

 

this instruction.

Publication 1785-UM012D-EN-P - July 2005

Page 323
Image 323
Bradley Smoker PLC-5 user manual Jsr, Sbr, Ret, Afi, Tnd, Ons, Osf, Osr