The text of a manual · part 18 of 20
Bar Code Handy Terminal BHT-7000 User's Manual: Appendices, pages 151 to 160
Pages 151 to 160 of 175, from Bar Code Handy Terminal BHT-7000 User's Manual
The original document is the PDF (934 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 Denso BHT-7000
Page 151
Appendices
■ 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 PROTOCOL screen in System Mode (pp. 54 and 56) or by using the XFILE statement (refer to the "BHT-BASIC Programmer's Manual").
135
Page 152
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.
136
Page 153
Appendices
■ 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.
137
Receiving station
Page 154
■ 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
138
Receiving station
Page 155
Appendices
■ 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
139
Receiving station
Page 156
■ 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
140
Receiving station
Page 157
Appendices
[ 2 ] Aborting Data Transmission Pressing the C key aborts data transmission. If the C key is pressed during downloading, the BHT-7000 transmits an EOT and aborts the file transmission. If it is pressed during uploading, the BHT-7000 transmits the current transmission block followed by EOT and then aborts the file transmission.
141
Page 158
[ 3 ] BCC for Horizontal Parity Checking To check whether data has been transmitted accurately, the BHT-7000 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, refer to the "BHT-BASIC 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
142
E T X
B C C
Page 159
Appendices
B.2
BHT-Ir protocol
[ 1 ] Transmission Control Sequences Shown below is a typical message transmission sequence supported by the BHT-Ir protocol. This sequence example does not include transmission errors or negative responses.
Sending Station
Establishment of Data Link (Phase 1)
Receiving Station
DLE ENQ and IDm* DLE ACK and IDs**
D S L • O E H
I
Heading text D
D E L • T E X
C R C
DLE ACK and IDs D S L • T E X
I D
Serial number
Data text 1
D E L • T E X
C R C
DLE ACK and IDs
Data Transmission (Phase 2)
D S L • T E X
I D
Serial number
Data text n-1
D E L • T E X
C R C
DLE ACK and IDs D S L • T E X
I D
Serial number
Data text n
D E L • T E X
C R C
DLE ACK and IDs Release of Data Link (Phase 3)
DLE EOT and IDs DLE ACK and IDs
*IDm: ID of sending station **IDs: ID of receiving station
143
Page 160
Data transmission may accidentally involve various types of errors. The BHT-Ir protocol is designed to recover from those errors as frequently as possible. What follows is the BHT-Ir protocol for phases 1 through 3.
Phase 1: Establishment of Data Link ■ Normal phase 1 The sending station transmits a sequence of DLE ENQ and IDm (sending station's ID) to the receiving station. Upon receipt of a sequence of DLE ACK and IDs (receiving station's ID) from the receiving station, the sending station shifts to phase 2.
DLE ENQ and IDm
Sending station
Receiving station
DLE ACK and IDs
To phase 2.
■ Phase 1 with iterated transmission of DLE ENQ and IDm 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 the sent sequence of DLE ENQ and IDm, it iterates sending of the sequence at 0.5-second intervals up to 60 times. If the sending station receives a sequence of DLE ACK and IDs before sending the sequence of DLE ENQ and IDm 60 times, it shifts to phase 2. Sending station 0.5 second 0.5 second
DLE ENQ and IDm
Receiving station
DLE ENQ and IDm DLE ENQ and IDm
DLE ACK and IDs
To phase 2.
TIP
You may modify the number of iterations of a sequence of DLE ENQ and IDm for the sending station. The default is 60 times at 0.5-second intervals. For details, refer to the SET PROTOCOL screen in System Mode (pp. 54 and 56) and the XFILE statement given in "BHT-BASIC Programmer's Manual." 144