The text of a manual · part 14 of 18
User's Manual (BHT-5000): Chapter 3 Communications Operations of BHT-5000, pages 102 to 109
Pages 102 to 109 of 143, from User's Manual (BHT-5000)
The original document is the PDF (1.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.
For the NipponDenso BHT-5000 and Denso BHT-5000
Page 102
Chapter 3. Communications Operations of BHT-5000
■ 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
Receiving Data text m (1) station NAK
Data text m (2) NAK
Data text m (10) NAK
Occurrence of an error To phase 3.
87
Page 103
■ 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 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
88
Receiving station
Page 104
Chapter 3. Communications Operations of BHT-5000
■ 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 3 seconds
ENQ
ENQ
(1) (2)
(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
89
Receiving station
Page 105
■ 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 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 3 seconds
3 seconds or more
EOT (1) EOT (2) EOT (3)
EOT (10)
Abnormal termination
90
Receiving station
Page 106
Chapter 3. Communications Operations of BHT-5000
3.3.5 Aborting Data Transmission Pressing C key aborts data transmission. If C key is pressed during downloading, the BHT-5000 transmits an EOT and aborts the file transmission. If it is pressed during uploading, the BHT-5000 completes the block transmission and then aborts the file transmission.
91
Page 107
3.3.6 BCC for Horizontal Parity Checking To check whether data has been transmitted accurately, the BHT-5000 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
92
E T X
B C C
Page 108
Chapter 3. Communications Operations of BHT-5000
3.3.7 Text Format Text should be formatted according to the standard of the BHT-protocol before transmission. Shown below are two types of the standard text formats for program files 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
0 D 0 A 0 0 0
Example of contents
Object file (compiled from a source program file having one of the extensions .PD3, .FN3, and .EX3.)
93
0 0 0
If a program data field is less than the maximum digits in length, the upper blank bytes will be filled with zeros (0).
Page 109
■ Data Text Format (1) Heading text Number of fields (2 bytes) Length of data field 1 Length of data field n (2 bytes) (2 bytes) 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 contained (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).
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
T 1 0 0 9 1 S 1 2 3
Every data field should be 1 to 99 digits long.
NOTE
Data field n
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. 94