105
123.456.789.000 15
Error
123456
7
3
+000111.2 9
1112
1112 9
1
12.0000 7
Error
120000
7 4
12.0000 6
12000
12000
6 3
Convert number to text
This function converts a binary value from register (get X) to text. The result is written
into buffer starting with (store result) register. Separate text characters are stored in low
order bytes of 16 bit registers. Get Y defines converted number's format.
get Y:
- unit number defines the number of digits after comma in resultant format.
- tens number defines number of digits before comma , 0 – automatically
+ 100 – sets delimiter to ‘,’ instead of ‘.’
+ 200 – forces adding a sign before positive value.
Furthermore, the function writes the resultant number's length in characters to AUX_RET1
register.
If the converted number is larger then allowed range, the function does not perform the
conversion and raises an error flag.
Examples:
get X
get Y
store result
AUX_RET1
0 0 0
1
123 0
123
3
-1234 0
-1234
5
12345 2
123.45
6
123456 103
123,456
7
123456 23
Error
---
0 323 +00,000
7
-15 323 -00,015
7
-15 50
-00015
6
Summary of Contents for MT-101
Page 1: ......
Page 129: ...126 11 7 Drawings and dimensions ...