Delta AH500 — 6.2.2 Explanation of Arithmetic Instructions

Chapter 6 Applied Instructions API 0104 Symbol: S 1 : Augend Double word/Long word S 2 : Addend Double word/Long word D : Sum Double word/Long word Explanation: 1. The floating-point number in S 2 is added to the floating-point number in S 1 , and the sum is stored in D . 2. The addition of 32-bit single-precision floating-point numbers:  When the operation result is zero, SM600 is ON.  When the absolute value of the operation result is less than the value which can be represented by the minimum floating-point number, the value in D is 16#FF7FFFFF.

 When the absolute value of the operation result is larger than the value which can be represented by the maximum floating-point number, the value in D is 16#7F7FFFFF. 3. The addition of 64-bit double-precision floating-point numbers:  When the operation result is zero, SM600 is ON.  When the absolute value of the operation result is less than the value which can be represented by the minimum floating-point number, the value in D is 16#FFEFFFFFFFFFFFFF.  When the absolute value of the operation result is larger than the value which can be represented by the maximum floating-point number, the value in D is 16#7FEFFFFFFFFFFFFF. The addition of single-precision floating-point numbers:

When X0.0 is ON, the addend 16#4046B852 in (D21, D20) is added to the augend 16#3FB9999A in (D11, D10), and the sum 16#4091C28F is stored in (D31, D30). 16#4046B852, 16#3FB9999A, and 16#4091C28F represent the floating point numbers 3.105, 1.450, and 4.555 respectively. Example: 6-45 Instruction code Operand Function D F+ P S , S , D 1 2 Addition of floating-point numbers Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S 1            S 2            D           Pulse instruction 32-bit instruction (7-9 steps) 64-bit instruction (7-9 steps) AH500 AH500 AH500