beautypg.com

Rockwell Automation 57C442 Data Highway Plus Interface Module User Manual

Page 28

background image

4-10

The application task could contain the following statements:

10 OPTIONS% = 256 \! enable global data, baud rate = &

57.6 Kbaud, transmit to vacant

&

nodes enabled.

15 GD% = 15

\!

set global data

20 ENABLE% = 1

\!

put module online

30 DELAY 2 SECONDS

4.2.4

Commands Initiated by the Data Highway Plus
Interface Module

The commands described in figure 4.5 can be used by the AutoMax
Processor in the GATEWAY_CMD_OK@ function to initiate a
command on the Data Highway Plus Interface module. See section
4.2.2 for more information on the GATEWAY_CMD_OK@ function.

Commands 1 and 2 come from the basic command set and are
accepted by PLC-2,PLC-3, PLC-5 and SLC 500 processors. For PLC-2
controllers, addresses will be 5-digit octal numbers. For PLC-3 and
PLC-5 processors, compatibility files must exist. Refer to A-B
documentation for more information.

For communication with a SLC 500 processor, use only commands 1
and 2 and only file N9 for data transfers.

Command 1, Unprotected Read, transfers a block of data from the
target registers at the remote address to the specified AutoMax
registers on the Data Highway Plus Interface module. Data can be
transferred to any file in the PLC-5 data image area. The data is stored
in the specified registers on the Data Highway Plus Interface module. A
maximum of 100 registers can be transferred in a single request. The
transfer cannot cross file boundaries.

Command 2, Unprotected Write, transfers a block of data from the
specified AutoMax registers on the Data Highway Plus Interface
module to the target registers at the destination address. The data must
already exist in the registers on the Data Highway Plus Interface
module. Data can be transferred from any file in the PLC-5 data image
area. A maximum of 100 registers can be transferred in a single
request. The transfer cannot cross file boundaries.

Commands 3, 4 and 5 come from the PLC-5 command set. Commands
3 and 4 are accepted by PLC-3 and PLC-5 processors. Command 5 is
accepted only by PLC-5 processors. For commands

GATEWAY CMD OK@

Data Highway Plus

Command Code

Desription

Function

1

Unprotected Read

CMD = 01, FNC = n/a

2

Unprotected Write

CMD = 08, FNC = n/a

3

Word Range Read

CMD = OF, FNC = 01

4

Word Range Write

CMD = OF, FNC = 00

5

Read-Modify-Write

CMD = OF, FNC = 26

Figure 4.5 – Commands Used with GATEWAY_CMD_OK@