Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 15 of 20

Bar Code Handy Terminal BHT-6000 User's Manual: Chapter 3 Communications Operations of BHT-6000, pages 116 to 125

Pages 116 to 125 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 116

Chapter 3. Communications Operations of BHT-6000

[ 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 in length and it consists of FILE NAME and .EXTENSION. The FILE NAME should be 1 to 8 characters. 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 in length, 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.)

101

0 0 0

If a program data field is less than the maximum digits in length, the lower blank bytes will be filled with zeros (0).

Page 117

■ 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 in length. 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 in length and it consists of FILE NAME and .EXTENSION. The FILE NAME should be 1 to 8 characters. 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 in length.

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 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.

102

Page 118

Chapter 3. Communications Operations of BHT-6000

3.3.2 BHT-Ir Protocol [ 1 ] Overview The BHT-Ir protocol is the communications procedure for the serial infrared link, which is used to transmit files between the BHT-6000 and a host (or between the BHT-6000s). It adopts the response method using ACK/NAK codes. The BHT-Ir protocol can be used also for communications through the direct-connect interface. The BHT-Ir protocol is composed of a defined set of the control character sequences including the following three phases:

Phase 1:

Establishment of data link The sending station confirms that the receiving station is ready to receive data.

Phase 2:

Data transmission The sending station transmits data to the target receiving station.

Phase 3:

Release of data link The sending station confirms whether or not all of the transmitted data has been correctly received by the receiving station. If yes, the sending station terminates the data transmission and releases the data link.

103

Page 119

[ 2 ] Control Characters The control characters are classified into two groups: transmission control characters and text control characters.

(1)

Transmission control characters

The transmission control characters listed below are used to compose transmission control sequences in phases 1 through 3. Symbol

Value

Meaning

Function

DLE EOT

1004h

End Of Transmission

Releases a data link (Phase 3). Requests abort of transmission (Phase 2).

DLE ENQ 1005h

Enquiry

Requests establishment of a data link (Phase 1). Prompts the receiver to respond to the sent text (Phase 2).

DLE ACK

1006h

Acknowledge

Acknowledgment response to DLE ENQ (Phase 1). Acknowledgment response to text (Phase 2). Acknowledgment response to DLE EOT (Phase 3).

DLE NAK 1015h

Negative Acknowledge

Negative acknowledgment response to DLE ENQ (Phase 1). Negative acknowledgment response to text (Phase 2).

WACK

103Bh

Wait for Acknowledge

Requests suspension of data reception during erasure of the flash ROM.

■ Transparency The BHT-6000 uses the transparent mode which allows the control characters and codes (e.g., STX, ETX, SOH, and DLE) to be transmitted as normal data in the transmission texts. To transmit a DLE as normal data, type DLE DLE per DLE.

104

Page 120

Chapter 3. Communications Operations of BHT-6000

(2)

Text control characters

The text control characters are used to format transmission texts. protocol, they include the following headers and a terminator. Symbol

Value

In the BHT-Ir

Meaning

Function

DLE SOH 1001h

Start Of Heading

Indicates the start of heading text (Phase 2).

DLE STX

1002h

Start Of Text

Indicates the start of data text (Phase 2).

DLE ETX

1003h

End Of Text

Indicates the end of data text (Phase 2).

In the BHT-Ir protocol, you cannot change the values of the headers and terminator with the protocol functions in BHT-BASIC 3.0.

105

Page 121

[ 3 ] Basic Format of Transmission Messages Basically, the BHT-6000 transmits data as units of a file. First, it transmits a heading text which includes the attribute information of a file (e.g., file name and the number of data texts) to be transmitted. Following the heading text, it transmits the data text in the file. A heading text and data text comprise a text. In actual text transmission, the text is divided into several blocks, then a header, terminator, serial number, receiver station’s ID, and CRC-16 (Cyclic Redundancy Check) are added to each block. This procedure forms a transmission block. A set of transmission blocks makes up one transmission message. Shown below is an example of a transmission message formed with the BHT-Ir protocol.

Text

Heading text

S D L • O H E

Data text 1

Data text 2

I Heading text D

Data text n

E D L • T X E

C R C

Transmission block

E D L • T X E

C R C

Transmission block

E D L • T X E

C R C

Transmission block

(2 bytes)

Transmission Message

S D L • T X E

S D L • T X E

I D

I

Serial number

Data text 1

(5 bytes)

Serial number

Data text 2

D

In the above figure, DLE SOH, DLE STX and DLE ETX are text control characters as described in [ 2 ] Control Characters. An ID denotes the ID number of the receiver station, expressed by two bytes. A serial number is expressed by a five-digit decimal number, starting from 00001 to 32767, and identifies data texts. For the CRC-16, refer to [ 6 ] CRC.

TIP

You can use the control characters for expressing IDs serial numbers, or text data. For DLEs, type DLE DLE per DLE.

106

Page 122

Chapter 3. Communications Operations of BHT-6000

[ 4 ] 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

107

Page 123

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 LINKUP TIME screen in System Mode (p. 51) and the XFILE statement given in "BHT-BASIC 3.0 Programmer’s Manual." 108

Page 124

Chapter 3. Communications Operations of BHT-6000

■ Abnormal termination of phase 1 (Abort of phase 1) If the sending station receives no sequence of DLE ACK and IDs from the receiving station after sending a sequence of DLE ENQ and IDm 60 times in succession, it sends a sequence of DLE EOT and IDm to the receiving station after 0.5 second from the 60th sequence of DLE ENQ and IDm, then aborts the message transmission abnormally.

Sending station

Receiving station DLE ENQ and IDm (1)

0.5 second DLE ENQ and IDm (2)

0.5 second DLE ENQ and IDm (3)

DLE ENQ and IDm (60)

0.5 second DLE EOT and IDm

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").

109

Page 125

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 a sequence of DLE ACK and IDs from the receiving station, it sends a transmission block containing the data texts as shown below. Upon receipt of a sequence of DLE ACK and IDs 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

DLE ACK and IDs

Data text 1

DLE ACK and IDs

Data text n-1

DLE ACK and IDs

Data text n

DLE ACK and IDs

To phase 3.

110