7 Applied Instructions
7.3 Arithmetic and Logical Operation
187
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied
Instructions
8
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
2. 32-bit operation(DMUL, DMULP)
The data specified by is multiplied by the data specified by in the binary format, and the
multiplication result is transferred to 64-bit (four word devices).
• The most significant bit of each piece of data indicates the sign (positive: 0 or negative: 1), and data is
multiplied algebraically.
(5,500×(-8,540)=-46,970,000)
• When a constant (K) is specified in or , it is automatically converted into the binary format.
• When a digit (K1 to K8) is specified for the device specified by , the result is obtained only for low-
order 32 bits, and is not obtained for high-order 32 bits.
Transfer the data to word devices once, then execute the operation.
Extension function(FXU and FX2C PLCs)
The FXU PLC of V2.30 or earlier does not support the extension function.
When executing an instruction with M8023 ON, a binary float operation takes place, for example, (D1, D0) ×
(D3, D2) = (D5, D4).
In this case, K, H and D are valid as the object device for and and D is valid for .
The source data needs to be converted into binary float value in advance by FLT instruction.
Note, however, that constants K and H are automatically converted into binary float values.
Related device
1. Relationship between the flag operation and the sign
*1. Available in the FX3U and FX3UC PLCs of Ver. 2.30 or later and FX3G PLC of Ver. 1.00 or later.
Device Name Description
M8304
*1
Zero
ON : When the operation result is 0
OFF : When the operation result is not 0
Command input
Label3
*1
Label2
*2
*1 This defines the multiplication data or the
device that stores the multiplication data.
*2 This defines the device that stores the
multiplication result.
Label1
*1
DMUL
EN
s1
s2
ENO
d
BIN
→ [ +3, +2, +1, ]
BIN BIN
[ +1, ] × [ +1, ]
32 bits
ds1
s2
s1
s2
d d d
32 bits 64 bits
(D51, D50) (D103, D102, D101, D100)
K100 × K150 → K15000
D100 is output to Y017 to Y000
D101 is output to Y037 to Y020
D102 is output to Y057 to Y040
D103 is output to Y077 to Y060
Command input
Var_d3
*3
*1 Var_s1 is a global label and is defined as D50.
*2 Var_s2 is a global label and is defined as K150.
*3 Var_d3 is a global label and is defined as D100.
*4 Var_IN1 is a global label and is defined as D100.
*5 Var_OUT1 is a global label and is defined as K8Y000.
*6 Var_IN2 is a global label and is defined as D102.
*7 Var_OUT2 is a global label and is defined as K8Y040.
Var_s1
*1
DMUL
EN
s1
s2
ENO
d
DMOV
EN
s
ENO
d
Var_OUT1
*5
DMOV
EN
s
ENO
d
Var_OUT2
*7
Var_IN1
*4
Var_IN2
*6
Var_s2
*2