beautypg.com

Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual

Page 48

background image

Operating Functions

Chapter 5

5–11

5.3.11.1 RAM

When you enter RAM(cr), the BASIC Module

selects the current

program from

RAM MEMORY.

Important: RAM

space is limited to 13 K bytes. Use the following

formula

to calculate the available user RAM space:

LEN system

control value which contains current RAM

program length

+# bytes allocated

for strings (first value in the STRING

instruction)

+6 * each array

size + 1 (asterisk = multiply)

+8 * each variable

used (including each array name)

+1024
V

– number of

bytes reserved for BASIC

Available

user RAM= MTOP–V

5.3.11.2 ROM

When you enter ROM [integer],

the BASIC Module selects the current

program out

of EPROM memory. If no integer is typed after the

ROM command (i.e.

ROM) the module defaults to ROM 1. Since the

programs are

stored in sequence in EPROM, the integer following

the ROM command

selects which program the user wants to run or

list. If you attempt

to select a program that does not exist (e.g. you type

in ROM 8 and only

6 programs are stored in the EPROM) the

message ERROR: PROM MODE is

displayed.

The module

does not transfer the program from EPROM to RAM when

the

ROM mode is selected. If you attempt to alter a program in

the ROM mode, by typing in a line

number, the message ERROR:

PROM MODE displays.

The XFER command allows you to transfer

a program from

EPROM to RAM for editing purposes. You get no

error message if

you attempt to edit a line of ROM program.

Important: When

you transfer programs from EPROM 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, 71 and 72. You can also use all of the RAM memory
for variable storage if the program is stored in EPROM. The

system

control value – MTOP always refers

to RAM. The system control value,

LEN, refers

to the currently selected program in RAM or ROM.

5.3.11
Commands: RAM and ROM
[integer] (continued)