Rockwell Automation 1770-KF2 Data Highway or Highway Plus Interface Module User Manual User Manual

Page 84

Advertising
background image

Message Packet Formats

Chapter 5

5-5

Figure 5.4 shows the format for the CMD byte itself. Bits 0 through 3
contain the command code. Bits 4 and 7 should always be set to 0. Bit 5
is the priority indicator; set to 0 for normal priority messages and 1 for
high priority messages (Chapter 2). Bit 6 is the command/reply indicator;
set it to 0 in a command message and 1 in a reply message.

Figure 5.4
CMD Byte Format

0 r

p 0 command

7 6 5 4 3

2

1

0

Bit

11702

Reply messages also contain a CMD byte. To form the CMD value for a
reply, the network layer copies the CMD value from the corresponding
command message and sets the reply bit (Bit 6) to 1.

The application layer supplies the FNC value and the command code (Bits
0 to 3) of the CMD byte for each command message. The network layer
supplies Bits 4 through 7 of the CMD byte.

STS and EXT STS

The STS (status) and EXT STS (extended status) bytes indicate the status
of the message transmission. In command messages, the application
program should always set the STS value to 0. In reply messages, the
STS byte may contain one of the status codes listed in Chapter 7. If the
four high bits of that byte are 1s (0F hex), there is extended status
information in an EXT STS byte. Otherwise, there is no EXT STS byte.
Note that an STS value of 0 in a reply message means “no error.”

In a reply message, the STS byte is divided between application layer and
network layer. The network layer uses Bits 0 through 3 of the STS byte to
report local errors (those errors that occur when the network layer
attempts to transmit a message across the link).

The application layer uses Bits 4 through 7 of the STS byte (and in some
cases the EXT STS byte), to report remote errors (those errors that occur
when the command executor at the destination station tries to execute the
command message). Chapter 7 explains local and remote error codes.

Advertising