Syntax – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 155

Advertising
background image

Publication 1746-RM001A-US-P

Output Functions 12-5

The fifth input argument is the byte swap selection. It has the following values:

0 - Data bytes transferred from the CPU are not swapped when passed to the
module port or string. The data transfer order is low byte first, then high byte
per word. The low byte of the first word in the source buffer contains the byte
count.

1 - Data bytes transferred from the CPU are swapped when passed to the
module port or string. The data transfer order is high byte first, then low byte
per word. Swapping does not affect the first word. The low byte of the first
word still contains the byte count.

The last CALL 23 executed determines the byte swap option for all active CALL 23
and CALL 22 commands previously executed.

The output argument is the status of the CALL. It has the following values:

0 - Successful

1 - Disabled

2 - Bad input parameter

3 - PRT2 is chosen but it is already enabled for DF1 protocol. The CALL is
not executed.

4 - String is too small

5 - String is not dimensioned

Data transfer does not begin until the SLC processor sets output image file word 0,
bit 6 or bit 7 (depending on the destination port). The module sets the input file
word 0, bit 6 or bit 7 to indicate a successful transfer to a port.

If the internal string is chosen as the destination, output image file word 0, bit 6 is
used to initiate the transfer. Input file word 0, bit 6 is set by the module to indicate
a successful transfer to the string.

Syntax

PUSH [destination port number and/or internal string]

PUSH [selection of source file]

PUSH [word offset within the source file]

PUSH [string number]

PUSH [byte swap selection]

CALL 23

POP [CALL 23 status]

Advertising