Call 74 – battery-backed ram enable, Call 77 – protected variable storage – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual
Page 68

Publication 1746-RM001A-US-P
5-2 Command Line CALLs
CALL 74 –
Battery-Backed RAM
Enable
Purpose
Use CALL 74 to enable the battery-backed RAM. When this CALL is executed,
the message
Battery Backup Enabled
is printed on the host terminal.
Battery-backed RAM is enabled on module powerup and remains enabled until
you execute a CALL 73 or until the battery fails.
Syntax
CALL 74
Example
>CALL 74
Battery Backup Enabled
CALL 77 – Protected
Variable Storage
Purpose
Use CALL 77 to reserve the top of RAM memory for protected variable storage.
Values are saved if BATTERY-BACKUP is invoked. You store values with the ST@
command and retrieve them with the LD@ command. Each variable stored
requires 6 bytes of storage space.
You must subtract 6 times the number of variables stored from MTOP reducing
available RAM memory. This value is PUSHed onto the stack as the new MTOP
address. All appropriate variable pointers are reconsidered. Do this only in
Command mode.
Syntax
PUSH [new MTOP address]
CALL 77
IMPORTANT
Change CALL 77 from Command mode only to ensure proper
operation.
IMPORTANT
Do not let the ST@ address write over the MTOP address. This
could alter the value of a variable or string. The lowest setting
MTOP may be set to is 4096 (1000H).
IMPORTANT
Call 77 de-allocates all the string memory along with the string
contents. Therefore, make sure that you perform this CALL
before the execution of the string statement.