
DN120 DeviceNet Gateway User’s Manual
Microscan Systems, Inc.
13
The
Post-Delimiter Block Mode
configuration expects the
Delimiter
at the end of a message.
The gateway saves all received bytes in the Receive Buffer until a
Delimiter
is received. In this
mode, the maximum number of bytes in a single message is limited by the Receive Buffer size
(64 bytes), not the
Maximum Receive
Size
attribute.
Returning Received Data
When the gateway receives a Poll Command message, it removes some or all of the bytes
currently in the Receive Buffer and returns them as input bytes in a Poll Response message.
The
Maximum Receive Size
attribute defines the maximum number of bytes that can be returned
in a single Poll Response message. If the Receive Buffer contains more bytes than can fit into
one Poll Response message, the remaining bytes are returned in subsequent Poll Response
messages.
RX Message
is the string of valid message bytes returned in a single Poll Response
message. The
RX Message
byte string can be formatted as either a Short_String (byte array with
1
st
byte = length) or a Byte Array (no length byte). The number of bytes in an
RX
Message
string
can be less than or equal to the
Maximum Receive Size
, but never larger. When the number is
less, the remaining Poll Response input bytes are either padded or undefined.
In
Stream Mode
, the gateway will always try to fill Poll Response message with bytes from the
Receive Buffer. The only time the
RX Message
size is less than the
Maximum Receive Size
is
when there are no more bytes in the Receive Buffer.
In
Block Mode
, the gateway will not return any data in a Poll Response message unless it has a
complete serial message saved in the Receive Buffer. If the message sizes are small, the gateway
may have several messages saved in the Receive Buffer, depending upon how fast the DeviceNet
master polls the gateway for data. The messages are returned one at a time in a Poll Response
message, regardless of their size. If the message is large, then it is returned in multiple Poll
Response messages.
Padding Message Data
0x45 0x62 0x02 0x31 0x32 0x32 0x42 0x45 0x02 0x42 0x43 0x44 …
Incoming data stream
Post-Delimiter Mode
Delimiter = 0x02
0x45 0x62
Message Bytes
0x02
Delimiter
0x31 0x32 0x32f 0x42 0x45
Message Bytes
0x02
Delimiter
0x42 0x43 0x44 …
Message Bytes
0x02
0x31 0x32 0x32 0x42 0x45
Pre-Delimiter Mode
Delimiter
Message Bytes
Delimiter = 0x02
0x02
0x42 0x43 0x44 …
Delimiter
Message Bytes