Manual

RS-232C Communications 5-5
Xon/Xoff Handshake
The Xon/Xoff handshake works as follows. As the host sends ACL commands to the
System, they are stored in the input buffer and are processed by the System as fast as
possible. If the host sends them faster than they can be processed, the buffer begins to fill
up. If the number of empty bytes in the buffer becomes less than a certain value, called the
Xoff threshold, the System sends an Xoff Trigger String to the host, in effect saying "stop
talking". The System continues to process characters; when the number of characters in the
buffer falls to a certain value, called the Xon threshold, the System sends an Xon Trigger
String to the host, in effect saying "you may begin talking again". This process continues
until all data have been transmitted.
The Xoff Threshold is established via the
ESC.I command. The Xon Threshold is
automatically set to 128 characters (half the buffer size); if the Xoff Threshold is set greater
than or equal to 128, the Xon Threshold is automatically decreased so that the sum of the
two is equal to the buffer size minus one. The Xon Trigger String is established via the
ESC.H or ESC.I command. The Xoff Trigger String is established via the ESC.N
command. The Xon/Xoff handshake itself is enabled by executing an
ESC.H or ESC.I
which specifies an Xon Trigger String but no Enquiry Character, plus an
ESC.N which
specifies an Xoff Trigger String.
Example: the sequence
ESC.I;;17:ESC.N;19:ESC.M10: establishes a "normal"
XON/XOFF handshake (using the ASCII DC1 and DC3 characters) with a 10 millisecond
turnaround delay.
Enq/Ack Handshake
The Enq/Ack ("Enquire/Acknowledge") handshake works as follows. As with the
Hardwired DTR handshake, the host establishes a Block Size. The host sends an Enquiry
Character to the Automove System, effectively asking "do you have room for a block of
characters?" If the buffer has room, the System immediately sends back an Acknowledge
String, effectively saying "yes". Otherwise the System waits until the buffer has room for a
block, then sends the Acknowledge String. After it has received the Acknowledge String the
host transmits a group of characters whose size is less than or equal to the established Block
Size. This sequence repeats until all data have been transmitted.
If necessary, the host can set up an Immediate Response String which the System is to send
to the host immediately when an Enquiry Character is received. The Acknowledge String is
sent following the Immediate Response String, as soon as there is room for a block.
The Block Size is established via the
ESC.H or ESC.I command. The Enquiry and
Acknowledge Characters are established via the
ESC.H or ESC.I command. The Immediate
Response String is established via
ESC.N. The Enq/Ack handshake itself is enabled by
setting up an Enquiry Character with
ESC.H or ESC.I. Other communications parameters
which may affect the Enq/Ack handshake are Turnaround Delay (
ESC.M), Output Trigger
Character (
ESC.M), Echo Terminate Character (ESC.M), Output Initiator Character
(
ESC.M), Output Terminator (ESC.M), and Intercharacter Delay (ESC.N).
The Enq/Ack handshake is mutually exclusive with the Xon/Xoff handshake; only one at a
time can be active.