Delta AH500 — 6.21.2 Explanation of String Processing Instructions

AH500 Programming Manual Symbol: S 1 : Floating-point number Double word S 2 : Number of places Word D : Conversion result Word Explanation: 1. The decimal point in the floating-point number in S 1 is moved to the right in accordance with the setting of S 2 first, and then the result is converted into the binary-coded decimal floating-point number. The final conversion result is stored in D . S1 +1 S1 Sign D Floating-point number Seven-digit binary-coded decimal number D +1 S2 Binary-coded decimal floating-point number Sign (Exponent) D D +2 +3 The binary-coded decimal floating-point number format: S 2 :

The number of places Number of places Exponent D +4 The value in S 2 should be within the range between 0 and 7. D : If the floating-point number in S 1 is a positive number, the value in D is 0. If the floating-point number in S 1 is a negative number, the value in D is 1. ( D +2, D +1): The seven-digit binary-coded decimal number converted from the floating-point number D +3: If the exponent is a positive number, the value in D +3 is 0. If the exponent is a negative number, the value in D +3 is 1. D +4: The exponent If the floating-point number in S 1 is -0.03225547 and the value in S 2 is 4, the conversion result is as follows.

( ) S1+1,S1 1 D 16 # 3225550 D +1 S2 4 4 Number of places 1 D D +2 +3 D +4 Since the value in S 2 is 4, the decimal point in the floating-point number in S 1 is moved to the right by four decimal places. The floating-point number in S 1 becomes -322.5547. -322.5547 is equal to -3225547E-4.

The binary-coded decimal floating-point number format is 6-496 API Instruction code Operand Function 2120 FMOD P S , S , D 1 2 Converting the floating-point number into the binary-coded decimal floating-point number 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-8 steps) 64-bit instruction AH500 AH500 - 0.0322 5547