beautypg.com

ProSoft Technology MVI56-BAS User Manual

Page 193

background image

MVI56-BAS ♦ ControlLogix Platform

BASIC CALLs Syntax

BASIC Module (DB/BAS Compatible)

User Manual

ProSoft Technology, Inc.

Page 193 of 234

December 13, 2011

0 = CLX input image file
1 = CLX MSG instruction
2 = internal string
3 = CLX input image file and internal string
4 = CLX MSG instruction and internal string
If number 2 is selected (internal string) the best technique is to use CALL 29 after

CALL 122 in order to transfer the string. Using CALL 29 does not require ladder

logic to transfer data.
I = word offset within destination file. If the CLX input image file is the selected

destination file, the offset cannot be 0 or 1 because these are reserved words.
J = string number. If the destination file is not an internal string this value is

ignored.
K = CALL 122 status code:
0 = successful setup
1 = disabled
2 = bad input parameter
3 = DF1 not enabled
4 = string too small
5 = string not dimensioned
CALL 122 copies the transfer status code to the CLX input image file 1. A value 0

indicates that the transaction was successful.

Example:

.
.
.
50 PUSH 5,200,2,4,4,10: CALL 108
.
.
.
90 PUSH 5,0,7,ASC(N),0,20,10,1,0,0: CALL 122: POP STATUS
100 IF(STATUS<>0) THEN PRINT "Unsuccessful CALL 122 Setup"
110 REM CALL 122 remains active as long as BASIC
120 REM continues to RUN.
.
.
.