VR10SLnToBin
V = Variables
R = Reading functions
SIGNED LONG —→ BINARY
The VR10SLnToBin function converts a Signed Long variable type (long with sign) in a Binary variable type.
IMPLEMENTATION
VR10SLnToBin (value, index, array, errcode)
Parameters:
IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
---|---|---|---|---|
IN | GLOBAL | value | L | 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 + 3” items) |
OUT | GLOBAL | errcode | F | Variable that indicates a possible error on the function |
Errcode
After calling the function, 'errcode' can take certain values, the meaning of these values is summarized below:
0: No error
Example
Transforms the value 80000 (signed long) in a binary value
value = 80000 index = 1 VR10SLnToBin (value, index, array, errcode) ;On the array will be : ; array[1] = 0 ; array[2] = 1 ; array[3] = 56 ; array[4] = -128