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