ProSoft Technology MVI56-BAS User Manual

Page 63

Advertising
background image

MVI56-BAS ♦ ControlLogix Platform

Using the Program Port (PRT1)

BASIC Module (DB/BAS Compatible)

User Manual

ProSoft Technology, Inc.

Page 63 of 234

December 13, 2011

5.8

Program Copies

The BAS module tokenizes each line that is typed into the module. That is, it

searches the line for BASIC commands, statements, and operators. These

commands, statements, and operators are replaced with a single character non-

printable token. This is the reason that "XRAM.BAS" and "EPROM.BAS" do not

look anything like the program that you originally typed in. If you want to save a

printable copy of the program, you have two options. First, you can log the data

received by your terminal emulation software and LIST the program to the

screen. Or, you can EXPORT your program to a file on the Compact Flash. For

example,

Ready
>export "myprog.txt"

Then, exit to DOS and use RY.EXE to copy the program to your host computer.

Do not EXPORT to "XRAM.BAS", "BATTERY.BAS", or "EPROM.BAS"!
You can actually recover programs by using the LOAD command. For example,

Ready
>load "myprog.txt"

At first glance, this approach appears to be a way to backup and recover BASIC

programs. However, only the XRAM part of the backup data is stored here. The

ASCII port (PRT1 and PRT2) parameters, the DH-485 port parameters,

PGMPRT parameters, and other things are stored as a raw data structure in

"BATTERY.BAS". Further, the EPROM programs are stored in "EPROM.BAS".

For a full backup, "XRAM.BAS", "BATTERY.BAS", and "EPROM.BAS" must all

three be backed up and recovered.

Advertising