
DN120 DeviceNet Gateway User’s Manual
Microscan Systems, Inc.
15
Transmitting Messages
The
Serial Stream Object
receives output bytes (
TX Message
) from the DeviceNet master in a
Poll Command message. It saves the output bytes in the Transmit Buffer, to be transmitted when
the serial channel is available. The maximum number of bytes that can be sent in one Poll
Command message is defined by the
Maximum Transmit Size
attribute. The Transmit Buffer can
hold up to 64 bytes. Because the DeviceNet Polled I/O data exchange may occur many times
faster than the transmission of serial data, the application may need to synchronize the transmit
data exchange with the gateway.
The number of output bytes in the Poll Command message is fixed. The
Status Clear
and
Transmit Sequence Number
bytes are always sent, if enabled. The remaining number of bytes in
the Poll Command is defined by the
Maximum Transmit Size
attribute. If the number of
TX
Message
bytes sent is less than the
Maximum
Transmit Size
number, then the remaining output
bytes are undefined. The gateway uses the Short_String length to determine the valid number of
bytes to transmit. If Byte Array format is used, all the bytes are transmitted.
Synchronization
To ensure that no information is lost between the gateway’s serial channel and the user
application program, the DN120 has three synchronization options:
Receive
Sequence Number
,
Transmit Sequence Number
, and
Handshake Protocol
.
Receive Sequence Number
When enabled, the gateway returns a
Receive Sequence Number
input byte in the DeviceNet Poll
Response message. The 8-bit
Receive Sequence Number
is incremented by the gateway
whenever it returns new data in the input bytes. The user application uses the
Receive Sequence
Number
to signal the receipt of new message data. Valid numbers are 0-255.
Transmit Sequence Number
When enabled, the gateway receives a
Transmit Sequence Number
output byte in the DeviceNet
Poll Command message. The gateway will not send the
TX Message
bytes out the serial channel
unless the 8-bit
Transmit Sequence Number
is different than the last received value. Valid
numbers are 0-255.
Status Clear
Transmit Sequence Number
other output bytes
1. TX Message bytes fill Poll Command
message.
Poll Command Message Data
TX Message bytes
TX Message bytes
undefined
2. TX Message is smaller than Poll Command
message. Unused output bytes are undefined.