VR10UByToAsc
V = Variables
R = Reading functions
UNSIGNED BYTE —→ ASCII
The VR10UByToAsc function converts an Unsigned Bytes variable type (byte without sign) in an Ascii variable type.
IMPLEMENTATION
VR10UByToAsc (value, index, array, errcode)
Parameters:
IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
---|---|---|---|---|
IN | GLOBAL | value | W | Data value to convert |
IN | GLOBAL | index | L | Index of the array element to start the “deposit” of the converted data |
OUT | ARRGBL | array | B | Array containing the converted data (must be declared with at least “index + 1” items) |
OUT | GLOBAL | errcode | F | Variable that indicates a possible error on function |
Errcode
After calling the function, ' errcode ' can take certain values, the meaning of these values is summarized below:
0: No error
1: Error: the data to be converted (value) is less than 0 or greater than 255
Example
Transforms the value 200 (unsigned byte) in an Ascii value
value = 200 index = 1 VR10UByToAsc (value, index, array, errcode) ;On the array will be : ; array[1] = 67 ; array[2] = 56