Run -22, Syntax, Example – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 62: Purpose

Advertising
background image

Publication 1746-RM001A-US-P

4-22 BASIC Commands

When you enter RROM [integer], the module selects that program out of
EEPROM memory, makes it the current program, and starts program execution. If
no integer is typed after the RROM command (example:

RROM

) the module

defaults to RROM 1. Since the programs are stored in sequence in EEPROM, the
integer following the RROM command selects the program the user wants to run
or list. If you attempt to select a program that does not exist (example: you type

RROM 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 ROM
mode is selected. If you attempt to alter a program in ROM mode by typing in a
line number, the message

ERROR: PROM MODE

is displayed. The XFER command

allows you to transfer a program from EEPROM to RAM for editing purposes. You
do not get an error message if you attempt to edit a line of RAM program.

Since the RROM 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, 71, and 72. You can also
use all of the RAM for variable storage if the program is stored in EEPROM. The
system control value MTOP always refers to RAM. The system control value LEN
refers to the currently selected program in RAM or ROM.

Syntax

RROM[integer]

Example

READY

>RROM

RUN

Purpose

Use the RUN command to set all variables equal to zero, clear all BASIC evoked
interrupts, and begin program execution with the first line number of the selected
program. The RUN command and the GOTO statement are the only ways you
can place the module interpreter into Run mode from Command mode. Terminate
program execution at any time by pressing

[CTRL-C]

on the console device.

Syntax

RUN

IMPORTANT

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

Advertising