The text of a manual · part 10 of 44
EZ Match Imager User Manual, pages 91 to 100
Pages 91 to 100 of 431
The original document is the PDF (3.5 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 Microscan EZ Match
Page 91
Communications
Protocol Configuration Examples Point-to-Point (Main Port) <K100,8,0,1,1> <K140,0> <K102,0>
Baud Rate: 115.2K; Parity: None; Stop Bits: 2; Data Bits: 8 Point-to-Point RS-232 enabled; <K102,1> = RS-422 enabled
Polling Mode (Main Port) <K100,4,0,1,1> <K140,5,23> <K102,0> <K143,30>
Baud Rate: 9600; Parity: None; Stop Bits: 2; Data Bits: 8 Polling Mode; Address: 23 RS-232 Point-to-Point polling; <K102,1> = RS-422/RS-485 true multidrop (switched transmitter) 30 ms Response Timeout
“User-Defined” Polling Mode (Main Port) <K100,4,0,1,1> Baud Rate: 9600; Parity: None; Stop Bits: 2; Data Bits: 8 <K140,5,12> Polling Mode; Address: 12 <K148,,08,09,18,0B,0C,0D> Default RES (0x04), REQ=0x08; EOT=0x09; STX=0x18; ETX=0x0B; ACK=0x0C; NAK=0x0D <K102,0> RS-232 Point-to-Point polling; <K102,1> = RS-485 (true multidrop with switched transmitter) <K143,40> 40 ms Response Timeout
ACK / NAK (Main Port) <K100,9,0,1,1> <K140,4> <K147,,,01,1B,2E,1F> <K102,1> <K143,50>
Baud Rate: 230K; Parity: None; Stop Bits: 2; Data Bits: 8 ACK/NAK Default RES and REQ (00, disabled); STX=0x01; ETX=0x1B; ACK=0x2E; NAK=0x1F RS-422 enabled; <K102,0> = RS-232 enabled 50 ms Response Timeout
Auxiliary Port
Listed below are several examples of Auxiliary Port commands. <K101,2,4,0,1,1> <K101,1,5,0,1,1> <K101,3,7,0,1,1> <K101,5,6,0,1,1>
Half Duplex; Baud Rate: 9600; Parity: None; Stop Bits: 2; Data Bits: 8 Transparent; Baud Rate: 19.2K; Parity: None; Stop Bits: 2; Data Bits: 8 Full Duplex; Baud Rate: 57.6K; Parity: None; Stop Bits: 2; Data Bits: 8 Command Processing; Baud Rate: 230K; Parity: None; Stop Bits: 2; Data Bits: 8
EZ Match User Manual
4-23
Page 92
USB HID Interface
USB HID Interface The USB version of the EZ Match Imager operates as an HID (Human Interface Device) on the USB bus. HID-class devices communicate via “report” packets. An HID may support multiple report types, each of which is identified with a unique report ID. The EZ Match supports two different report types: • Microscan HID Report (ID = 1) • Keyboard Report (ID = 2) The imager always outputs the same data for both report types. The user may enable or disable either report type. Regardless of the report type used by the host application, the application protocol via USB is identical to RS-232 / RS-422 ports. HID Reports are used as a channel for standard Microscan imager communication, command input, and symbol data output. Important: No matter how the imager is configured, it is always able to receive and respond to commands from the host application using Microscan HID Reports.
4-24
EZ Match User Manual
Page 93
Communications
Report Options The following functionality conditions hold true regardless of how HID Reports are configured: 1. The host application must establish a connection with the imager to receive Microscan HID IN Reports (symbol data) and to send Microscan HID OUT Reports (commands, serial triggers). 2. The imager can always receive Microscan HID OUT Reports (commands, serial triggers). 3. The host application can always send commands through Microscan HID OUT Reports. If the command requires a response (a part number, for example), the imager will always send the response through Microscan HID IN Reports. 4. The imager always ignores Keyboard OUT Reports sent by the host operating system. 5. The content of both the Keyboard Reports and Microscan HID IN Reports is identical, except for Keyboard Reports non-printable data limitations.
Microscan HID IN Reports HID Reports are used as a channel for standard Microscan imager communication, command input, and symbol data output. There are two types of Microscan HID Reports: Report Type Microscan HID IN (imager to host) Microscan HID OUT (host to imager)
Data Content Symbol data; No Reads; Service messages Commands; serial triggers
Note: The imager is always able to receive commands and serial triggers from the host through Microscan HID OUT Reports, regardless of the Microscan HID IN Report status. If the imager receives a command that requests a response, such as a part number query, the imager will send a Microscan HID IN Report regardless of the IN Report status. Serial Cmd: Default: Options:
<K149,Microscan HID IN Report status,Keyboard IN Report status> 1 0 = Disabled 1 = Enabled
Microscan HID IN Reports Enabled When this feature is enabled, the imager will send Microscan HID IN Reports to the host, containing data originated by the imager.
Microscan HID IN Reports Disabled
When this feature is disabled, the imager will not send Microscan HID IN Reports to the host, containing data originated by the imager.
EZ Match User Manual
4-25
Page 94
USB HID Interface
Keyboard IN Reports The host operating system will interpret Keyboard IN Reports from the imager as if the user were typing keyboard text. The host operating system sends keystrokes to the current application. This is commonly called a Keyboard Wedge configuration. There is one type of Keyboard Report used: Report Type Keyboard IN (imager to host)
Data Content Symbol data; No Reads; Service messages
Note: If Keyboard IN Reports is enabled, and Microscan HID IN Reports is disabled, the read cycle must be Continuous Read 1 Output, because there will be no External Trigger or Serial Trigger. It is not possible to send commands to the imager as Keyboard OUT Reports. To send commands to the imager via USB, the host application must establish a connection with the imager and send Microscan HID OUT Reports. Serial Cmd: Default: Options:
<K149,Microscan HID IN Report status,Keyboard IN Report status> 0 0 = Disabled 1 = Enabled
Keyboard IN Reports Enabled
When this feature is enabled, the imager will send Keyboard IN Reports to the host, containing data originated by the imager.
Keyboard IN Reports Disabled
When this feature is disabled, the imager will not send Keyboard IN Reports to the host, containing data originated by the imager.
4-26
EZ Match User Manual
Page 95
Communications
Microscan HID Report Format Size: 64 bytes, fixed-length. The USB HID standard defines all reports as being fixed-length. Structure: REPORT ID (1) LENGTH (1) DATA (62) Values in parentheses indicate the size, in bytes, of the field.
Field Descriptions REPORT ID Size: 1 byte Value: 0x01 Note: Report ID is the method employed by USB HID to allow multiple report formats to be sent and received from the same interface. LENGTH Size: 1 byte Value: 0-62 Note: Length indicates the number of valid data bytes in the fixed-length data field. This is necessary because the USB HID standards define HID Reports as fixed-length, yet the imager or host may require a smaller data size in any given report. DATA Size: 62 bytes, fixed-length Value: 0x00 to 0xFF Note: The Data field is left-justified, meaning it begins immediately after the Length field. All unused data space is NUL (00 in hex) padded. Data values can be “binary”, meaning that they span the entire 8 bit range of 0x00 to 0xFF.
EZ Match User Manual
4-27
Page 96
USB HID Interface
Report Format Examples For clarity, all report format examples are shown as follows: report fields separated by an underscore ( _ ), REPORT ID and LENGTH fields shown as decimal values, data fields shown as printable ASCII characters, and the number of NUL padding bytes shown as decimal values (nn). IN report (to host) 1_11_A]002374938 (51) REPORT ID = 1 = Microscan HID LENGTH = 11 DATA = ”A]02374938” = This is a Code 39 symbol. NUL padding = 51 bytes OUT report (from host to imager) 1_27_<K200,3><K220,0,300><K714?> (35) REPORT ID = 1 = Microscan HID LENGTH = 27 DATA = “<K200,3><K220,0,300><K714?>” = These commands enable External Edge, set a 3 second timeout, and request the No Read configuration command. NUL padding = 35 bytes IN report (to host) 1_62_<K714,1, A LONG MESSAGE STREAMED OVER MULTIPLE MICROSCAN HID RE (0) REPORT ID = 1 = Microscan HID LENGTH = 62 DATA = “<K714,1, A LONG MESSAGE STREAMED OVER MULTIPLE MICROSCAN HID RE” = This shows the response to the <714?> command. Note that the command status response is not yet complete. See the next report example for the complete response. NUL padding = 0 bytes IN report (to host) 1_6_PORTS>(56) REPORT ID = 1 = Microscan HID LENGTH = 6 DATA = “PORTS>” = This is the end of the response to the <K714?> command from the previous example. The entire <K714> command response is as follows: DATA = “K714,1, A LONG MESSAGE STREAMED OVER MULTIPLE MICROSCAN HID REPORTS>” . NUL padding = 56 bytes
4-28
EZ Match User Manual
Page 97
Communications
Keyboard Report Format
Size: 9 bytes, fixed-length. Structure: REPORT ID (1) MODIFIER (1) RESERVED (1) KEYCODES (6) Values in parentheses indicate the size, in bytes, of the field. Important: The host application does not need to understand and process Keyboard Reports. This task belongs to the host operating system. Keycodes are passed to the host application as if a user were typing keyboard text. The host application must be the active application in order to receive keystrokes. Keyboard Reports protocol requires that two reports be sent for every keystroke. The first report indicates which key is pressed. The second report indicates “no key pressed”, with all keycodes NUL (00 in hex) to indicate that all keys have been released. In the case of the EZ Match, each byte output is equivalent to a keystroke, with a “key pressed” report and a “no key pressed” report. For this reason, data rates are much slower when using Keyboard Reports.
Field Descriptions REPORT ID Size: 1 byte Value: 0x02 Note: Report ID is the method employed by USB HID to allow multiple report formats to be sent and received from the same interface. MODIFIER Size: 1 byte Value: 0x00 to 0xFF Note: Modifier is an 8 bit field, corresponding to the state of the modifier keys at the time the keycode field was generated. Bit
Key
0
LEFT CTRL
1
LEFT SHIFT
2
LEFT ALT
3
LEFT GUI
4
RIGHT CTRL
5
RIGHT SHIFT
6
RIGHT ALT
7
RIGHT GUI
EZ Match User Manual
4-29
Page 98
USB HID Interface
Field Descriptions RESERVED Size: 1 byte Value: 0x00 Note: This field is Reserved. Its value is always NUL (00 in hex). KEYCODES Size: 6 bytes Value: 0x00 to 0xFF Note: The EZ Match translates 8 bit data values into Keycode data in the following ways: 8 Bit Data Value
Keycode Data
0x00 to 0x1F and 0x7F to 0xFF
Decimal key ( . ) unless otherwise noted.
CR, 0x0D
Enter key
TAB, 0x09
Tab key
ESC, 0x1B
ESC key
“Printable” characters, 0x20 to 0x7E
These all translate to the keystrokes that produce them. This includes a-z, 0-9, punctuation, and SHIFT in the Modifier field, when necessary. Only the first Keycode in the 6 byte array will be populated.
4-30
EZ Match User Manual
Page 99
Communications
USB HID Configuration Options The user has the following options for configuring and defaulting a USB version of the EZ Match Imager:
Configuration Symbols (Data Matrix with “Configure Reader” Flag) Symbol configuration can be performed “out-of-the-box”, as the EZ Match is configured for Continuous Read Mode, and Data Matrix is enabled by default. Data Matrix symbols are used to encode configuration commands when the symbology’s “configure reader” flag is set. If the read cycle is changed, or if Data Matrix is disabled, another configuration/default method must be used. This is because the USB EZ Match has no external trigger, unless the user has configured the EZ Button as a trigger.
EZ Button Configuration By default, basic calibration can be initiated from the EZ Button (3 beeps). Note that this only changes the camera, image processing, and symbology settings of the imager. To default the USB EZ Match, hold down the EZ Button during power-on. Note: This only overwrites Power-On settings with Custom Default settings, as when the <Zrc> command is received. It does not overwrite Power-On settings with Factory Defaults, as when the <Zrd> command is received. If Custom Defaults are misconfigured, another method must be used to default the imager.
Implementing the Host Operating System API and Establishing a Connection with the Microscan HID Interface When a connection is made, the host can send serial configuration/default commands. The imager will always be able to receive configuration commands from the host application and send responses to those commands. However, the imager can be configured to stop producing IN Reports to the host from symbol data output and diagnostics (service messages).
EZ Match User Manual
4-31
Page 100
USB HID Interface
Configuration Exceptions for USB Read Cycle Mode By default, the imager operates in Continuous Read Mode. If the imager is configured using Data Matrix symbols, the read cycle mode should be the last item changed before saving the configuration settings and beginning operation. This is because all read cycle modes other than Continuous Read Mode require a trigger event. In USB, a trigger event can only be initiated by serial command. To send a trigger command the imager, the host application must establish a connection with the imager’s Microscan HID interface and send the trigger command in a Microscan HID Report.
The following read cycle conditions are required for the USB EZ Match: Serial Cmd: Default: Options:
<K200,read mode> Continuous 0 = Continuous Mode 1 = Coninuous Read 1 Output Mode 2 = Level Mode 3 = Edge Mode 4 = Serial Mode 5 = Serial and Edge Mode
Important: • To use Level Mode, you must enable Undelimited Start Trigger Character <K229> and Undelimited End Trigger Character <K230>. • To use Edge Mode, you must enable and use the Undelimited Start Trigger Character <K229>. • To use Serial Mode, you must use the Delimited Trigger defined by <K201>, or enable and use the Undelimited Start Trigger Character <K229>. • To use Serial and Edge Mode, you must use the Delimited Trigger defined by <K201>, or enable and use the Undelimited Start Trigger Character <K229>.
Communications For the USB version of the EZ Match, no communications serial commands have any effect on the imager except the following: • USB HID Report Status <K149> • Preamble <K141> • Postamble <K142>
EZ Button Default on power-on cannot be disabled <K770,,default> = <K770,,1>. This ensures a level of safety for recovering from misconfigured Power-On settings <Z>. However, it is not foolproof, as defaulting with the EZ Button only recovers Custom Default settings, which can be misconfigured themselves. For this reason, do not save to Custom Default settings <Zc> until the imager’s configuration has been tested.
Symbologies If the imager is going to be configured with Data Matrix symbols, do not disable Data Matrix <K479>. Disabling Data Matrix will prevent the imager from reading configuration symbols. 4-32
EZ Match User Manual