AH500 Programming Manual API 2108 Symbol: S : Source value Word D 1 : Device in which the number of characters is stored Word/Double word D 2 : Device in which the binary number is stored Word/Double word Explanation: 1. The string in S is converted into binary number. The number of characters is stored in D 1 , the number of decimal places is stored in D 1 +1, and the binary number is stored in D 2 . 2. $ VAL : The operand S occupies five word devices at most. The number of characters contained in the string in S should be within the range between 2 and 8.
If there is a decimal point in the string in S , 16#2E should be stored between the first character after the sign character and the last character. Number of characters D1 S b15 b0 b7 b8 Number of decimal places D1+1 S+1 Binary number D2 S+2 S+3 . S+4 Sign First ASCII code ....................
Seventh AS CII code 6-464 Instruction code Operand Function D $VAL P S, D , D 1 2 Converting the string into the binary number Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S D 1 D 2 Pulse 16-bit instruction (7-13 steps) 32-bit instruction (7-13 steps) i t ti AH500 AH500 AH500 First ASCII code Sign Third A SCII code Second ASCII code Fifth ASCII code Fourth ASCII code Seventh AS CII code Sixth ASCII code 16#00