System control values, Data transfer support routines – Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual

Page 89

Advertising
background image

Operating Functions

Chapter 5

5–52

The system control values determine how memory is allocated by the
BASIC Module.

5.6.2.1
MTOP

After reset, the BASIC Module sizes the external memory and assigns the
last valid memory address to the system control value, MTOP. The module
does not use any external RAM memory beyond the value assigned to
MTOP.

Examples:

uPRINT MTOP

or

PH0. MTOP

14335

37FFH

5.6.2.2
LEN

The system control value, LEN, tells you how many bytes of memory the
currently selected program occupies. This is the length of the program and
does not include the size of string memory, variables and array memory
usage. You cannot assign LEN a value, it can only be read. A NULL
program (i.e. no program) returns a LEN of 1. The 1 represents the end of
program file character.

Important: The BASIC Module does not require any “dummy”
arguments for the system control values.

The BASIC Module communicates with the host processor using
block-transfer communications. The host processor sends variable length
blocks of data to the module. You can transfer a maximum of 64 words in
and 64 words out per scan. The module responds with the requested block
length of data. The module has an auxiliary processor dedicated to
servicing of the block-transfers to and from the host processor. These
support routines provide the communications link between the host
processor and the BASIC processor. The block-transfer-read (BTR) buffer
resides at address 7800H and is 128 bytes long. You can examine the
values in the buffer using the XBY command, i.e. PRINT XBY(7800H).

The block-transfer-write (BTW) buffer resides at one of two starting
addresses; 7B00H or 7C00H . Examine addresses 7D0 AH and 7D0BH
which point to the proper starting address. 7D0AH contains the high byte
of the address and 7D0BH contains the low byte of the address. The BTW
buffer is also 128 bytes long. You can also examine these values in the
buffer using the XBY command.

5.6.2
System Control Values

5.7
Data Transfer Support
Routines

Advertising