en:software:qview:qview_6:qcl_library:vr10ubytobin

This is an old revision of the document!


VR10UByToBin

V = Variables

R = Reading function

UNSIGNED BYTE —→ BINARY

The VR10UbyToBin function Converts a variable of Unsigned Byte type (byte without sign) in a variable of Binary type.

VR10UByToBin (value, index, array, errcode)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
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 at least “index” elements)
OUT GLOBAL errcode F Variable that indicates a possible error on the function

After calling the function, 'errcode' can take certain values, the meaning of these values is summarized below:
0: No error
1: Error: the return data is less than 0 or greater than 255

Esempio

Trasforma il valore 200 (unsigned byte) in un valore binario

value = 200
index = 1
 
VR10UbyToBin (value, index, array, errcode)
 
;Sull'array si troverà :
; array[1] = -56

Note

  • Last modified: 2019/08/29 17:18