Purpose, Syntax – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 163

Advertising
background image

Publication 1746-RM001A-US-P

Output Functions 12-13

CALL 29 – Read/Write to
a PLC/SLC from the
Module Internal String

Purpose

Use CALL 29, in conjunction with CALLs 122 or 123, to communicate between
remote PLCs and the module internal string without local SLC processor
interaction. You can also use CALL 29, in conjunction with CALLs 27 or 28, to
communicate between remote SLCs and the module internal string without local
SLC processor interaction. CALLs 27, 28, 122, or 123 must be executed within the
BASIC program before CALL 29.

CALL 29 is active when the internal string is the only choice in CALLs 27, 28,
122, or 123. In this situation, it is not practical to use the SLC input and output
image files to begin the transfer and to pass the status. The SLC processor does not
need to be involved. If an SLC file is chosen instead, the local SLC processor
controls the transfer with the input and output image bits. In this instance, a status
of 255 is returned when CALL 29 is attempted.

One argument is PUSHed and one argument is POPped. The input argument is
the CALL to be activated (CALL 27, 28, 122, or 123).

When CALL 29 is executed, the transfer is attempted. If the selected CALL (27,
28, 122, or 123) is not executed before CALL 29, a 1 is returned in the status
POPped. When CALL 29 is executed successfully, the value in the first character of
the string (transaction number) is incremented to designate that the transfer
occurred. The range of this character is 0-255.

After CALL 29 is executed, one word is POPped. This word is the status of the
transaction:

0 - Successful completion

1 - The chosen CALL (27, 28, 122, or 123) is not active

255 - SLC buffer is chosen for CALL 27, 28, 122, or 123 and CALL 29 is
ignored

All other codes are identical to CALL 90/92

Syntax

PUSH [27, 28, 122, or 123 for the CALL you want activated]

CALL 29

POP [status of transaction]

Advertising