Reader-Host Interface Specification (Client Version).pdf

(2760 KB) Pobierz
FACTORY AUTOMATION
SPECIFICATION
READER-HOST-INTERFACE
CLIENT VERSION
READER HOST INTERFACE SPECIFICATION
With regard to the supply of products, the current issue of the following document is appli-
cable: The General Terms of Delivery for Products and Services of the Electrical Industry,
published by the Central Association of the Electrical Industry (Zentralverband Elektrotech-
nik und Elektroindustrie (ZVEI) e.V.) in its most recent version as well as the supplementary
clause: "Expanded reservation of proprietorship"
READER-HOST-INTERFACE SPECIFICATION
1
2
2.1
2.2
2.3
Scope ........................................................................... 4
Host to Reader Command Overview ......................... 6
Packetized Commands .............................................................................6
Text Commands ........................................................................................6
Barcode Commands .................................................................................6
3
3.1
Definitions ................................................................... 8
Notations ....................................................................................................8
4
5
5.1
5.2
Communication Medium .......................................... 10
Reader to Host Communication .............................. 12
Raw Data ..................................................................................................12
Packet Data ..............................................................................................12
6
6.1
6.2
6.3
6.4
Host to Reader Communication .............................. 18
Text Commands ......................................................................................18
Packetized Commands ...........................................................................19
Command Types......................................................................................20
Simple Protocol .......................................................................................27
7
8
9
10
10.1
Reader Settings......................................................... 30
Radio Commands ..................................................... 48
Code Reader Batch (CRB) System .......................... 50
Symbology Detail Settings ....................................... 52
PharamaCode ..........................................................................................52
11
12
Symbology Detail Settings ....................................... 54
Appendix: Example CRC16 C Code ........................ 56
3
READER HOST INTERFACE SPECIFICATION
Scope
1
Scope
This interface control document (ICD) specifies the communication protocol between the Code
Reader 2 and application software that runs on the host computer, specific reader commands,
examples of a variety of ways to communicate and send data to the reader (i.e., RS232, USB,
RF) and command/communication types.
It is important to note that some functionality has changed and/or been added for each
firmware release. Make sure to use the latest released firmware for both boot and app. ODT-
HH-MAH200/300 default values listed in Section 7 were compiled using firmware version 3280.
ODT-HH-MAH120 default values listed in Section 7 were compiled using firmware version
4070.
4
READER HOST INTERFACE SPECIFICATION
Host to Reader Command Overview
2
Host to Reader Command Overview
This section is intended to introduce developers/users to the basic command types of the
reader. There are two ways to send a command to the reader; from a host computer, or by
scanning a barcode containing a command sequence. In addition, there are two methods of
sending a command from a host computer to the reader; packetized and text commands.
2.1
Packetized Commands
Packetized commands are the most reliable way to communicate to the reader. The packet
consists of a prefix and a suffix. The prefix contains the amount of data to be transmitted and
the suffix contains error detection. Unlike text commands, packetized commands are always
enabled. (See Section 6.2).
2.2
Text Commands
Text commands are provided as an easy way to send a command to a reader but they lack the
reliability of packetized commands. In addition, text commands must be enabled. Text
commands can easily be sent from a terminal program and uses a %xx (similar to URL
encoding) to translate an escape sequence containing a 2-digit hex value to the corresponding
single 8-bit ASCII character. This allows non-printable ASCII characters to be entered via the
terminal program. Text commands can be sent via the RS232, USB Virtual COM or RF mode
by using appropriate communication software. In addition, the developer/user may send text
commands by using CRB files.
2.3
Barcode Commands
The reader will recognize the following sequence within a barcode as a command to thereader:
SOH ‘X’ GS STX
Text-Command
EOT
(Packet does not contain spaces)
The Text-Command portion contains a text command as described above. Because the
Barcode Command is terminated with ASCII EOT, the Text-Command may not contain EOT. If
the Text-Command needs to contain EOT, encode it as %04.
5
Zgłoś jeśli naruszono regulamin