ProSoft Technology MVI56-BAS User Manual
Page 117

MVI56-BAS ♦ ControlLogix Platform
BASIC CALLs Syntax
BASIC Module (DB/BAS Compatible)
User Manual
ProSoft Technology, Inc.
Page 117 of 234
December 13, 2011
CALL 56: Transfer Data from CLX to BASIC Input Buffer using MSG
Use CALL 56 to transfer up to 100 words from a CLX data file to the MVI56-BAS
input buffer (starts at address 100) using ladder MSG instruction. The MSG
instruction has to be executed before CALL 56 execution.
The ladder MSG instruction has the following parameters.
Syntax:
PUSH [A]
CALL 56
POP [B]
Where:
A = number of words to be transferred
B = transfer status
The parameter B can assume one of the following values:
0 = Successful Transfer and CLX in Run Mode
1 = Successful Transfer and CLX in Program Mode
2 = Successful Transfer and CLX in Test Mode
10 = Illegal length
Example:
.
.
210 GOSUB 720
.
.
700 REM This routine copies the latest CLX
710 REM MSG write data to the BASIC Input Image
720 PUSH 100: CALL 56: POP X
730 IF(X=10) THEN PRINT "Illegal CALL 56 Input Parameter"
740 IF(X=0) THEN RETURN
750 PRINT "CLX is not in RUN mode"
760 RETURN