en:software:qview:qview_6:qcl_library:vr10lngtowrd

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

VR10LngtoWrd

V = Variable

R = Reading functions

The VR10LngtoWrd function breaks up a LONG variable into two variables of Word.
The function is passed the Long variable that will be broken up into two variables word: “Word high part” and “Word low part”.

VR10LngtoWrd (slLong,swWordUp,swWordDw)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN SYSTEM / GLOBAL SlLong L Long variable by break up
OUT SYSTEM / GLOBAL SwWordUp W Word that represents the UPPER part of the Long
OUT SYSTEM / GLOBAL SwWordDw W Word that represents the LOWER part of the Long

Example

MAIN:
 
slLong = AnAsse:setpos			        ;Loads the setpos a device on Long by break up
 
VR10LngtoWrd (slLong,swWordUp,swWordDw)	        ;Break up the Long variable
 
aswBuffer[200] = swWordDw			;Sets the lower part on the Buffer
aswBuffer[201] = swWordUp 			;Sets the upper part on the Buffer
 
......
.....
END

Note

  • If the variable is used to set 2 word on the switch buffer between Qmove and another device, remember that usually is passed before the lower variable and than the upper part. You will have the lower buffer on an element and the upper part to the next element.
  • Last modified: 2019/08/29 17:01