Ladder Diagram Safety Instructions

Routines in the safety task can use the following types of ladder diagram safety instructions.
When instructions that result in values with decimal place are used with REAL or LREAL operands, Rockwell Automation has verified the precision to 6 decimal places.

Advanced Process

Mnemonic
Name
Description
Logix Designer Application
FGEN
Function Generator
Converts an input based on a piece-wise linear function.
Version 38 or later

Advanced Math

Rockwell Automation has not done independent mathematical analysis of the numerical algorithms used in any of the following advanced math instructions. If you require a specific degree of accuracy, you must functionally test this instruction over your expected input domain.
Mnemonic
Name
Description
Logix Designer Application
EXPT
X to the Power of Y
Returns the value of X to the power of Y.
Version 36 or later
XPY
X to the Power of Y
Returns the value of X to the power of Y.
Version 35 or earlier
LG
Natural Log
Compute the natural log of a number.
All versions
LOG
Log Base 10
Compute the log base 10 of a number.
All versions

Array (File)

Mnemonic
Name
Description
Logix Designer Application
AVE
File Average
Calculate the mean/average over a set of values.
All versions
COP
Copy File
Copy binary data from one tag to another (no type conversion).
When you use the COP instruction in a safety routine, you must verify that the length is a constant and that the source and destination length are the same.
All versions
FAL
File Arithmetic and Logic
Perform copy, arithmetic, logic, and function operations on data that is stored in an array.
All versions
FLL
File Fill
Fill the elements of an array with the source value, while leaving the source value unchanged.
All versions
FSC
File Search and Compare
Compare the values in an array, element by element.
All versions
SIZE
Size in Elements
Find the size of a dimension of an array.
All versions
STD
File Standard Deviation
Calculate the standard deviation over a set of values.
All versions
BSL
Bit Shift Left
Shifts the specified number of bits to the left.
All versions
BSU
Bit Shift Right
Shifts the specified number of bits to the right.
All versions
FFL
Fifo Load
Store a value into an array by using first-in/first-out semantics.
All versions
FFU
Fifo Unload
Retrieve a value from an array by using last-in/first-out semantics.
All versions
LFL
Lifo Load
Store a value into an array by using last-in/first-out semantics.
All versions
LFU
Lifo Unload
Retrieve a value from an array by using last-in/first-out semantics.
All versions

Bit

Mnemonic
Name
Description
Logix Designer Application
ONS
One Shot
Allows an event to occur one time.
All versions
OSR
One Shot Falling
Sets an output bit for one scan on the true-to-false (falling) edge of rung state.
All versions
OSF
One Shot Rising
Sets an output bit for one scan on the false-to-true (rising) edge of rung state.
All versions
OTE
Output Energize
Controls a bit (it performs both Set and Clear operations based on rung state).
All versions
OTL
Output Latch
Set a bit (retentive).
All versions
OOTUTL
Output Unlatch
Clear bit (retentive).
All versions
XIC
Examine if Closed
Examines the data bit to set or clear the rung condition.
All versions
XIO
Examine if Open
Examines the data bit to set or clear the rung condition.
All versions

Time/Counter

Mnemonic
Name
Description
Logix Designer Application
CTD
Count Down
Count down.
All versions
CTU
Count Up
Count up.
All versions
RES
Reset
Reset a timer or counter.
All versions
RTO
Retentive Timer On
Accumulate time.
All versions
TOF
Off-delay Timer
Time how long a timer is disabled.
All versions
TON
On-delay Timer
Time how long a timer is enabled.
All versions

Compare

Mnemonic
Name
Description
Logix Designer Application
EQ
Equal To
Test whether two values are equal.
Version 36 or later
EQU
Equal To
Test whether two values are equal.
Version 35 or earlier
CMP
Compare
Perform a comparison on the arithmetic operations that you specify in the expression.
All versions
GE
Greater Than Or Equal To
Test whether one value is greater than or equal to a second value.
Version 36 or later
GEQ
Greater Than Or Equal To
Test whether one value is greater than or equal to a second value.
Version 35 or earlier
GT
Greater Than
Test whether one value is greater than a second value.
Version 36 or later
GRT
Greater Than
Test whether one value is greater than a second value.
Version 35 or earlier
IsINF
If Infinity
Check if floating point value is +/- infinity.
All versions
IsNAN
Is Not a Number
Check if floating point value is Not-a-Number.
All versions
LE
Less Than or Equal To
Test whether one value is less than or equal to a second value.
Version 36 or later
LEQ
Less Than or Equal To
Test whether one value is less than or equal to a second value.
Version 35 or earlier
LT
Less Than
Test whether one value is less than a second value.
Version 36 or later
LES
Less Than
Test whether one value is less than a second value.
Version 35 or earlier
LIMIT
Limit
Test whether a value falls within a specified range.
Version 36 or later
LIM
Limit
Test whether a value falls within a specified range.
Version 35 or earlier
MEQ
Mask Equal To
Pass source and compare values through a mask and test whether they are equal.
All versions
NE
Not Equal
Test whether one value is not equal to a second value.
Version 36 or later
NEQ
Not Equal
Test whether one value is not equal to a second value.
Version 35 or earlier

Move/Logical

Mnemonic
Name
Description
Logix Designer Application
AND
Bitwise AND
Perform bitwise AND operation.
All versions
CLR
Clear
Clear a value.
All versions
MOVE
Move
Copy a value.
Version 36 or later
MOV
Move
Copy a value.
Version 35 or earlier
MVM
Masked Move
Copy a specific part of an integer.
All versions
NOT
Bitwise Not
Perform bitwise NOT operation.
All versions
OR
Bitwise Or
Perform bitwise OR operation.
All versions
SWPB
Swap Byte
Rearrange the bytes of a value.
All versions
XOR
Bitwise Exclusive Or
Perform bitwise exclusive OR operation.
All versions

Program Control

Mnemonic
Name
Description
Logix Designer Application
AFI
Always False Instruction
Forces a rung to false (rung continues to execute).
All versions
EVENT
Trigger Event Task
Triggers one execution of an event task. The event instruction triggers a scan of the standard task.
All versions
JMP
Jump To Label
Scan of logic jumps to a labeled location within the same routine.
All versions
JSR
Jump to Subroutine
Jump to a separate routine.
All versions
LBL
Label
Identifies a target location for a JMP instruction.
All versions
MCR
Master Control Reset
Forces every rung in a section of logic to execute in the False state.
All versions
NOP
No Operation
Insert a placeholder in the logic.
All versions
RET
Return
Return the results of a subroutine.
All versions
SBR
Subroutine
Accept data that is passed to a subroutine by the JSR instruction.
All versions
TND
Temporary End
Mark a temporary end that halts routine execution.
All versions

Compute/Math

Rockwell Automation has done no independent mathematical analysis of the numerical algorithms used in the SQRT or SQR instructions. If you require a specific degree of accuracy, you must functionally test this instruction over your expected input domain.
Mnemonic
Name
Description
Logix Designer Application
ABS
Absolute Value
Take the absolute value of a value.
All versions
ADD
Add
Add two values.
All versions
CPT
Compute
Perform the arithmetic operation that is defined in the expression.
All versions
DIV
Divide
Divide two values.
All versions
MOD
Modulo
Determine the remainder after one value is divided by a second value.
All versions
MUL
Multiply
Multiply two values.
All versions
NEG
Negate
Take the opposite sign of a value.
All versions
SQRT
Square Root
Calculate the square root of a value.
Version 36 or later
SQR
Square Root
Calculate the square root of a value.
Version 35 or earlier
SUB
Subtract
Subtract two values.
All versions

Trigonometric

Rockwell Automation has not done independent mathematical analysis of the numerical algorithms in any of the following trigonometric instructions. If you require a specific degree of accuracy, you must functionally test this instruction over your expected input domain.
Mnemonic
Name
Description
Logix Designer Application
ACOS
Arc Cosine
Compute the arc-cosine of a number.
Version 36 or later
ACS
Arc Cosine
Compute the arc-cosine of a number.
Version 35 or earlier
ASIN
Arc Sine
Compute the arc-sine of a number.
Version 36 or later
ASN
Arc Sine
Compute the arc-sine of a number.
Version 35 or earlier
ATAN
Arc Tangent
Compute the arc tangent in radians of y/x based on the sign of a value to determine the correct quadrant.
Version 36 or later
ATN
Arc Tangent
Compute the arc tangent in radians of y/x based on the sign of a value to determine the correct quadrant.
Version 35 or earlier
ATAN2
Arc Tangent 2
Compute the arc tangent in radians of y/x based on the signs of both values to determine the correct quadrant.
All versions
COS
Cosine
Compute the cosine of a number.
All versions
SIN
Sine
Compute the sin of a number.
All versions
TAN
Tangent
Compute the tangent of a number.
All versions

I/O

For special considerations when using the GSV and SSV instructions, see the controller user manual.
Mnemonic
Name
Description
Logix Designer Application
GSV
Get System Value
Get controller status information.
All versions
SSV
Set System Value
Set controller status information.
All versions

Math Conversion

Mnemonic
Name
Description
Logix Designer Application
DEG
Degrees
Convert radians into degrees.
All versions
BCD_TO
Convert to Integer
Convert the BCD value to an integer value.
Version 36 or later
FRD
Convert to Integer
Convert the BCD value to an integer value.
Version 35 or earlier
RAD
Radian
Convert degrees into radians.
All versions
TO_BCD
Convert to BCD
Convert the integer value to a BCD value.
Version 36 or later
TOD
Convert to BCD
Convert the integer value to a BCD value.
Version 35 or earlier
TRUNC
Truncate
Remove the fractional part of a value.
Version 36 or later
TRN
Truncate
Remove the fractional part of a value.
Version 35 or earlier
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal