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”.

IMPLEMENTATION

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