Call 81 – user memory module check and description, Example: (for saving 2 variables), Purpose – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 69: Syntax

Advertising
background image

Publication 1746-RM001A-US-P

Command Line CALLs 5-3

Example: (For saving 2 variables)

>PRINT MTOP

24575

>PRINT MTOP-12

24563

>PUSH 24563:REM NEW MTOP ADDRESS

>CALL 77

>1

REM EXAMPLE PROGRAM

>10

K = 678*PI

>20

L = 520

>30

PUSH K

>40

ST@ 24575 : REM STORE K IN PROTECTED AREA

>50

PUSH L

>60

ST@ 24569 : REM STORE L IN PROTECTED AREA

>70

REM TO RETRIEVE PROTECTED VARIABLES

>80

LD@ 24575 : REM REMOVE K FROM PROTECTED AREA

>90

POP K

>100 LD@ 24569 : REM REMOVE L FROM PROTECTED AREA

>110 POP L

>120 REM USE LD@ AFTER POWER LOSS AND BATTERY BACK-UP IS USED

CALL 81 – User Memory
Module Check and
Description

Purpose

Use CALL 81 to check the user memory module before burning a program into the
memory module. This routine:

determines the number of memory module programs

determines the number of bytes left in the memory module

determines the number of bytes in the RAM program

prints a message indicating if enough space is available in the memory module
for the RAM program

checks memory module checksum if program is found

prints a caution message is checksum fails

No PUSHes or POPs are needed.

Syntax

CALL 81

IMPORTANT

CALL 81 cannot detect a defective memory module.

Advertising