Mitsubishi Electric MELSEC Q Series Programming Manual page 172

Motion controller
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 SEQUENCE INSTRUCTIONS FOR MOTION CPU
[Error]
(2) BIN 16-bit subtraction operation (-)
• Subtracts 16-bit BIN data designated by (S1) from 16-bit BIN data designated
by (S2) and stores the result of the subtraction at the device designated by (D).
• Values for (S1), (S2) and (D) can be designated between -32768 and 32767
(BIN, 16 bits).
• The judgment of whether data is positive or negative is made by the most
significant bit (b15).
0: Positive
1: Negative
• The following will happen when an underflow or overflow is generated in an
operation result: The carry flag in this case does not go ON.
K-32768
- K2
(8000H)
(0002H)
K32767
- K-2
(7FFFH)
(FFFEH)
When the same device is specified in (S1) and (d) or (S2) and (d), a sequence
program error occurs, the safety observation errors (SM57) are turned ON and error
code (SD32): 10, detail code (SD33): 2700H are stored.
→ K32766 ........ Since bit 15 value is "0",
(7FFEH)
result of operation takes a positive value.
→ K-32767 ....... Since bit 15 value is "1",
(8001H)
result of operation takes a negative value.
5 - 31

Advertisement

Table of Contents
loading

Table of Contents