Download Programming Manual (Safety Observation) [type
Transcript
5 SEQUENCE INSTRUCTIONS FOR MOTION CPU (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 → K32766 ........ Since bit 15 value is "0", (8000H) (0002H) (7FFEH) result of operation takes a positive value. K32767 - K-2 → K-32767 ....... Since bit 15 value is "1", (7FFFH) (FFFEH) (8001H) result of operation takes a negative value. [Error] 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. 5 - 31