Rom tip – Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 147

Advertising
background image

Chapter
Commands

10

10 -17

Use the ROM command to tell the BASIC module interpreter to select the
current program out of EEPROM or EPROM. Use a LIST command (page
10 -9) to display and a RUN command (page 10 -19) to execute the
current program.

The execution time for a program running in ROM is the same as a
program running from RAM. There is no performance improvement on a
BASIC program by moving it to RAM.

Important: Your BASIC module can execute and store up to 255
programs in EEPROM depending on the size of the programs and the
capacity of the EEPROM. The programs are stored in a sequence string,
referred to as the EEPROM file, in EEPROM for retrieval and execution.

When you enter ROM integer, the BASIC module selects that program out
of EEPROM memory and makes it the current program. If no integer is
typed after the ROM command (ex.

ROM

) the module defaults to ROM 1.

Since the programs are stored in sequence in EEPROM, the integer
following the ROM command selects the program you want to run or list.
If you attempt to select a program that does not exist (ex. you type

ROM 8

and only 6 programs are stored in the EEPROM) the message

ERROR:

PROM MODE

is displayed.

The module does not transfer the program from EEPROM to RAM when
you select the ROM mode. If you attempt to alter a program in the ROM
mode by typing in a line number, the message

ERROR: PROM MODE

is

displayed. The XFER command (page 10 -21) allows you to transfer a
program from EEPROM to RAM for editing purposes.

Important: When you transfer programs from EEPROM to RAM you lose
the previous RAM contents.

Since the ROM command does not transfer a program to RAM, it is
possible to have different programs in ROM and RAM simultaneously.
You can move back and forth between the two modes when in Command
mode. If you are in Run mode, you can change back and forth using
CALLs 70 (page 13 -2), 71 (page 13 -3), and 72 (page 13 -4). You can
also use all of the RAM for variable storage if the program is stored in
EEPROM. The system control value MTOP (page 9 -18) always refers to
RAM. The system control value LEN (page 9 -17) refers to the program
currently in RAM or ROM.

Syntax

ROM

integer

Return

Example

READY

>ROM 1

ROM

Tip

Advertising