beautypg.com

Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 154

background image

Publication 1746-RM001A-US-P

12-4 Output Functions

Transfers continue in this manner until the CALL for the port is re-executed with
different input parameters. If this occurs, the previous CALL 23 for the port is
automatically disabled and the new CALL 23 takes effect. Multiple CALL 23s for
the same port are not executed in parallel. However, port 1 and port 2 can be
activated simultaneously by issuing separate CALL 23s for these ports.

This CALL has five input arguments and one output argument.

The first input argument chooses the destination of the data. It can be the port
number (1 or 2) and/or the internal string:

0 - Disable CALL 23 for all active ports and strings enabled by earlier CALL
23s

1 - Internal string only

2 - Serial port 1

3 - Internal string and serial port 1

4 - Serial port 2

5 - Internal string and serial port 2

If an internal string (1, 3, or 5) is chosen, the first character of the string contains
the byte count. The second character (transaction number) is incremented to
inform the module that new data is in the string. The value of this character wraps
around from 255 to 0. The data from the source buffer begins with the third
character of the string.

The second input argument is the selection of the data source. It can be the CPU
output data file or CPU M0 file:

0 - CPU output image file

1 - CPU M0 file

The third input argument is the word offset within the CPU output image file or
M0 file. This offset points to the first word, which contains the byte count of the
valid data in the file. The second word of the CPU file contains the first two
characters of the data to be transferred. If the CPU output image file is chosen, this
offset must not be word 0 since word 0 is reserved for the handshaking bits used in
this CALL. Therefore, the first available word for the byte count when the output
image is chosen is the second word (word 1).

The fourth input argument is the internal string number. If the second input
argument does not select internal string usage, the value of this input argument is
ignored (but must still be PUSHed). If the data exceeds the string length, the
remaining data is truncated.