ProSoft Technology MVI56-BAS User Manual
Page 185

MVI56-BAS ♦ ControlLogix Platform
BASIC CALLs Syntax
BASIC Module (DB/BAS Compatible)
User Manual
ProSoft Technology, Inc.
Page 185 of 234
December 13, 2011
9.9
Background CALLs
9.9.1 ASCII Background CALLs
CALL 22: Transfer Data from a Serial Port to CLX
Use CALL 22 to transfer data from PRT1 or PRT2 serial ports to the CLX
processor. After this CALL is executed, the selected serial port will continue
receiving data until the maximum number of characters is reached or the
character delimiter is received. At this point all data is transferred to the CLX
processor.
For more information about CALL 22 usage, refer to ASCII Data Transfer from
MVI56-BAS Serial Port to CLX (page 75)
Syntax:
PUSH [A]
PUSH [B]
PUSH [C]
PUSH [D]
PUSH [E]
PUSH [F]
PUSH [G]
CALL 53
POP [H]
Where:
A = serial port number (0 = CALL 22 disabled, 1 = PRT1, 2 = PRT2)
B = maximum number of characters
The valid range depends on which destination file is selected:
1 to 60 for CLX input image file
1 to 198 for MSG instruction
1 to 251 for internal string
C = decimal value of character delimiter
D = destination file
0 = CLX input image file
1 = MSG instruction
2 = CLX input image file and internal string
3 = MSG instruction and internal string
4 = Internal string
E = word offset within the destination file
If using the CLX input image as the destination file the word offset should be 2
Minimum, because words 0 and 1 are reserved.
This parameter has no effect when internal string is selected (it will always start
on the third character)
F = string number (if destination file is a string)
G = byte swap (0 do not swap bytes , 1 swap bytes)