Delta AH500 — 6.2.2 Explanation of Arithmetic Instructions

AH500 Programming Manual S +1 +1 S S 2 2 S 1 1 / = D D +1 D +3 D +2 Quotient Remainder The operand D occupies two devices. The quotient is stored in ( D +1, D ), and the remainder is stored in ( D +3, D +2). Example: When X0.0 is ON, the constants 5000 and 200 are converted into the binary-coded decimal values which are stored in D0 and D1 respectively. The binary-coded decimal value in D0 is divided by the binary-coded decimal value in D1. The quotient and the remainder are stored in D10 and D11 respectively. Additional remark: 1. If the divisor is 0, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2012. 2.

If the value in S 1 or the value in S 2 exceeds the range of values which can be represented by the binary-coded decimal values, i.e. 0~9999, the instruction B/ is not executed, SM0 is ON, and the error code in SR0 is 16#200D (The binary-coded decimal value is represented by the hexadecimal number, but one of digits is not within the range between 0 and 9.). 3. If the value in S 1 or the value in S 2 exceeds the range of values which can be represented by the binary-coded decimal values, i.e.

0~99999999, the instruction DB/ is not executed, SM0 is ON, and the error code in SR0 is 16#200D (The binary-coded decimal value is represented by the hexadecimal number, but one of digits is not within the range between 0 and 9.). 4. The instruction does not support SM600, SM601 and SM602. 5. If the operand D used during the execution of the 16-bit instruction is declared in ISPSoft, the data type will be ARRAY [2] of WORD/INT. 6. If the operand D used during the execution of the 32-bit instruction is declared in ISPSoft, the data type will be ARRAY [2] of WORD/INT. 6-60