The text of a manual · part 14 of 20
Bar Code Handy Terminal BHT-4000 User's Manual: Chapter 3 Communications Operations of BHT-4000, pages 99 to 106
Pages 99 to 106 of 163, from Bar Code Handy Terminal BHT-4000 User's Manual
The original document is the PDF (3.1 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.
Filed in the catalog under the NipponDenso BHT-3045, Denso BHT-3041 and Denso BHT-3045
Page 99
Chapter 3. Communications Operations of BHT-4000
■ 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.
89
Receiving station
Page 100
■ 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.
Sending station
Receiving station
EOT
Occurrence of an error To phase 3.
■ Phase 2 with no response or invalid response If the sending station receives no response or any invalid response from the receiving station in response to the 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 sec. ENQ 3 sec. ENQ ACK Data text m+1
90
Receiving station
Page 101
Chapter 3. Communications Operations of BHT-4000
■ 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 sec. ENQ 3 sec. ENQ
ENQ
(1) (2)
(9)
3 sec. 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
91
Receiving station
Page 102
■ Phase 3 with no response or invalid response If the sending station receives no response or any invalid response from the receiving station in response to the 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
EOT
Receiving station
3 sec. EOT 3 sec. 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 sec. 3 sec.
EOT (1) EOT (2) EOT (3)
EOT (10) Abnormal termination
92
Receiving station
Page 103
Chapter 3. Communications Operations of BHT-4000
3.3.5 Aborting Data Transmission Pressing C key aborts data transmission. If C key is pressed during downloading, the BHT-4000 transmits an EOT and aborts the file transmission. If it is pressed during uploading, the BHT-4000 completes the block transmission and then aborts the file transmission.
93
Page 104
3.3.6 BCC for Horizontal Parity Checking To check that data has been transmitted accurately, the BHT-4000 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, except for 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 in Easy Pack 4.2 indicating the bits to be added for horizontal parity checking.
S T X
Serial number
Data text
To be added for horizontal parity checking
94
E T X
B C C
Page 105
Chapter 3. Communications Operations of BHT-4000
3.3.7 Text Format Text should be formatted according to the standard of the BHT-protocol before transmission. What follows are two types of the standard text formats for program and data files.
■ Program Text Format (1) Heading text Byte position
1
2 3
4 5
6
7 8
9 10 11 12 13 14 15 16 17 Number of data texts contained (5 bytes)
Program file name (12 bytes) Example of contents
P R O G 1 .
P D 3
The program file name should be a maximum of 12 characters long and it consists of FILE NAME and .EXTENSION. The FILE NAME should be 1 to 8 characters long. The EXTENSION should be .PD3 (.FN3 and .EX3 may be available for future functional expansion).
0
0 3
If the program file name is less than 12 characters, the lower blank bytes will be filled with space characters.
5 2
The number of data texts should be 0 to 32767. If it is less than 5 digits, the upper blank bytes will be filled with zeros (0).
(2) Data text 128 or 130 Byte position
1
2
3 4 128 bytes if extension is .PD3; 130 bytes if it is .FN3 or .EX3.
Program data
Example of contents
0 D 0 A 0 0 0
Object file (compiled from a source program file) having one of the extensions .PD3, .FN3, and .EX3.
95
0 0 0
If a program data is less than the maximum digits in length, the upper blank bytes will be filled with zeros (0).
Page 106
■ Data Text Format Number of fields (2 bytes) Length of data field 1 Length of (2 bytes) data field n (2 bytes)
(1) Heading text
Byte position
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Number of data texts (5 bytes)
Data file name (12 bytes) Example of contents
M A S T E R
. D A T n
0 0 5 9 2
The number of data texts should be 0 to 32767. If it is less than 5 digits, the upper blank bytes will be filled with zeros (0).
0 6
1 0
Every data field should be 1 to 99 digits long. If it is less than 2 digits, the upper blank byte will be filled with zero (0).
The number of fields should be 1 to 16. If it is less than 2 digits, the upper blank byte will be filled with zero (0).
The data file name should be a maximum of 12 characters long and it consists of FILE NAME and .EXTENSION. The FILE NAME should be 1 to 8 characters long. The EXTENSION should be other than .PD3, .FN3, and .EX3, and it may be omitted (together with a period). In Easy Pack 4.2, the following file names are used: PACK1.DAT PACK2.DAT PACK3.DAT PACK4.DAT
If the data file name is less than 12 characters in length, the lower blank bytes will be filled with space characters.
(2) Data text
Data field 1 Example of contents
Data field 2
Data field n
T 1 0 0 9 1 S 1 2 3
Every data field should be 1 to 99 digits long.
9 2 0 2 1 4 1 3 2 5
If a data field is less than the maximum digits in length, the lower blank bytes will be filled with space characters.
The total length of all data fields plus the number of the character count bytes* (= the number of the fields) should be 255 bytes or less. (* When transferring data files, the BHT-protocol automatically prefixes a character count byte in binary format to each data field.) When you transfer five 50-digit (50-byte) fields, for example, the total length of all data fields is 250 (50 x 5) bytes and the number of the character count bytes is 5. Accordingly, the total is 255, so you can transfer the file.
96