The text of a manual · part 14 of 20
Bar Code Handy Terminal BHT-6000 User's Manual: Chapter 3 Communications Operations of BHT-6000, pages 106 to 115
Pages 106 to 115 of 178, from Bar Code Handy Terminal BHT-6000 User's Manual
The original document is the PDF (973 KB). 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 NipponDenso CU-6002 and Denso CU-6002
Page 106
Chapter 3. Communications Operations of BHT-6000
[ 4 ] Transmission Control Sequences Shown below is a typical message transmission sequence supported by the BHTprotocol. This sequence example does not include transmission errors or negative responses.
Sending Station
Establishment of Data Link (Phase 1)
Receiving Station
ENQ ACK
S O H
Heading text
E B T C X C ACK
S T Serial number X
Data text 1
E B T C X C ACK
Data Transmission (Phase 2)
S T Serial number X
Data text n-1
E B T C X C ACK
S T Serial number X
Data text n
E B T C X C ACK
Release of Data Link (Phase 3)
EOT ACK
91
Page 107
Data transmission may accidentally involve various types of errors. The BHT-protocol is designed to recover from those errors as frequently as possible. What follows is the BHT-protocol for phases 1 through 3.
Phase 1: Establishment of Data Link ■ Normal phase 1 The sending station transmits an ENQ to the receiving station. Upon receipt of an ACK from the receiving station, the sending station shifts to phase 2.
ENQ
Sending station
Receiving station
ACK
To phase 2.
■ Phase 1 with iterated ENQ transmission due to no response or invalid response If the sending station receives no response or any invalid response from the receiving station in response to an ENQ sent, it iterates sending of an ENQ at threesecond intervals up to 10 times. If the sending station receives an ACK before sending an ENQ ten times, it shifts to phase 2. Sending station 3 seconds
ENQ
Receiving station
ENQ 3 seconds
ENQ
ACK
To phase 2.
TIP
You may modify the number of ENQ iterations for the sending station. The default is 10 times at three-second intervals. For details, refer to the SET LINKUP TIME screen in System Mode (p. 51) and the XFILE statement given in "BHT-BASIC 3.0 Programmer’s Manual." 92
Page 108
Chapter 3. Communications Operations of BHT-6000
■ Abnormal termination of phase 1 (Abort of phase 1) If the sending station receives no ACK from the receiving station after sending an ENQ 10 times in succession, it sends an EOT to the receiving station after three seconds from the 10th ENQ to terminate the message transmission abnormally.
Sending station
Receiving station
ENQ(1) 3 seconds
ENQ(2) 3 seconds
ENQ(3)
ENQ(10) 3 seconds
EOT Abnormal termination
TIP
The receiving station's default timeout is 30 seconds. You may modify the timeout length on the SET LINKUP TIME screen in System Mode (p. 51) or by using the XFILE statement (refer to the "BHT-BASIC 3.0 Programmer’s Manual").
93
Page 109
Phase 2: Data Transmission ■ Normal phase 2 The sending station first sends a transmission block containing the heading text. Each time the sending station receives an ACK from the receiving station, it sends a transmission block containing the data texts as shown below. Upon receipt of an ACK in response to the last transmission block (data text n), the sending station shifts to phase 3. If a transmission message contains no data text, the sending station transmits the heading text only.
Sending station
Receiving station Heading text
ACK
Data text 1
ACK
Data text n-1
ACK
Data text n
ACK
To phase 3.
94
Page 110
Chapter 3. Communications Operations of BHT-6000
■ Phase 2 with NAK If the sending station receives a NAK from the receiving station in response to a transmission block containing text data m, it sends that transmission block again immediately as shown below. If the sending station receives an ACK before receiving a NAK 10 times in succession, it continues the subsequent message transmission.
Sending station
Data text m
Receiving station
NAK
Data text m NAK
Data text m ACK
Data text m+1
If the sending station receives a NAK 10 times in succession or it fails to send a same transmission block, it shifts to phase 3 to terminate the message transmission abnormally. Even if the phase 3 terminates normally, the transmission results in an abnormal end. Sending station
Data text m (1) NAK
Data text m (2) NAK
Data text m (10) NAK
Occurrence of an error To phase 3.
95
Receiving station
Page 111
■ Phase 2 with EOT If the sending station receives an EOT anytime during phase 2, it shifts to phase 3 to terminate the message transmission abnormally. Even if the phase 3 terminates normally, the transmission results in an abnormal end.
Receiving station
Sending station
EOT
Occurrence of an error To phase 3.
■ Phase 2 with iterated ENQ transmission due to no response or invalid response If the sending station receives no response or any invalid response from the receiving station in response to a transmission block sent, it iterates sending of an ENQ at three-second intervals up to nine times. If the sending station receives an ACK before sending an ENQ nine times, it continues the subsequent message transmission.
Sending station
Data text m
3 seconds
ENQ 3 seconds
ENQ ACK Data text m+1
96
Receiving station
Page 112
Chapter 3. Communications Operations of BHT-6000
■ Abnormal termination of phase 2 (Abort of phase 2) If the sending station receives no ACK from the receiving station after sending an ENQ nine times in succession, it sends an EOT to the receiving station after 3 seconds from the 9th ENQ to terminate this transmission sequence abnormally.
Sending station
Receiving station
3 seconds
ENQ (1) 3 seconds
ENQ (2)
ENQ (9) 3 seconds
EOT Abnormal termination
Phase 3: Release of Data Link ■ Normal phase 3 The sending station transmits an EOT to the receiving station. Upon receipt of an ACK from the receiving station, the sending station terminates the message transmission normally and releases the data link.
Sending station
EOT
ACK
Normal termination
97
Receiving station
Page 113
■ Phase 3 with iterated EOT transmission due to no response or invalid response If the sending station receives no response or any invalid response from the receiving station in response to an EOT sent, it iterates sending of an EOT at threesecond intervals up to ten times. If the sending station receives an ACK before sending an EOT ten times, it terminates the message transmission normally and releases the data link.
Sending station 3 seconds
EOT
Receiving station
EOT 3 seconds
EOT
ACK
Normal termination
■ Abnormal termination of phase 3 If the sending station receives no ACK from the receiving station within three seconds from the 10th EOT, it terminates the message transmission abnormally and releases the data link.
Sending station 3 seconds
EOT (1) EOT (2)
3 seconds
EOT (3)
3 seconds or more
EOT (10)
Abnormal termination
98
Receiving station
Page 114
Chapter 3. Communications Operations of BHT-6000
[ 5 ] Aborting Data Transmission Pressing the C key aborts data transmission. If the C key is pressed during downloading, the BHT-6000 transmits an EOT and aborts the file transmission. If it is pressed during uploading, the BHT-6000 transmits the current transmission block followed by EOT and then aborts the file transmission.
99
Page 115
[ 6 ] BCC for Horizontal Parity Checking To check whether data has been transmitted accurately, the BHT-6000 supports horizontal parity checking for every transmission block. In horizontal parity checking, a horizontal parity byte so called BCC (Block Check Character) is suffixed to an ETX of every transmission block. In the BHT-protocol, every parity bit of BCC is set so that all set bits at the same bit level (including a parity bit) in the characters contained in the transmission block have an even number by binary addition, excluding SOH, STX, and functions SOH$ and STX$. (For details about SOH$ and STX$ which are protocol functions unique to BHT-BASIC 3.0, refer to the "BHT-BASIC 3.0 Programmer's Manual.")
(Vertical parity)
b7 b0
Character [ For 8-bit data ]
Horizontal parity byte (BCC)
Shown below is a data text block indicating the bits to be added for horizontal parity checking.
S T X
Serial number
Data text
To be added for horizontal parity checking
100
E T X
B C C