The text of a manual · part 12 of 20
Bar Code Handy Terminal BHT-4000 User's Manual: Chapter 3 Communications Operations of BHT-4000, pages 81 to 89
Pages 81 to 89 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 81
Chapter 3. Communications Operations of BHT-4000
Chapter 3 Communications Operations of BHT-4000
This chapter describes the communications operations of the BHT-4000--the RS-232C interface specifications, the basic communications specifications, and the BHTprotocol--for data transmission with the host computer or other devices. 3.1
RS-232C Interface Specifications .................................................................................... 72
3.1.1
For CU-4000 ................................................................................................................. 72
3.1.2
For BHT-4000 ............................................................................................................... 75
3.2
Basic Communications Specifications and Parameters ................................................ 77
3.2.1
Basic Communications Specifications ...................................................................... 77
3.2.2
Communications Parameters ..................................................................................... 80
3.3
BHT-Protocol ..................................................................................................................... 81
3.3.1
Overview ...................................................................................................................... 81
3.3.2
Control Characters ...................................................................................................... 82
3.3.3
Basic Format of Transmission Messages .................................................................. 84
3.3.4
Transmission Control Sequences .............................................................................. 85
3.3.5
Aborting Data Transmission ....................................................................................... 93
3.3.6
BCC for Horizontal Parity Checking ........................................................................... 94
3.3.7
Text Format .................................................................................................................. 95
71
Page 82
3.1 RS-232C Interface Specifications 3.1.1 For CU-4000 [ 1 ] Interface Connector and Pin Assignment The CU-4000 has an RS-232C interface port (Dsub-25S). 13
1
25
14
RS-232C interface port (Dsub-25S) on the CU-4000
Pin No.
Signal
Functions
Signal Input/Output CU-4000 External device
2
SD
Send data
→
3
RD
Receive data
←
4
RS
Request to send
→
5
CS
Ready to send
←
7
SG
Signal ground, 20
ER
Data terminal equipment ready
→
Pins 1 (FG), 6 (DR), and 8 (CD) are not connected.
The input/output voltage threshold for the logical valued signal is listed below. Logical Value
Input Voltage Threshold
Output Voltage Threshold
0
3V min.
5V min.
1
-3V max.
-5V max.
72
Page 83
Chapter 3. Communications Operations of BHT-4000
[ 2 ] Interface Cable Connection As illustrated below, connect the CU-4000 (which is joined with the BHT-4000) to a host computer with a cross-mode cable. To connect it to a modem, use a straight-mode cable. Host Computer (DTE)
CU-4000 (DTE)
1
FG SD RD RS CS DR SG CD ER
2 3 4 5 6 7 8 20
Cable Connection between CU-4000 and Host Computer
Modem (DCE)
CU-4000 (DTE)
1
FG SD RD RS CS DR SG CD ER
2 3 4 5 6 7 8 20
Cable Connection between CU-4000 and Modem
DTE and DCE In the RS-232C interface specifications, the DTEs (Data Terminal Equipment) shall be generally connected with each other by a cross-mode cable; the DTE and DCE (Data Circuit-terminating Equipment) shall be connected with each other by a straight-mode cable. The DTE is one piece of equipment connected at both ends of a communications line as a sender or receiver of data (such as CU-4000 joined with the BHT-4000 and a host computer). The DCE is one piece of equipment connected to the intermediate point between the DTE and the communications line. It terminates communications lines and exchanges information between those lines without any change in contents (such as modem).
73
Page 84
To transfer files at High Speed in Transfer Utility, connect the CU-4000 to a host computer as illustrated below.
Host Computer
CU-4000
1
FG
2 3 4 5
RS CS SG CD ER
7
74
Page 85
Chapter 3. Communications Operations of BHT-4000
3.1.2 For BHT-4000 [ 1 ] Interface Connector and Pin Assignment The BHT-4000 has a direct-connect interface port (QM connector) as shown below, which allows you to directly connect the BHT-4000 to a host computer or modem (or another BHT-4000) without any routing through the CU-4000. It supports a subset of the RS-232C interface.
2
4
6
8
1
3
5
7
Direct-connect Interface Port (QM connector) on the BHT-4000
The connector to be joined to the above port should be the Hirose QM connector (without locking, with hood). Signal Input/Output BHT-4000 External device
Pin No.
Signal
Functions
1 2 3 4 5 6 7 8
SD (GND) SD RD RS CS CD ER CHG
Ground for signals and charging pin Send data Receive data Request to send Ready to send Carrier detect Data terminal equipment ready Charging pin, → ← → ← ← → ←
The input/output voltage threshold for the logical valued signal is listed below. Logical Value
Input Voltage Threshold
Output Voltage Threshold
(RD)
(SD)
0
3V min.
5V min.
1
-3V max.
-5V max.
The direct-connect interface port is not designed to stand frequent connecting/ disconnecting. Do not plug and unplug basically more than one time a day; otherwise, the service life of the interface port will shorten. To connect the BHT4000 to a host computer frequently, use the CU-4000.
75
Page 86
[ 2 ] Interface Cable Connection Connect the BHT-4000 directly to a host computer, a modem, or a printer with a directconnect interface cable as illustrated below. BHT-4000 Direct-connect Interface
Host Computer
2 3 4 5 7 1
FG SD RD RS CS DR SG
6
ER
Cable Connection between BHT-4000 and Host Computer
BHT-4000 Direct-connect Interface
Modem
FG SD RD RS CS DR SG CD ER
2 3 4 5 1 6 7
Cable Connection between BHT-4000 and Modem
To transfer files at High Speed in Transfer Utility, connect the CU-4000 to a host computer as illustrated below. BHT-4000 Direct-connect Interface
Host Computer
2 3 4 5
RS CS SG CD ER
1
76
Page 87
Chapter 3. Communications Operations of BHT-4000
3.2 Basic Communications Specifications and Parameters 3.2.1 Basic Communications Specifications Listed below are the communications specifications when the BHT-4000 transacts data with a host computer through the optical interface (CU-4000) or direct-connect interface. Synchronization
Start-stop
Transmission Speed
300, 600, 1200, 2400, 4800, 9600, 19200, 38400* bps, or High Speed**
Transmission Code
JIS 7-bit/8-bit codes***
Transmission Bit Order
LSB (Least significant bit) first
Response Method
ACK/NAK response
Vertical Parity
Even, odd, or none
Transparency
Non-transparent mode
RS/CS Control
Enabled or disabled * Available only when the direct-connect interface port (QM connector) has been selected. ** Available only in Transfer Utility.
*** Including 7-bit/8-bit ASCII codes
■ Synchronization For accurate data transaction, it is very important to synchronize the transmission between the sender and receiver. To do this, it is required to previously define the bit order and position, the character length, and the beginning and end of the character to be transmitted. The start-stop synchronization is an asynchronous system which synchronizes each character as a unit; that is, it externally adds start and stop bits to the leading and trailing bit positions of the character to be transmitted, respectively. A clock starts counting on receiving the start bit and it falls into a non-communication state on receiving the stop bit. The number of the stop bits is selectable (1 or 2 bits).
■ Transmission Speed Maximum number of bits to be transmitted per second. Expressed in bps (bits per second).
77
Page 88
■ Transmission Code and Bit Order All characters should be coded to 7- or 8-bit code for data transmission. The standard data exchange code of the BHT-4000 is JIS 7- or 8-bit code. The transmission bit order is LSB (Least significant bit) first. What follows is an example for transmitting character A (41h, 01000001b) coded to JIS 8-bit code with an even parity and a single bit each for start and stop bits. LSB 1
MSB 0
0
0
0
0
1
0
0
Stop bit
Start bit
Parity bit
■ Response Method When two devices initiate communications, they exchange signals for correct data transmission. This procedure is called "handshaking." The sender sends a control code ENQ (05h) to the receiver meaning "Are you ready to receive data?", and the receiver replies to it with a control code ACK (06h) or NAK (15h) meaning "Positive" or "Negative" for starting data transmission, respectively. This sequence is also called "data link establishment phase."
■ Vertical Parity A vertical parity bit is a redundancy bit which is added to every character to be transmitted in order to check that data has been transmitted accurately. The parity bit should be set to "1" or "0" depending upon the parity parameter setting, to make the number of set bits in the character even or odd. The receiver counts the number of set bits in the transmitted character code to make sure that it has the selected number (even or odd) of set bits. The vertical parity bit is positioned immediately following the MSB (Most significant bit) as shown below. LSB b0
MSB b1 b2 b3 b4 b5 b6
(For 7-bit data) Vertical parity bit
LSB b0
MSB b1 b2 b3 b4 b5 b6 b7
(For 8-bit data) Vertical parity bit
78
Page 89
Chapter 3. Communications Operations of BHT-4000
■ Transparency The BHT-4000 uses the non-transparent mode which handles the control characters and codes (e.g. STX, ETX, and SOH) as starting or ending markers and does not allow them to be transmitted as normal data in the transmission texts.
■ RS/CS Control Depending upon whether the RS/CS control is enabled or disabled in System Mode, the BHT-4000 operation will differ as follows: RS/CS Control Enabled (ON)
BHT-4000 Operation If the CS signal is ON when the BHT-4000 is ready to send, the BHT-4000 will send data. If it is OFF, the BHT-4000 will wait for the CS signal to go ON until the timeout occurs. When the BHT-4000 becomes ready to receive data, it will turn the RS signal ON.
Disabled (OFF)
The BHT-4000 does not check the CS signal when starting data transmission. The RS signal is always ON.
The timeout length is fixed to three seconds in System Mode or Easy Pack 4.2. In user programs written in BHT-BASIC 3.0, the timeout length is programmable. If not designated in programming, it becomes three seconds.
For the RS/CS control in user programs written in BHT-BASIC 3.0, refer to the "BHTBASIC 3.0 Programmer's Manual."
79