The following table provides a list of instructions available for the logic program. Models that support logic can use all of these instructions. The instructions are divided into the following nine categories: (1) Basic, (2) Timer, (3) Counter, (4) Read/Write, (5) Operation, (6) Function, (7) Comparison, (8) Conversion, (9) I/O Driver Instructions.
You cannot use an instruction for which the pulse settings are set with function blocks.
Category |
Instruction Name |
Instruction |
Logic |
Function Block |
|
---|---|---|---|---|---|
Basic Instructions |
Bit Basics |
Normally Open |
NO |
O |
O |
Normally Closed |
NC |
O |
O |
||
Out |
OUT |
O |
O |
||
Negative Out |
OUTN |
O |
O |
||
Set |
SET |
O |
O |
||
Reset |
RST |
O |
O |
||
Pulse Basic |
Positive Transition |
PT |
O |
X |
|
Negative Transition |
NT |
O |
X |
||
Program Control |
Jump |
JMP |
O |
X |
|
Jump to Subroutine |
JSR |
O |
X |
||
Return |
RET |
O |
X |
||
Repeat Processing |
FOR |
O |
X |
||
NEXT |
O |
X |
|||
Inverse |
INV |
O |
X |
||
Exit |
EXIT |
O |
X |
||
Power Bar Control |
PBC |
O |
X |
||
Power Bar Reset |
PBR |
O |
X |
||
Logic Wait |
LWA |
O |
X |
||
Timer Instructions |
— |
On Delay Timer |
TON |
O |
O |
Off Delay Timer |
TOF |
O |
O |
||
Pulse Timer |
TP |
O |
O |
||
Accumulate On Delay Timer |
TONA |
O |
O |
||
Accumulate Off Delay Timer |
TOFA |
O |
O |
||
Counter Instructions |
— |
Up Counter |
CTU |
O |
O |
Down Counter |
CTD |
O |
O |
||
Up/Down Counter |
CTUD |
O |
O |
||
R/W Instructions |
Time Read/Write |
Read Time |
JRD |
O |
O |
Set Time |
JSET |
O |
O |
||
Date Read/Write |
Read Date |
NRD |
O |
O |
|
Set Date |
NSET |
O |
O |
||
Operation Instructions |
Operation Instructions |
Add |
ADD |
O |
O |
Subtract |
SUB |
O |
O |
||
Multiplication |
MUL |
O |
O |
||
Division |
DIV |
O |
O |
||
Modulation |
MOD |
O |
O |
||
Increment |
INC |
O |
O |
||
Decrement |
DEC |
O |
O |
||
Time Operation |
Time Addition |
JADD |
O |
O |
|
Time Subtraction |
JSUB |
O |
O |
||
Logical Operation |
Logical AND |
AND |
O |
O |
|
Logical OR |
OR |
O |
O |
||
Logical XOR |
XOR |
O |
O |
||
Logical NOT |
NOT |
O |
O |
||
Transfer |
Move (Copy) |
MOV |
O |
O |
|
Block Move (Block Copy) |
BLMV |
O |
O |
||
Full Move (Multiple Copy) |
FLMV |
O |
O |
||
Exchange |
XCH |
O |
O |
||
Shift |
Shift Left |
SHL |
O |
O |
|
Shift Right |
SHR |
O |
O |
||
Arithmetic Shift Left |
SAL |
O |
O |
||
Arithmetic Shift Right |
SAR |
O |
O |
||
Rotation |
Rotate Left |
ROL |
O |
O |
|
Rotate Right |
ROR |
O |
O |
||
Rotate Left with Carry Over |
RCL |
O |
O |
||
Rotate Right with Carry Over |
RCR |
O |
O |
||
Function Instructions |
Calculation Functions |
Sum |
SUM |
O |
O |
Average |
AVE |
O |
O |
||
Square Root |
SQRT |
O |
O |
||
Bit Count |
BCNT |
O |
O |
||
PID |
PID |
O |
O |
||
Trigonometric |
Sine |
SIN |
O |
O |
|
Cosine |
COS |
O |
O |
||
Tangent |
TAN |
O |
O |
||
Arc Sine |
ASIN |
O |
O |
||
Arc Cosine |
ACOS |
O |
O |
||
Arc Tangent |
ATAN |
O |
O |
||
Cotangent |
COT |
O |
O |
||
Miscellaneous Functions |
Exponent |
EXP |
O |
O |
|
Logarithm |
LN |
O |
O |
||
Log Base 10 |
LG10 |
O |
O |
||
Compare Instructions |
Arithmetic Compare |
Comparison(=) |
EQ |
O |
O |
Comparison(>) |
GT |
O |
O |
||
Comparison(<) |
LT |
O |
O |
||
Comparison(>=) |
GE |
O |
O |
||
Comparison(<=) |
LE |
O |
O |
||
Compare () |
NE |
O |
O |
||
Time Compare |
Time Compare(=) |
JEQ |
O |
O |
|
Time Compare(>) |
JGT |
O |
O |
||
Time Compare(<) |
JLT |
O |
O |
||
Time Compare(>=) |
JGE |
O |
O |
||
Time Compare(<=) |
JLE |
O |
O |
||
Time Compare() |
JNE |
O |
O |
||
Date Compare |
Date Compare(=) |
NEQ |
O |
O |
|
Date Compare(>) |
NGT |
O |
O |
||
Date Compare(<) |
NLT |
O |
O |
||
Date Compare(>=) |
NGE |
O |
O |
||
Date Compare(<=) |
NLE |
O |
O |
||
Date Compare() |
NNE |
O |
O |
||
Convert Instructions |
Numeric Value |
BCD Convert |
BCD |
O |
O |
BIN Convert |
BIN |
O |
O |
||
Encode |
ENCO |
O |
O |
||
Decode |
DECO |
O |
O |
||
Convert to Radian |
RAD |
O |
O |
||
Convert Degree |
DEG |
O |
O |
||
Scale |
SCL |
O |
O |
||
Type |
Convert Integer to Float |
I2F |
O |
O |
|
Convert Integer to Real |
I2R |
O |
O |
||
Convert Float to Integer |
F2I |
O |
O |
||
Convert Float to Real |
F2R |
O |
O |
||
Convert Real to Integer |
R2I |
O |
O |
||
Convert Real to Float |
R2F |
O |
O |
||
Convert to Seconds |
H2S |
O |
O |
||
Convert Seconds to Time |
S2H |
O |
O |
||
I/O Driver Instructions |
CAN |
SDO Read |
SDOR |
O |
O |
SDO Write |
SDOW |
O |
O |
||
Master Diagnostics |
DGMT |
O |
O |
||
Slave Diagnostics |
DGSL |
O |
O |
||
STD |
Change Pulse Output Parameter Instruction |
PLSX |
O |
O |
|
Change Acceleration/Deceleration Pulse Output Parameter Instruction |
PLSY |
O |
O |
||
Read Pulse Output Parameter Instruction |
PLSG |
O |
O |
||
Start Pulse Output Instruction |
PLS |
O |
O |
||
Stop Pulse Output |
PLSQ |
O |
O |
||
Change PWM Output Parameter Instruction |
PWMX |
O |
O |
||
Read PWM Output Parameter Instruction |
PWMG |
O |
O |
||
Start PWM Output Instruction |
PWM |
O |
O |
||
Stop PWM Output Instruction |
PWMQ |
O |
O |
||
Change High Speed Counter Parameter Instruction |
HSCX |
O |
O |
||
Read High Speed Counter Parameter Instruction |
HSCG |
O |
O |
||
Start High Speed Counter Instruction |
HSC |
O |
O |
||
Stop High Speed Counter Instruction |
HSCQ |
O |
O |
||
Confirm Pulse Catch Input Instruction |
PCH |
O |
O |
||
Clear Pulse Catch Input Instruction |
PCHQ |
O |
O |