|
31.1 |
Instructions 31-2 |
|
31.2 |
Instruction Notation List 31-7 |
|
31.2.1 |
Basic Instructions 31-7 |
|
31.2.2 |
Timer Instructions 31-9 |
|
31.2.3 |
Counter Instructions 31-10 |
|
31.2.4 |
R/W Instructions 31-11 |
|
31.2.5 |
Operation Instructions 31-12 |
|
31.2.6 |
Time Instructions 31-14 |
|
31.2.7 |
Logical Instructions 31-15 |
|
31.2.8 |
Transfer Instructions 31-16 |
|
31.2.9 |
Shift Instructions 31-17 |
|
31.2.10 |
Rotation Instructions 31-19 |
|
31.2.11 |
Function Instructions 31-21 |
|
31.2.12 |
Trigonometric Instructions 31-23 |
|
31.2.13 |
Other Functions 31-25 |
|
31.2.14 |
Arithmetic Compare 31-26 |
|
31.2.15 |
Time Compare 31-27 |
|
31.2.16 |
Date Compare 31-28 |
|
31.2.17 |
Data Conversion Instructions 31-29 |
|
31.2.18 |
Type Conversion Instructions 31-31 |
|
31.2.19 |
I/O Driver 31-33 |
|
31.3 |
About Addresses You can Set up as Operands 31-36 |
|
31.3.1 |
Connection Device Address 31-36 |
|
31.3.2 |
Symbol 31-36 |
|
31.3.3 |
LS Address 31-37 |
|
31.3.4 |
USR Area 31-37 |
|
31.3.5 |
System Variables 31-37 |
|
31.3.6 |
Variables 31-38 |
|
31.3.7 |
Logic Devices When Using the Address Format 31-41 |
|
31.4 |
Number of Steps Per Instruction 31-42 |
|
31.5 |
Bit Instructions 31-43 |
|
31.5.1 |
NO (Normally Open) / NC (Normally Closed) 31-43 |
|
31.5.2 |
OUT (Output Coil) / OUTN (Negative Output Coil) 31-48 |
|
31.5.3 |
SET (Set Coil) / RST (Reset Coil) 31-53 |
|
31.6 |
Pulse Instruction 31-57 |
|
31.6.1 |
PT (Positive Transition) / NT (Negative Transition) 31-57 |
|
31.7 |
Program Control 31-62 |
|
31.7.1 |
JMP (Jump) / JMPP (Positive Transition Jump) 31-62 |
|
31.7.2 |
JSR (Jump to Subroutine) / JSRP (Positive Transition Jump to Subroutine) 31-64 |
|
31.7.3 |
RET (Return) 31-66 |
|
31.7.4 |
FOR NEXT (Repeat) 31-67 |
|
31.7.5 |
INV (Invert) 31-72 |
|
31.7.6 |
EXIT (End of Processing) 31-73 |
|
31.7.7 |
PBC (Power Bar Control) and PBR (Power Bar Reset) 31-74 |
|
31.7.8 |
LWA (Logic Wait) 31-81 |
|
31.8 |
Timer Instruction 31-85 |
|
31.8.1 |
TON (ON Delay Timer) and TOF (OFF Delay Timer) 31-85 |
|
31.8.2 |
TP (Pulse Timer) 31-90 |
|
31.8.3 |
TONA (Accumulated ON Delay Timer) and TOFA (Accumulated OFF Delay Timer) 31-93 |
|
31.9 |
Counter Instruction 31-98 |
|
31.9.1 |
CTU and CTUP (Up Counter) 31-98 |
|
31.9.2 |
CTD and CTDP (Down Counters) 31-100 |
|
31.9.3 |
CTUD and CTUDP (Up/Down Counters) 31-102 |
|
31.10 |
R/W Instructions 31-105 |
|
31.10.1 |
JRD and JRDP (Time Read) 31-105 |
|
31.10.2 |
JSET and JSETP (Time Set) 31-107 |
|
31.10.3 |
NRD and NRDP (Date Read) 31-109 |
|
31.10.4 |
NSET and NSETP (Date Set) 31-111 |
|
31.11 |
Operation (Arithmetic) 31-113 |
|
31.11.1 |
ADD and ADDP (Add) 31-113 |
|
31.11.2 |
SUB and SUBP (Subtract) 31-121 |
|
31.11.3 |
MUL and MULP (Multiplication) 31-129 |
|
31.11.4 |
DIV and DIVP (Division) 31-137 |
|
31.11.5 |
MOD and MODP (Modulus) 31-145 |
|
31.11.6 |
INC and INCP (Increment) 31-153 |
|
31.11.7 |
DEC and DECP (Decrement) 31-158 |
|
31.12 |
Operation (Time) 31-163 |
|
31.12.1 |
JADD and JADDP (Time Addition) 31-163 |
|
31.12.2 |
JSUB and JSUBP (Time Subtraction) 31-168 |
|
31.13 |
Operation (Logical) 31-173 |
|
31.13.1 |
AND and ANDP (Logical AND) 31-173 |
|
31.13.2 |
OR and ORP (Logical OR) 31-180 |
|
31.13.3 |
XOR and XORP (Logical XOR) 31-187 |
|
31.13.4 |
NOT and NOTP (Logical NOT) 31-194 |
|
31.14 |
Operation (Move) 31-201 |
|
31.14.1 |
MOV and MOVP (Copy) 31-201 |
|
31.14.2 |
BLMV and BLMVP (Block Copy) 31-209 |
|
31.14.3 |
FLMV and FLMVP (Full Move) 31-217 |
|
31.14.4 |
XCH and XCHP (Exchange) 31-226 |
|
31.15 |
Calculation Instruction (Shift Instruction) 31-231 |
|
31.15.1 |
SHL and SHLP (Shift Left) 31-231 |
|
31.15.2 |
SHR and SHRP (Shift Right) 31-241 |
|
31.15.3 |
SAR and SARP (Arithmetic Shift Right) 31-251 |
|
31.15.4 |
SAR and SARP (Arithmetic Shift Right) 31-260 |
|
31.16 |
Operation (Rotation Instruction) 31-269 |
|
31.16.1 |
ROL and ROLP (Rotate Left) 31-269 |
|
31.16.2 |
ROR and RORP (Rotate Right) 31-279 |
|
31.16.3 |
RCL and RCLP (Rotate Left with Carry Over) 31-289 |
|
31.16.4 |
RCR and RCRP (Rotate right with carry over) 31-299 |
|
31.17 |
Function Instruction (Calculation) 31-309 |
|
31.17.1 |
SUM/SUMP (Total) 31-309 |
|
31.17.2 |
AVE/AVEP (Average) 31-319 |
|
31.17.3 |
SQRT/SQRTP (Square Root) 31-329 |
|
31.17.4 |
BCNT/BCNTP (Bit Count) 31-334 |
|
31.17.5 |
PID 31-339 |
|
31.18 |
Function Instruction (Trigonometric Function) 31-355 |
|
31.18.1 |
SIN and SINP (Sine) 31-355 |
|
31.18.2 |
COS and COSP (Cosine) 31-360 |
|
31.18.3 |
TAN and TANP (Tangent) 31-365 |
|
31.18.4 |
ASIN and ASINP (Arc Sine) 31-370 |
|
31.18.5 |
ACOS and ACOSP (Arc Cosine) 31-375 |
|
31.18.6 |
ATAN and ATANP (Arc Tangent) 31-380 |
|
31.18.7 |
COT and COTP (Cotangent) 31-385 |
|
31.18.8 |
EXP and EXPP (Exponential) 31-390 |
|
31.18.9 |
LN and LNP (Logarithm) 31-395 |
|
31.18.10 |
LG10 and LG10P (Log Base 10) 31-400 |
|
31.19 |
Compare Instruction (Arithmetic) 31-405 |
|
31.19.1 |
EQ (=) 31-405 |
|
31.19.2 |
GT (>) 31-410 |
|
31.19.3 |
LT (<) 31-415 |
|
31.19.4 |
GE (>=) 31-420 |
|
31.19.5 |
LE (<=) 31-425 |
|
31.19.6 |
NE (<>) 31-430 |
|
31.20 |
Compare (Time) 31-435 |
|
31.20.1 |
JEQ (Equal) 31-435 |
|
31.20.2 |
JGT (>) 31-439 |
|
31.20.3 |
JLT (<) 31-443 |
|
31.20.4 |
JGE (>=) 31-447 |
|
31.20.5 |
JLE (<=) 31-451 |
|
31.20.6 |
JNE (<>) 31-455 |
|
31.21 |
Compare (Date) 31-459 |
|
31.21.1 |
NEQ (=) 31-459 |
|
31.21.2 |
NGT (>) 31-463 |
|
31.21.3 |
NLT (<) 31-467 |
|
31.21.4 |
NGE (>=) 31-471 |
|
31.21.5 |
NLE (<=) 31-475 |
|
31.21.6 |
NNE (<>) 31-479 |
|
31.22 |
Convert (Data) 31-483 |
|
31.22.1 |
BCD/BCDP (BCD Convert) 31-483 |
|
31.22.2 |
BIN/BINP (BIN Convert) 31-489 |
|
31.22.3 |
ENCO/ENCOP (Encode) 31-495 |
|
31.22.4 |
DECO/DECOP (Decode) 31-501 |
|
31.22.5 |
RAD/RADP (Convert to Radians) 31-507 |
|
31.22.6 |
DEG/DEGP (Convert to Degrees) 31-512 |
|
31.22.7 |
SCL/SCLP (Scale Convert) 31-517 |
|
31.23 |
Convert Type 31-523 |
|
31.23.1 |
I2F/I2FP (Integer to Float Convert) 31-523 |
|
31.23.2 |
I2R/I2RP (Integer to Real Convert) 31-530 |
|
31.23.3 |
F2I/F2IP (Float to Integer Conversion) 31-537 |
|
31.23.4 |
F2R/F2RP (Float to Real Convert) 31-544 |
|
31.23.5 |
R2I/R2IP (Real to Integer Convert) 31-551 |
|
31.23.6 |
R2F/R2FP (Real to Float Convert) 31-558 |
|
31.23.7 |
H2S/H2SP (Time to Seconds) 31-565 |
|
31.23.8 |
S2H/S2HP (Seconds to Time) 31-571 |
|
31.24 |
I/O Driver Instructions 31-577 |
|
31.24.1 |
SDOR, SDOW, DGMT, DGSL (CANopen Driver) 31-577 |
|
31.24.2 |
PLSX (STD driver) 31-582 |
|
31.24.3 |
PLSXY (STD driver) 31-584 |
|
31.24.4 |
PLSG (STD driver) 31-587 |
|
31.24.5 |
PLS (STD driver) 31-590 |
|
31.24.6 |
PLSQ (STD driver) 31-593 |
|
31.24.7 |
PWMX (STD driver) 31-595 |
|
31.24.8 |
PWMG (STD driver) 31-598 |
|
31.24.9 |
PWM (STD driver) 31-600 |
|
31.24.10 |
PWMQ (STD driver) 31-602 |
|
31.24.11 |
HSCX (STD driver) 31-604 |
|
31.24.12 |
HSCG (STD driver) 31-607 |
|
31.24.13 |
HSC (STD driver) 31-610 |
|
31.24.14 |
HSCQ (STD driver) 31-612 |
|
31.24.15 |
PCH (STD driver) 31-614 |
|
31.24.16 |
PCHQ (STD driver) 31-616 |
|
31.24.17 |
Restrictions for I/O Driver Instructions 31-618 |
|
|
|
|
|
Back to the top of chapter Back to the top of page |