ProSoft Technology MVI56-BAS User Manual
Page 35

MVI56-BAS ♦ ControlLogix Platform
BASIC Programming
BASIC Module (DB/BAS Compatible)
User Manual
ProSoft Technology, Inc.
Page 35 of 234
December 13, 2011
3.2
Using CALLs
There are several pre-defined functions in BASIC referred to as CALLs. Each
CALL can have zero or more input parameters and return zero more output
values. The module uses the argument stack to read the input parameters and
write the output results. The input parameters and the output result(s) are both
located in the argument stack.
PUSH
and
POP
commands are used with CALL
functions that require input and output variables.
For example, if a CALL function requires 3 input parameters and returns 2 output
values, it should be used in a BASIC program in the following way:
PUSH 4
PUSH 2
PUSH 4
CALL [CALLNUMBER]
POP D
POP E
The variables D and E will store the 2 output values returned by this CALL. The
BASIC CALLs Syntax section provides information about each call supported by
the MVI56-BAS.