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

Page 128

Advertising
background image

Operating Functions

Chapter 5

5–91

Example:

For using protected variable storage area.

A. Scalar Variables

Push all variables in one line:

uPRINT MTOP
14335

uPRINT MTOP-24
14311

uPUSH 14311:REM NEW MTOP ADDRESS
CALL 77

90 M1=14335 : REM BEGIN STORING HERE
100 PUSH A, B, C, D

Use the ST @ and LD @ commands in a DO loop:

u200 DO

u210 ST @ M1

u220 M1=M1-6 : REM EACH VARIABLE =6 BYTES

u230 UNTIL M1=MTOP: REM YOU DEFINED THE NEW MTOP W/CALL 77

u290 M1=14335

u300 DO

u310 LD @ M1

u320 M1 = M1-6

u330 UNTIL M1 = MTOP

u360 POP A, B, C, D

u370 PRINT A, B, C, D

5.11.6
Protected Variable
Storage – CALL 77
(continued)

Advertising