Mitsubishi Electric M800VW Series Programming Manual page 203

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
/
 Divides BIN 16-bit data designated by (S1) and BIN 16-bit data designated by (S2), and stores the division result in the
device designated by (D).
S1
b15
b0
b15
/
5678 (BIN)
 If a word device has been used, the result of the division operation is stored as 32 bits, and both the quotient and remainder
are stored.
Quotient: Stored at the lower 16 bits
Remainder: Stored at the higher 16 bits
 The values for (S1) and (S2) can be designated between -32768 and 32767 (BIN 16 bits).
 Judgments whether (S1),(S2), and (D) are positive or negative are made on the basis of the most significant bit (b15 for
(S1) and (S2), and b31 for (D)).
b15/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 "*", "*P", "/", or "/P" instructions.
IB-1501667-B
Quotient
S2
b0
b15
1234 (BIN)
4 (BIN)
Remainder
D
D+1
b0
b15
b0
742 (BIN)
182

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents