Purpose – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 152

Advertising
background image

Publication 1746-RM001A-US-P

12-2 Output Functions

CALL 23 – Transfer Data
from the CPU Files to
Port 1 or 2

Purpose

Use CALL 23 to transfer data from the CPU output data file or the CPU M0 file
directly to the module serial port and/or to a string within the module. The data is
transferred low byte first, then high byte or high byte first, then low byte to the
module port. The data can also be stored in a string for access by the BASIC
program.

The byte swap selection (low byte first, then high byte, or high byte first, then low
byte) of the last CALL 23 or CALL 22 executed determines the data packing
method for all ports enabled by CALL 23.

The low byte of the first word of the source file contains the character count (byte
count) of the data being transferred. If the byte count is larger than the file selected,
only the maximum number of bytes within the file are transferred. The high byte
of the first word is not used.

Execute CALL 23 to set up the data transfer parameters. After the CALL is
executed, the module gets data from the source file and transfers it to port PRT1,
port PRT2, or an internal string. Input and Output image file bits (word 0, bits 6
and 7) for the slot containing the module, are used to initiate and notify
completion of the transfer. The operation is described below:

1.

1.

1.

1. The ladder logic program of the SLC processor builds the data buffer. The

SLC then determines the byte count of the file to be transferred and places it
into the lower byte of the first available word to be transferred. This word plus
the data comprise the data file to be transferred.

Print numeric values in decimal notation.

PRINT USING(#.#)

12-36

Restore the default print mode.

PRINT USING(0)

12-37

Store variable.

ST@

12-38

Table 12.1 Chapter Reference Guide

If you need (to)

Use this
mnemonic

Page

BYTE COUNT

DATA BUFFER

Advertising