The text of a manual · part 19 of 33
9154 Line Controller System Manual, pages 181 to 190
Pages 181 to 190 of 330
The original document is the PDF (7.7 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Intermec 9154
Page 181
Data Communication Between the Host and 9154
When Data Wait mode is enabled, if a specific device have been polled, but no data is available, the controller will not transmit data until it receives a record from that specific device, or it receives a POL sequence from the host for a device that has data available. The SEL sequence can occur while the controller is waiting to send data.
XON/XOFF Handshake
When the controller transmits and receives data from the host, buffers in the controller and host store and process data simultaneously as it arrives. If either the host or controller is processing data more slowly than the data is being transmitted, its buffer will become full and data may be lost or need to be retransmitted.
With POL/SEL protocol, the controller can inform the host when it is unable to receive data for a particular device by transmitting a NEG. When the host computer is unable to receive data, it simply stops polling. When POL or SEL are disabled, as in unsolicited protocols, some other means of data communication control is necessary.
To avoid potential data loss, XON and XOFF characters can be used by the receiving unit to control the transmission of data by the transmitting unit. By sending XOFF, the receiving unit informs the transmitting unit to stop sending data until it can process the data in its buffer, and is again able to receive more data. Once the receiving unit has caught up, it can send XON to inform the transmitting unit that it is ready to accept data.
The controller can use an XON/XOFF Handshake on both receive and transmit operations. Although it can be used with solicited protocol, XON/XOFF is especially valuable with unsolicited protocol where the controller is unable to control the flow of data with AFF/NEG protocol.
When the XON/XOFF feature is enabled, the controller will suspend its data transmission whenever an XOFF (ASCII DC3) character is received from the host. The controller will remain in this state until an XON (ASCII DC1) character is received, causing data transmission to the controller to resume. The controller can recognize the XON and XOFF characters when it is receiving messages and also when it is transmitting messages.
© 1987 INTERMEC Corporation Page 7-9
Page 182
HOST TO 9154 COMMUNICATION
The controller will also transmit the XOFF character whenever less than 10 characters of buffer space are available for receiving additional data. For example, if the host sends data for a device address whose buffer is already full, XOFF will be transmitted by the controller. When buffer space becomes available, that is the previous record has been successtully sent to the polled device, the XON response will be transmitted to the host.
An example of an XON/XOFF handshake occurring while the host is requesting a record from the controller is shown below:
Host: Controller: Comments: POL Host requests a record. SOM A MES XOFF Host buffering space is full. The controller receives the XOFF and suspends transmission.
The host computer is busy processing information.
XON Host is ready to receive data. SAGE EOM Controller sends rest of message. AFF Host acknowledges it has received the message.
Since the controller must wait for the XON after an XOFF is received, the controller might become temporarily suspended if it missed the host's XON because of a transmission failure. In this case, both the host and the controller might be waiting for data and a timeout probably will occur. The host program should send another XON response to the controller in an attempt to recover from this error condition.
Page 7-10 © 1987 INTERMEC Corporation
Page 183
Data Communication Between the Host and 9154
An example of a data exchange where the controller misses the XON character transmission from the host is shown below:
Host: Controller: Comments: POL Host requests a record. SOM A MES XOFF Host buffering space is full. The controller receives the XOFF and suspends transmission. The host computer is busy processing information. XON Host is ready to receive data.
Controller misses the host's XON because of a transmission error.
A host timeout occurs because no communication has occurred.
NEG To overcome the temporary delay, the host requests re-transmission of last record.
SOMA Controller re-transmits MESSAGE last record EOM AFF Host acknowledges it has received the message.
Be sure to disable the LRC if XON/XOFF data flow control if enabled. It is always possible that the calculated LRC may match the XON (ASCII DC1) or XOFF (ASCII DC3) characters. The controller data link knows when the LRC is expected and will not check for the XON/XOFF characters if the LRC is enabled and expected. It is still possible to transmit the XON or XOFF characters as data if the operator has enabled the Transparency Check option. A transparency check is never made before transmitting the LRC.
© 1987 INTERMEC Corporation Page 7-11
Page 184
HOST TO 9154 COMMUNICATION
Transparency Character
Because some ASCIl control characters are used by the data link protocol between the controller and the host, a transparent character flag (ASCII DLE) can be used by the host to prevent characters in the data stream from being interpreted as control characters used for data link protocol.
The DLE indicates that the next character is not a control character, but a part of the data stream. When DLE is received immediately before a control character, the control character will be processed by the controller as a data character and stored in the buffer. The transparency character DLE is not stored in the buffer, but is included in the LRC calculation.
For example, the following host message block will allow CR to be received by the controller and then transmitted as a piece of data to an attached reader or printer. The device, on port N at address A, will receive CR as a data character rather than as the control character End of Record. In this example the data communication protocol values are all the factory default values.
STX pA 123 DLE CR 456 CR ETX
STX is the Start of Message.
p is the address for the controller's one Multi-Drop channel.
Ais the device address to which the message is being sent.
123 is the first three characters of the data record.
DLE is the transparency character.
CR is the fourth character of data, although it also can be the default end of record control character.
456 is the final three characters of the data record. CR is the End of Record.
ETX is the End of Message.
Page 7-12 © 1987 INTERMEC Corporation
Page 185
Data Communication Between the Host and 9154
In this transmission, the controller strips out DLE, and sends the following message which is received by the polled device at address A as one record:
123 CR 456
If the DLE character had not been placed before the first CR, the host message would have been interpreted as two records going to two separate devices. Stripping out the SOM, EOM, and LRC, the message would be:
pA 123CR 456 CR
The first six characters, nA 123 CR, would have been accepted as the message "123" going to device A on channel n. The final four characters, 456 CR, would be interpreted as the message "6" going to device 5 (which may exist) on channel 4, which is not an address option for the controller's Multi-Drop port. The last four characters would generate an error and device A would not receive the additional data.
Longitudinal Redundancy Check
The Longitudinal Redundancy Check (LRC) is an error check character transmitted with each message sent to the host computer. It is also an option for messages transmitted from the host. The LRC is computed as the exclusive OR of the applicable characters in the data stream. The applicable characters are determined under three different conditions, as follows:
1. If aheader is used, the LRC calculation starts at the second character of the header, and includes the rest of the message block. The host must transmit messages to the controller without headers.
Header SOM Data message EOM Di STX pA 123 CR pB 456CR ETX
(Characters used in LRC calculation)
1 STX _pA123CRpB456CR ETX
© 1987 INTERMEC Corporation Page 7-13
Page 186
HOST TO 9154 COMMUNICATION
If no header is used, the LRC calculation starts at the second character of the SOM, and includes the rest of the message block. If the SOM is only one character, the LRC calculation starts at the first character of the message block.
SOM Data message EOM
STX pA 123 CR pB456CR ETX
(Characters used in LRC calculation)
pA 123 CR pB 456 CR ETX
The STX shown above is a three-character representation of the single ASCII character (Hex 42) and, thus, as the first and only character in the SOM, is removed from the LRC calculation.
3.
If there is no header and no SOM, or the SOM is only one character in length, the LRC calculation starts at the first character of the data block, and includes the rest of the message block.
Data message EOM pA 123 CR pB 456 CR ETX
(Characters used in LRC calculation)
pA 123 CR pB 456 CR ETX
Page 7-14 © 1987 INTERMEC Corporation
Page 187
Four Types of 9154 to Host Communication
FOUR TYPES OF 9154 TO HOST COMMUNICATION
The controller communicates with the host using a POL/AFF type of protocol where POL is sent to ask for data, and acknowledgements (AFF/NEG) are sent when information is received.
The host application program can transmit POL or SEL instead of AFF to the controller when it is waiting for a response to the last transmitted message block. If the controller receives a POL or SEL at this time, the previous message block is assumed to have been successfully received by the host. If a POL is received, the controller will transmit the next message block in the data queue. If a SEL is received, the controller will respond with AFF/NEG. This feature allows the host to POL for records with a minimum of protocol interaction and delays.
You can change the values of the protocol characters to other than standard ASCII values, as well as delete or alter the characters that make up the protocol, to suit the communication requirements of your host computer.
Four major types of communication protocol are available depending on whether or not data transmission is solicited or unsolicited by the host computer. The controller can be configured to communicate in all four types.
The data communication protocol used is determined during configuration by whether or not the From Host POL and SEL fields are left blank. Section 5, "Configuring the Controller,” explains how to configure the controller with the Supervisory CRT. Figure 7-1 shows the two parameter fields (POL and SEL) which are configured to choose solicited or unsolicited protocol.
© 1987 INTERMEC Corporation Page 7-15
Page 188
HOST TO 9154 COMMUNICATION
Select Transmission Parameters
HH: MM To Host: From Host:
No. Of Records Per Block: 1 POL: <ENQ>
Record Separator: <CR> SEL: <BEL>
Header: AFF: <ACK>
SOM: <STX> NEG: <NAK>
EOM: <ETX> DLE: <DLE>
RES: <STX> 2 <CR> SOM: <STX>
AFF: <STX> Y <CR> EOM: <ETX>
NEG: <STX> 2 <CR> Record Separator: <CR>
Error Message SOM: <STX> Delay (x 10 ms): 0
Error Message EOM: <ETX> Timeout (x 1 sec): 60
Transparency Check N (Y or N) Xxon / Xoff Enable: N_ (Y or N)
Data Wait Mode: N (Y or N} LRC Enable: N (Y or N) Press CNTL-P to Enter Command as Data Press CNTL-X to Cancel Line Press CNTL~T Return to Task Options Press ESC to Update EEPROM
_/
Figure 7-1 Selecting Solicited or Unsolicited Protocol
Page 7-16 © 1987 INTERMEC Corporation
Page 189
Four Types of 9154 to Host Communication
For each type of protocol, POL and SEL are as follows:
Type of Protocol: POL: SEL:
Solicited Receive and Solicited Transmit VALUE VALUE
Solicited Receive and Unsolicited Transmit () VALUE
Unsolicited Receive and Solicited Transmit VALUE ( )
Unsolicited Receive and Unsolicited Transmit () ( )
(_ ) indicates that the field has no value in it.
Value indicates that the field contains either the factory fault value, or some other value.
A description of each of the four major variations of protocol and tables illustrating usage follow.
© 1987 INTERMEC Corporation Page 7-17
Page 190
HOST TO 9154 COMMUNICATION
Solicited Receive and Solicited Transmit (SSM)
This is the standard protocol where both the POL sequence and SEL sequence are enabled (non-blank). With SSM, the host must send the POL sequence to solicit data from the controller, and the SEL sequence to solicit the attention of the controller to receive data. This protocol allows device specific polling to be implemented by the host. Table 7-1 shows an example of SSM data exchange. The following events occur in Table 7-1:
Page 7-18 © 1987 INTERMEC Corporation