Delta DVP-ES3 — 6.21.2 Explanation of String Processing Instructions

Chapter 6 Applied Instructions 4. For 32-bit instructions, the operand S occupies six word devices, and the decimal ASCII code in S must be between -2147483648 to 2147483647. If the value in S is a string and does not include the ending character 16#00, the conversion can be up to 10 digits (sign excluded). b15 b8 b7 b0 b31 b0 S + 0  1234567890 D S + 1 S + 2 S + 3 S + 4 S + 5 5. If the first character is “ ” (a space), the sign is a positive sign. If the first character is “-”, the sign is a negative sign. Take the string “-234567890” for example. b15 b7 b31 b8 b0 b0 S + 0  -234567890 D S + 1 S + 2 S + 3 S + 4 S + 5 6.

If the first digit of the string in the device S is blank (16#20) + sign (16#2B), the value in S is processed as 0. For the 6_ second digit, if the number is not 0–9, the instruction treats it as the end of a string and no error message will be shown. For example if the word order is 16#20  16#31  16#32  16#2B, the conversion result is 12. 7. For 16-bit instructions, the string range in the device S is 1–6 (positive or negative signs included) and for 32-bit instruction the range is 1–11 (positive negative signs included). 8. Only the 32-bit instructions can use the 32-bit counter, but not the device E. Example 1 Suppose the values are D20=16#302D, D21=16#3433, D22=16#0035.

When the instruction executes, the value is D0=-345. 6-637 “ 2 “ “ 1 “ “ 4 “ “ 3 “ “ 6 “ “ 5 “ “ 8 “ “ 7 “ “ 0 “ “ 9 “ 16#00 16#00 ‘ 2 ‘ ‘ - ’ ‘ 4 ‘ ‘ 3 ‘ ‘ 6 ’ ‘ 5 ‘ ‘ 8 ‘ ‘ 7 ‘ ‘ 0 ’ ‘ 9 ‘ 16#00 16#00