Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 221

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

DDIV(P)(_U)
These instructions divide the 32-bit binary data in the device specified by (s1) by the 32-bit binary data in the device specified
by (s2), and store the result in the device specified by (d).
Ladder diagram
(s1)
(s2)
(d)
FBD/LD
EN
ENO
s1
d
s2
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s1)
DDIV(P)
Dividend data or the head device where the
data to be divided by another is stored
DDIV(P)_U
(s2)
DDIV(P)
Divisor data or the head device where the data
by which another is to be divided is stored
DDIV(P)_U
(d)
DDIV(P)
Head device for storing the operation result
DDIV(P)_U
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s1)
(s2)
(d)
Processing details
• These instructions divide the 32-bit binary data in the device specified by (s1) by the 32-bit binary data in the device
specified by (s2), and store the division result in the device specified by (d).
(s1)
(s1)+1
(s2)+1
b31
b16 b15
b31
b16 b15
···
···
b0
···
123456 (BIN)
567890 (BIN)
÷
■Related flag
Device
Name
SM700
Carry
SM8304
Zero
SM8306
Carry
Word
T, ST, C, D, W,
U\G
SD, SW, R
(s2)
(d)
(d)+1
b31
b16 b15
···
b0
···
···
4 (BIN)
Description
When the operation result of the signed operation exceeds 32767, the carry flag is turned ON.
When the operation result is 0, the zero flag is turned ON.
When the operation result of the signed operation exceeds 32767, the carry flag is turned ON.
Structured text
ENO:=DDIV(EN,s1,s2,d);
ENO:=DDIVP(EN,s1,s2,d);
Range
Data type
-2147483648 to +2147483647
32-bit signed binary
0 to 4294967295
32-bit unsigned binary
-2147483648 to +2147483647
32-bit signed binary
0 to 4294967295
32-bit unsigned binary
64-bit signed binary
64-bit unsigned binary
Bit
Bit
Double word Indirect
specification
Z
LC
LZ
(d)+2
(d)+3
b31
b16 b15
b0
···
···
b0
74066 (BIN)
7.2 Arithmetic Operation Instructions
ENO:=DDIV_U(EN,s1,s2,d);
ENO:=DDIVP_U(EN,s1,s2,d);
Data type (label)
ANY32_S
ANY32_U
ANY32_S
ANY32_U
ANY32_S_ARRAY
(Number of elements:
2)
ANY32_U_ARRAY
(Number of elements:
2)
BOOL
BOOL
Constant
Others
K, H
E
$
7 BASIC INSTRUCTIONS
219
7

Hide quick links:

Advertisement

loading