![background image](http://html1.mh-extra.com/html/rabbit/em1500/em1500_product-manual_3112140100.webp)
96
Serial and TCP Protocols
The EM1500 has several packetizing modes that allow it to support a fairly wide range of serial protocols.
The basic mode is selected by the Packetizing field in the Protocol tab of the stand-alone configuration
program. The available modes are:
•
None
. This means that no packetizing is required, e.g. for a purely stream-based application.
•
Idle
. This uses idle time (i.e., no data being sent or received for a specified time interval) to delimit
one packet from the next.
•
String
. This uses a specified fixed string to mark the boundary between successive packets. The
string, when encountered in the serial stream, marks the end of the packet. There are two varieties
of the string packetization method: 'string - send' and 'string - cut'. The first variety sends the termi-
nating string (as part of the packet) over the network. The other cuts the terminating string and does
not send it. Cutting the string not only reduces the amount of network traffic, but allows some use-
ful protocol conversions to be performed.
•
9th bit
. This uses a special signalling technique to mark the start of a new packet.
B.2.1.1 Idle Packetization
This mode is particularly useful for protocols that can contain arbitrary binary data in any packet. Rather
than looking for specific character sequences, the EM1500 checks for short breaks in the incoming serial
stream.
When sending a packet to the serial port using this protocol, the EM1500 ensures that the entire packet is
sent in a continuous stream, with no idle time between successive data bytes in the packet. At the end of
the packet, the EM1500 ensures that no data is sent for the specified time. This allows the receiver to
detect the idle time so that it knows where the end of the packet is.
Since the packet must be sent in one continuous stream, the entire packet must be buffered in the EM1500
before it can start being sent. If only part of the packet had been received from the network, the EM1500
could not start sending it since there is no guarantee that the rest of the packet will be received from the
network in a timely manner.
Thus, use of idle packetization imposes the limitation that no packet can be longer than the internal buffer
size of the EM1500 (for the serial port using idle packetization). Each port has a transmit buffer of 1020
bytes, hence the longest packet must be less than or equal to this value.
In the case that the full 1020 bytes has been received from the network, and more data comes in before the
end-of-packet (EOP) indicator, then the EM1500 has no choice but to start transmitting the unterminated
packet out the serial port. Hopefully, the EOP will be received before the first part of the packet has fin-
ished being sent. This is often the case, since the network is usually faster than the serial port, however
there is no guarantee and in the worst case it is possible for the packet to be perceived as terminated by the
serial receiver before it is really terminated. If the length of packets is not guaranteed to be less than or
equal to 1020 bytes, then idle packetization is not recommended.
When receiving packets from the serial port, a similar process is followed. Whenever there is no gap in
reception, the received characters are forwarded over the network. When a sufficiently long gap is
observed, the EM1500 forwards the EOP indicator to the network peer, which then follows the process in
the above paragraphs in order to send the packet out of its serial port.
Idle packetization requires two timing parameters to be entered. In the Protocol tab, if the Packetizing field
is set to “Idle,” then the timing parameter fields are enabled. The timing can be set in terms of millisec-
onds, bit times, or character times.
Summary of Contents for EM1500
Page 14: ...10 www rabbit com Introduction...
Page 22: ...18 www rabbit com Getting Started...
Page 76: ...72 www rabbit com EM1500 Configuration...
Page 90: ...86 www rabbit com EM1500 Specifications...
Page 104: ...100 www rabbit com Serial and TCP Protocols...
Page 118: ...114 www rabbit com EM1500 FAQ...