ProSoft Technology MVI56-BAS User Manual
Page 207

MVI56-BAS ♦ ControlLogix Platform
BASIC-52 Implementation
BASIC Module (DB/BAS Compatible)
User Manual
ProSoft Technology, Inc.
Page 207 of 234
December 13, 2011
Operator /
Statement
Description
Example
LOAD
LOAD loads a program into RAM from
a DOS ASCII file.
LOAD "PROGAB.TXT"
MODE
Sets the port parameters of ports
PRT1, PRT2, and DH-485
MODE(PRT1,19200,N,8
NEXT
NEXT returns the FOR-TO-(STEP)-
NEXT loop to the beginning of the
loop and add the value of the
increment
10 FOR A=0 TO 10
20 PRINT A
30 NEXT A
40 END
NEW
Deletes the program currently stored
in RAM memory, sets all variables to
zero, and clears all strings and BASIC
interrupts
NEW
NULL
ONDF1
ONERR
Handles arithmetic errors during
program execution. The program
execution jumps to the specified line
number
ONERR 500
ON/GOTO
Allows the program to select which
line to jump to next.
ON A GOTO 100,200,500
ON/GOSUB
Allows the program to select which
subroutine to execute next.
ON B GOSUB 100,300,900
ONTIME
Compensates for the incompatibility
between timer/counters on the
microprocessor and the MVI56-BAS
module
ONTIME 2, 100
PH0.
Print data in hexadecimal.
PH0. A,Z
PH1.
Print data in hexadecimal. Four hex
digits will always be printed.
PH1. A,B
POP
POP arguments off the argument
stack.
POP A,B,Z
PRERR
Prints the last error description and
error line number to the program port.
PRERR
PRINT transmits data out the serial
port. The # and @ operators can be
used with the PRINT.
PRINT A,CHR(N)
PRINT@ Z
PRINT# LB
PROG
Writes the current program in RAM
memory to the Compact Flash (ROM)
PROG
PROG0
Returns the module to normal
operation after a PROG2 command
PROG0
PROG1
Loads the port configuration during
power up
PROG1
PROG2
After a PROG2 command, the module
will load the first program at ROM
(using the PROG command) at power
up
PROG2