Mitsubishi Electric M800VW Series Programming Manual page 206

Plc programming
Hide thumbs Also See for M800VW Series:
Table of Contents

Advertisement

M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.2 Arithmetic Operation Instructions
D/
 Divides BIN bit data designated by (S1) and BIN bit data designated by (S2), and stores the division result in the device
designated by (D).
S1+1
S1
b31
b16
b15
b0
567890 (BIN)
/
 If a word device has been used, the result of the division operation is stored as 64 bits, and both the quotient and remainder
are stored.
Quotient: Stored at the lower 32 bits
Remainder: Stored at the upper 32 bits
 The values for (S1) and (S2) can be designated between -2147483648 and 2147483647 (BIN 32 bits).
 Judgment whether values for (S1), (S2), (D), and (D)+2 are positive or negative is made on the basis of the most significant
bit (b31).
(A sign is used with both the quotient and the remainder)
b31
Judgment (+/-)
0
Positive
1
Negative
 When divisor S2 is "0", no operation is carried out.
 Operation errors
 There are no arithmetic errors associated with the "D*", "D*P, "D/", or "D/P" instructions.
 Program example
 When X5 is turned ON, multiplication result of BIN data of D7 and D8 and BIN data of D18 and D19 is stored in D1 to D4.
X5
0
5
 When X3 is turned ON, the data of X8 to XF is multiplied by 3.14 and the result is output to Y30 to Y3F.
X3
0
13
S2+1
S2
b31
b16
b15
b0
123456 (BIN)
[Ladder mode]
D*P D7 D18 D1
END
[Ladder mode]
*P K2X8 K314 D0
D/P D0 K100 D2
MOVP D2 K4Y30
END
D+1
D
D+3
b31
b16
b15
b0
b31
b16
4 (BIN)
74066 (BIN)
Steps
0
1
5
Steps
0
1
5
10
13
185
D+2
b15
b0
[List mode]
Inst.
Device
LD
X5
D*P
D7
D18
D1
END
[List mode]
Inst.
Device
LD
X3
*P
K2X8
K314
D0
D/P
D0
K100
D2
MOVP
D2
K4Y30
END
IB-1501667-B

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents