Rockwell Automation 6001-F2E AB STANDARD DRIVER SFTW User Manual

Page 42

Advertising
background image

Specifying Message Packet Commands
with Send_StdDrv()

Appendix B

B-5

Field

Description

TNS

The TNS (transaction) bytes (2 bytes) contain a unique 16-bit transaction
identifier.

For each command message transmitted by your computer node, your
application level software must assign a unique 16-bit transaction
number. A simple way to generate this number is to use the Get_tns()
function and store the value in the two TNS bytes of the new message.
See page 4-6 for more information on Get_tns().

When the command initiator receives a reply to one of its command
messages, it can use the TNS value to associate the reply message with
its corresponding command. If the TNS value of a reply message
matches the TNS value of a command message, then that reply is the
appropriate one for that command.

Note that the low byte (least significant bits) of your TNS value will be
transmitted across the link before the high byte (most significant bits).

At any instant, the combination of SRC, CMD, and TNS are sufficient to
uniquely identify every message packet in transit. At least one of these
fields in the current message must be different than the corresponding
field in the last message received by a command executor. If none of
these fields is different, the message is ignored. The process is called
duplicate message detection.

ADDR

The ADDR (address) field (2 bytes) contains the address of a memory
location in the command executor where the command is to begin
executing. For example, if the command is to read data from the
command executor, ADDR specifies the address of the first byte of data
to be read.

The first byte of the ADDR field contains the low (least significant) byte of
the address, and the second byte contains the high byte of the address.
The ADDR field specifies a byte address, not a word address, as in SLC
programming.

SIZE

The SIZE byte specifies the number of data bytes to be transferred by a
message. This field appears in read commands, where it specifies the
number of data bytes that the responding node must return in its reply
message. The allowed value for SIZE varies with the type of command.

DATA

The DATA field contains binary data from the application program. The
number of data bytes in a message depends on the command or function
being executed.

Advertising