![background image](http://html1.mh-extra.com/html/rabbit/em1500/em1500_product-manual_3112140097.webp)
EM1500 User’s Manual
93
If hardware flow control is not available, for example, because the serial connection is 3-wire only, then
the usual alternative is to use software flow control. Software flow control is often called “XON/XOFF”
after the ASCII characters that are used. When the receiver is no longer able to accept data from the
sender, it sends an XOFF character to the sender. When the sender gets this character, it stops sending data
until it receives an XON character from the receiver.
This scheme sounds fairly straight-forward, but it has a few limitations:
1. The normal data stream is not allowed to contain XON or XOFF characters, since they are reserved for
flow control.
2. If the XOFF character is not received by the sender for some reason (maybe the sender's buffers are full)
then the scheme does not work.
3. If the XON character is not received, then the sender may never resume sending and there will be an
indefinite stall.
4. If XON/XOFF is being used in both data flow directions (as it usually is), then what happens when the
sending side is throttled because it received an XOFF without a following XON, but it needs to send an
XON or XOFF because the receiving side is being (un)throttled? In principle, the sending side should
not send any data, including XON/XOFF, when it is throttled, but that would be violating the flow con-
trol rules.
The EM1500 handles XON/XOFF flow control as follows:
•
It assumes the data stream from the network does not contain XON or XOFF characters. If it does,
then the results are undefined.
•
XON and XOFF characters are processed locally on the serial port, and never passed through to the
network peer.
•
On the sending side of the EM1500 serial port, if the attached device sends an XOFF character the
EM1500 immediately stops sending normal data (although it may send XON/XOFF characters). If
it receives an XON, it immediately resumes sending data if it has any to send.
•
On the receiving side of the EM1500 serial port, if the receive buffer (of 1020 bytes) is approxi-
mately half full it will send an XOFF. If the attached device keeps sending data, the EM1500 will
keep buffering it for another 256 bytes. If yet more data comes in, another XOFF will be sent. This
continues, with XOFF being sent for every additional 255 characters received, until the buffer is
full. Data after this is dropped; the EM1500 has no choice. When the buffer is emptied, because it
was passed on to the network peer, an XON character is sent so that the attached device can resume
sending.
•
XON and XOFF characters that are generated or received for flow control purposes are never
reflected in the network data stream. XON/XOFF is handled completely locally and transparently
from the perspective of the network peer.
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...