7 Applied Instructions
7.3 Arithmetic and Logical Operation
188
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
Cautions
1) Some restrictions to applicable devices
S1:The FX
3U, FX3UC and FX3G PLCs only are applicable.
S2:The FX
3U and FX3UC PLCs only are applicable.
S3:Available only for a 16-bit operation. Not available for a 32-bit operation.
2) When handling array data or 32-bit data in a structured program, a 16-bit device cannot be specified
directly as in the case of a simple project. Use a label to handle array data or 32-bit data.
A 32-bit counter can be specified directly as it is a 32-bit long device.
Use a global label to specify a device.
3) The FX
0, FX0S or FX0N PLC does not support the instructions of pulse operation type.
To execute pulse operation, make the instruction execution condition pulse type.
4) When a 32-bit operation (DMUL or DMULP) is used, "Z" cannot be specified to the device specified by
.
5) In monitoring the operation results by a programming tool, 64-bit data as the operation results cannot be
monitored at one time even if a word device is used.
In such a case, the FX
3U, FX3UC and FX3G PLCs can use floating point operation.
→ For the floating point operation, refer to Section 7.12.
Program examples
1. 16-bit operation
2. 32-bit operation
Function changes according to versions
Compatible versions
Item Function summary
FX3U FX3UC FX3G
Ver. 2.30 or
later
Ver. 2.30 or
later
Ver. 1.00 or
later
Zero flag
Turns the special device M8304 ON when the operation result of MUL
instruction is 0.
(D 0) × (D 2) × (D 5, D 4)
8 9 72
X000
D0
D2
MUL
EN
s1
s2
ENO
d
Var_MUL
*1
*1 Var_MUL is a global label and is defined as D4.
[Structured ladder]
[ ST ]
MUL(X000, D0, D2, Var_MUL
*1
);
(D 1,D 0) × (D 3,D 2) × (D 7,D 6,D 5,D 4)
1756 327 574,212
X001
Var_d3
*3
Var_s1
*1
DMUL
EN
s1
s2
ENO
d
Var_s2
*2
*1 Var_s1 is a global label and is defined as D0.
*2 Var_s2 is a global label and is defined as D2.
*3 Var_d3 is a global label and is defined as D4.
[
Structured ladder
]
[ ST ]
DMUL(X001, Var_s1
*1
, Var_s2
*2
, Var_d3
*3
);