en:software:qview:qview_6:qcl_library:vr10uwrtoasc

This translation is older than the original page and might be outdated. See what has changed.

VR10UWrToAsc

V = Variables

R = Reading functions

UNSIGNED WORD —→ ASCII

The VR10UWrToAsc function Converts a Unsigned Word variable type (word without sign) in an Ascii variable type.

VR10UWrToAsc (value, index, array, errcode)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
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 + 4” items)
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 data to be converted (value) is less than 0 or greater than 65535

Example

Transforms the value 40000 (unsigned word) in an Ascii value

value = 40000
index = 1
 
VR10UWrToAsc (value, index, array, errcode)
 
;On the array will be :
; array[1] = 57
; array[2] = 67
; array[3] = 52
; array[4] = 48

Note

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