DB-II Serial Communication Protocol
DB-II Serial Communication Protocol
Page 1 3/2/2007
DB-II Serial Communication Protocol
Page 2 3/2/2007
DB-II Serial Communication Protocol
Synchronization
Page 3 3/2/2007
DB-II Serial Communication Protocol
PC
Scale or
Printer TYPE I
1 1
6 Rx 6
Rx
GND 2 2
7 Tx 7
3 Tx 3
8 8
4 4
9 GND
9
5 5
D - S ub D - S ub
C o nnecto r C onnecto r
(9 pin) (9 p in)
[Figure 1.2] Arrangement connector pin of Scale (DSUB)
As [Figure 1.2] shown DB-II is wire connected with D-SUB connector and Main board.
TX, RX is connected to communicate with other RX, TX.
Connecting DB-II, PC, and DEP printer needs to make a cable which connected with DB-IIs 7th ground cable, and PC,
DEP printers 5th cable.
Page 4 3/2/2007
DB-II Serial Communication Protocol
NOTE: Scale ID is 1 enter 01, and if you are trying to find out Scale ID enter FF
* (default setting is 1)
Key Command
Description
Operation Value
ZERO 40h Activate ZERO Key
TARE 20h Activate TARE Key
MODE 10h Activate MODE Key
SET 08h Activate SET Key
SAMPLE 04h Activate SAMPLE Key
HOLD 02h Activate HOLD Key
PRINT 01h Activate PRINT Key
Download F1h Sending Scale setting value
Upload Req. F2h Request data from scale
[Table 1.2] Key Command Code
Key Command is Scale emulator for PC, (such as PC commands key function on computer and then connected scale work
just like as a scale key function) other key functions like, Download, Upload Request, etc. needs a text command to
function.
Page 5 3/2/2007
DB-II Serial Communication Protocol
Download F1h Weight Limit E7h Enter weight comparison Low Limit Value High Limit Value
Download F1h Percent Unit E9h Enter 100% weight Percent Unit Value N/A
Examples:
Page 6 3/2/2007
DB-II Serial Communication Protocol
Data Request Command (Scale PC)
Upload Req. F2h Count Limit E8h Request sample ITEM comparison
Upload Req. F2h Sample Unit EAh Request sample ITEM weight for Counting
Upload Req. F2h Percent Unit E9h Request to input 100% of weight
Upload Req. F2h Weight / PCS D2h Request weight and counting at same time
Your PC can get scale statues and setting value from Scale, by sending Command Packet.
This point you can transmit weight, and count value continuously.
Page 7 3/2/2007
DB-II Serial Communication Protocol
Scale sends back ACK Packet (acknowledgement packet) when PCs key command is successively arrived.
Also, when changing settings of scale (Parameter arrived successive and complete EEPROM writing on scale)
NOTE: ACK Packet contains transmitted Key Command
1.4.2. No Acknowledge
NAK Packet is failure massage of PC command. This packet sends back Error Code to PC for failure notice.
Also, sends back failure notice to PC when scale has error on scales Check sum error.
NOTE: NAK Packet contains transmitted Key Command and Error Command Format in case of failure (0x00, Scale ID
error = 0xFF)
Scale is concept of PCs server; PC requests a data and Packet has arrived from scale, and resending packet to scale as
[Figure 1.6] packet format. The data length can be changed, and recognizes packet by suffix.
Page 8 3/2/2007
DB-II Serial Communication Protocol
1.4.4. Examples
A [Figure 1.7] packet show continues transmitting weight values from scale.
[Figure 1.8] High Limit, Low Limit Data Format (Scale to PC)
[Figure 1.8] shows receiving H/L limit value at same time from scale.
[Figure 1.9] Weight Value and Count Value Data Format (Scale to PC)
[Figure 1.9] shows receiving format of both weight and counting value continuously from scale.
Page 9 3/2/2007
DB-II Serial Communication Protocol
2. Scheme
2.1. Normal Operation
Scale(Server) PC(Client)
COMMAND
Response_Data
In general operation data flow is flowing [Figure 2.1]. PC is client and the scale works as a server.
Continuous Function is NOT included
Scale PC
COMMAND
Response_Data
Response_Data
Response_Data
ESC
[Figure 2.2] shows continuous data transmission. For stopping, PC sending escape order to scale.
Page 10 3/2/2007
DB-II Serial Communication Protocol
Scale PC Scale PC
KEY_COMMAND KEY_COMMAND
ACK NACK
Operating scale by key command when command works well sends back ACK command. For the failure command sends
back NAK and Error code to PC
Page 11 3/2/2007