About OPOS Drivers for Scanner and Scale

NOTE: Zebra OPOS Scanner/Scale supports OPOS CCO (Common Control Object) v1.14.1.

Overview

The Zebra OPOS Driver enables bar code data communication between any scanner and an OPOS compliant POS application via either a USB (IBM Hand-held and SNAPI) or RS-232 (Wincor-Nixdorf Mode B and SSI) connection. This driver provides an interface for reading bar code data, receiving events, opening, claiming, and enabling/disabling the device in accordance with the UPOS committee's version 1.14 specification. The OPOS specification defines a two-layer open-driver software architecture between a POS application running on a Microsoft Windows operating system and the physical POS hardware device.

  • The upper layer, known as the Common Control Object (CCO), is an ActiveX Control that the POS application uses to interact indirectly with the Zebra scanner. The CCO is unique to each POS device class (e.g., scanners, scales, printers) and is provided by the UPOS committee. To simplify development and integration, the Zebra Scanner SDK includes a Monroe CCO (a vendor-independent scanner CCO). The control object (.ocx) file is located in the corresponding scanner or scale \Bin folder.
  • The lower layer, known as the Service Object (SO), is an in-process OLE Automation Server (a DLL) and is used to interact directly with the POS device, in this case the scanner. The Service Object is unique to each specific vendor's POS device. The Zebra Scanner SDK contains the Zebra specific SO.

The Zebra OPOS Driver also enables weight data communication between a scale equipped MP6200 scanner and an OPOS compliant POS application via either a USB (IBM Table-top and SNAPI) or RS-232 (SSI) connection. This driver provides an interface for reading weight data, receiving events, opening, claiming, and enabling/disabling the device in accordance with the UPOS committee's version 1.14 specification.

Zebra Scanner OPOS Driver Architecture

Figure 1: Zebra Scanner OPOS Driver Architecture

For more information about OPOS, OPOS architecture, terminology, and programmer's guides, refer to:


Version History

Please refer Barcode Scanner SDK for Windows release notes for more details.


Installation & Configuration

Overview

This chapter describes installation instructions and settings to configure the Zebra Scanner OPOS Driver on a host computer.

For custom installation instructions, refer to the Zebra Scanner SDK for Windows Developer's Guide (p/n 72E-149784-xx)

NOTE OPOS components are installed by default with the standard Scanner SDK installation. If a custom Scanner SDK installation is performed, the OPOS option must be selected to install the OPOS components.


Configuration

After a successful installation of the Zebra Scanner SDK with the OPOS driver, the following system registry entries are created at:

HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\Scanner\ZEBRA_SCANNER

or

HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\Scale\ZEBRA_SCALE

The Zebra Scanner OPOS Driver reads the registry entry above to retrieve required configurations, for example baud rate for serial scanners, and scanner filtering rules to form the logical scanner defined by the user.

See Appendix, WINDOWS REGISTRY KEYS for OPOS DRIVER for descriptions of supported registry keys.

Scanner Configuration Bar Codes

Scan the Set All Defaults bar code below to return all parameters to the scanner's default values. Refer to the scanner's Product Reference Guide for default values.

Set All Defaults

Scan the appropriate bar code below to configure the scanner for either USB or RS-232 communication protocols.

USB Communication Protocol

IBM USB Hand-held with Full Scan Disable
IBM USB Table-top

RS-232 Communication Protocol

SSI
Wincor-Nixdorf RS-232 Mode B (Scanner only)

NOTE: To configure serial communication settings refer to the Zebra Scanner SDK for Windows Developer's Guide (p/n 72E-149784-xx).


Properties, Methods & Events

Overview

The following steps depict the behavioral model of the OPOS driver and scanner.

  1. The scanner reads encoded data from a label.
  2. When the Control receives input, it queues a DataEvent.
  3. If the AutoDisable property is TRUE, the Control is disabled when a DataEvent is queued.
  4. The Control can deliver a queued DataEvent to the application when the DataEventEnabled property is TRUE. Just before delivering this event, the Control copies the data into properties and disables further data events by setting the DataEventEnabled property to FALSE. This causes the Control to queue subsequent input data while the application processes the current input and associated properties. When the application finishes the current input and is ready for more data, it re-enables events by setting DataEventEnabled to TRUE.
  5. The Control queues an ErrorEvent (or events) if it encounters an error while gathering or processing input, and delivers this to the application when the DataEventEnabled property is TRUE.
  6. The DataCount property contains the number of DataEvents queued by the Control.
  7. Call the ClearInput method to delete all input that the Control queued.

Scanned data is placed into the property ScanData. If the application sets the property DecodeData to TRUE, the data is decoded into ScanDataLabel and ScanDataType.

The following steps depict the behavioral model of the OPOS driver and scale.

  1. The user/OPOS application performs read weight operation scale.
  2. When the ReadWeight method successfully returns a value, scale control returns the weight data to the POS application.

Deviations from OPOS Specifications

The Zebra Scanner OPOS Driver includes several deviations from the OPOS specification for more flexibility. For example, the Claim method and Claimed property have significant deviations. According to the OPOS model, one control accesses only one physical device. The Zebra Scanner OPOS Driver allows access to multiple scanners simultaneously. Hence, a claim succeeds with one or more scanners. Also, several applications can share one scanner.

In addition to the Zebra Scanner OPOS Driver's architectural aspects, the following special behaviors occur:

  • When there is no scanner connected to a cordless base, Zebra Scanner OPOS Driver considers the cordless base a scanner. Therefore a claim succeeds with a cordless base.
  • In serial mode, a claim succeeds even when no scanner is connected to the port. In this case, it indicates the success of the port opening.
  • Since the Zebra Scanner OPOS Driver supports multiple scanners, it implements the OPOS retrieveStatistics method call with certain deviations.

    • When claiming multiple scanners, scanner details appear sequentially with comma separation. The order is the same for all scanner statistics.
    • When there are multiple scanners, OPOS schema validation can fail because some date fields contain comma-separated multiple dates.
    • Non-RSM scanners, including serial scanners in Wincor-Nixdorf RS-232 Mode B, do not provide Model Number and Serial number. These values appear as empty strings.

Supported Feature Set

This section describes the supported feature set per the OPOS specification.

Properties

Table 1: Common Properties

Property Version Type Access May Use After Comments on Zebra Scanner Support
AutoDisable 1.2 Boolean R/W Open Supported
BinaryConversion 1.2 Int32 R/W Open Supported
CapCompareFirmwareVersion 1.9 Boolean R Open Not Supported
CapPowerReporting 1.3 Int32 R Open Not Supported
CapStatisticsReporting 1.8 Boolean R Open Supported
CapUpdateFirmware 1.9 Boolean R Open Not Supported
CapUpdateStatistics 1.8 Boolean R Open Supported
CheckHealthText 1.0 String R Open Supported
Claimed 1.0 Boolean R/W Open Supported (see Deviations from OPOS Specifications)
DataCount 1.2 Int32 R Open Supported

Table 2: Scanner Specific Properties

Property Version Type Access May User After Comments on Zebra Scanner Support
DecodeData 1.2 Boolean R/W Open Supported
ScanData 1.0 BSTR R Open Supported
ScanDataLabel 1.2 BSTR R Open Supported
ScanDataType 1.2 Int32 R Open Supported

Methods

Table 3: Common Methods

Method Version May Use After Comments on Zebra Scanner Support
Open 1.0 n/a Supported
Close 1.0 Open Supported
ClaimDevice 1.0 Open Supported (see Deviations from OPOS Specifications)
ReleaseDevice 1.0 Open & Claim Supported
CheckHealth 1.0 Open, Claim & Enable Supported
ClearInput 1.0 Open & Claim Supported

Events

Table 4: Events

Event Version May Use After Comments On Scale Support Comments on Scanner Support
DataEvent 1.0 Open, Claim & Enable Supported Supported
DirectIOEvent 1.0 Open, Claim Supported Supported
ErrorEvent 1.0 Open, Claim & Enable Supported Not Supported
StatusUpdateEvent 1.3 Open, Claim & Enable Supported Supported

Sample Apps

Scanner OPOS Sample Application

Overview

The Zebra Scanner OPOS Driver suite ships with a sample application that demonstrates all the OPOS operations on a connected Zebra scanner.


OPOS Sample Applicaton (Scanner OPOS Test Utility)

The Scanner OPOS Test Utility allows you to simulate an application communicating with the Zebra Scanner OPOS Driver. This utility displays scanned data received from the scanner through the Zebra Scanner OPOS Driver. The Zebra Scanner SDK includes source code for this VC++ test utility.


OPOS Test Utility Window Functionality

Figure 2: Scanner OPOS Sample Application

Table 5: Scanner OPOS Test Utility Button/Field Functionality

Button / Field / Checkbox Description Values Code Samples
Open Open Method ZEBRA_SCANNER m_ctScanner.Open("ZEBRA_SCANNER");
Claim Claim the device with time out value. -1, Any integer starting from zero m_ctScanner.Claim(1000);
Device Enable Enable the scanner. Must enable before using scanners. n/a m_ctrScanner.SetDeviceEnabled(TRUE);
Device Disable Disable the scanner. n/a m_ctrScanner.SetDeviceEnabled(FALSE);
Release Release the scanner. n/a m_ctrScanner.ReleaseDevice();
Close Close the scanner. n/a m_ctrScanner.CloseDevice();
Recorded Data
Scan Data Label Label of the scan data. n/a m_ctrScanner.GetScanDataLabel();
Scan Data Type Type of the scanned data. This is only a readable property. n/a m_ctrScanner.GetScanDataType();
CH Internal Perform a Health check. The device is tested to the extent possible. n/a m_ctrlScanner.CheckHealth(OPOS_CH_INTERNAL);
CH External Perform a Health check. The device is tested, and a Beep command is Sent to the Device. n/a m_ctrlScanner.CheckHealth(OPOS_CH_EXTERNAL);
CH Interactive Perform an interactive test of the device. When executed, display a modal dialog box to present test options and results. n/a m_ctrlScanner.CheckHealth(OPOS_CH_INTERACTIVE);
Data Event
Clear Input Clear method. Clears the input data. n/a m_ctrScanner.ClearInput();
Decode Data Set decode data enable. n/a m_ctrScanner.SetDecodeData(1);
Data Events Set data event enabled. Must enable data event to get data. n/a m_ctrlScanner.SetDataEventEnabled(1);
Auto Enable Check box to automatically enable the scanner after a decode scan. n/a Refer to OPOS Scanner Sample Application source code provided with the SDK installation.
Statistics And Clear Input Properties
Retrieve Retrieve statistic. GoodScanCount m_ctrlScanner.RetrieveStatistics(&test);
Reset Statistics Reset statistics GoodScanCount m_ctrlScanner.ResetStatistics("GoodScanCount");
Update Statistics Update statistics GoodScanCount CString strTemp;
m_nGoodScanCount=100;
strTemp.Format("GoodScanCount=%d",m_nGoodScanCount );
m_ctrlScanner.UpdateStatistics(strTemp);
Clear Input Properties Clear input properties n/a m_ctrlScanner.ClearInputProperties();
Properties and Methods
Set Properties Set the value of property to the given value. n/a m_ctrScanner.SetFreezeEvents(0);
m_ctrScanner.SetAutoDisable(1);
Result Values
Return Value Return value of the last function call. This is only a readable property.
Result Code Return value of result code. This is only a readable property. m_ctrScanner.GetResultCode();
Direct IO
Command Select the Direct IO command to be executed. n/a
Execute Execute the selected command. n/a

Viewing Bar Code Data

To view bar code data using the Scanner OPOS Test Utility:

  1. Scan the USB OPOS (Hand-held) bar code, SNAPI bar code or Wincor-Nixdorf RS-232 Mode B bar code on Scanner Configuration Bar Codes to configure the scanner for the correct communication protocol.
  2. Under the folder \Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scanner OPOS\Sample Applications\bin, enter the sub-folder appropriate to the host architecture (x86 or x64) and run Scanner-OPOS-Test.exe to launch the Scanner OPOS Test Utility.
  3. Select Open. The Open Service Object window appears.
  4. Select Ok to use the Zebra Scanner Service Object that the Scanner SDK Installshield setup program loaded on the PC.
  5. Select Claim
  6. Select Device Enable
  7. Select Data Events
  8. Select Decode Data
  9. Scan the following sample bar code:

    UPC-A 0-1234567890-5
  10. Select Data Events to view the scanned UPC-A bar code data. The bar code data that the driver processed appears in the Scan Data Label and Scan Data Type boxes:

    Figure 3: Scanner OPOS Sample Application - Scan Data

  11. Select Clear Input to clear the data from the Scan Data Type and Scan Data Label boxes.
  12. To perform a second test, scan another bar code.

Getting and Setting OPOS Properties

This utility allows getting and setting the OPOS properties of the Zebra Scanner OPOS Driver via the Properties And Methods drop-down list.

To get and set the OPOS properties of the Zebra Scanner OPOS Driver:

  1. Scan the USB OPOS (Hand-held) bar code, SNAPI bar code or Wincor-Nixdorf RS-232 Mode B bar code on Scanner Configuration Bar Codes to configure the scanner for the correct communication protocol.
  2. Under folder \Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scanner OPOS\Sample Applications\bin, enter the sub-folder appropriate to the host architecture (x86 or x64) and run Scanner-OPOS-Test.exe to launch the Scanner OPOS Test Utility.
  3. Select Open. The Open Service Object window appears.
  4. Select Ok to use the Zebra Scanner Service Object that the SDK Installshield loaded on the PC.
  5. Select Claim
  6. Select Device Enable
  7. Select a configurable (setable) property in the Properties And Methods drop-down list. You can configure some properties (e.g., AutoDisable, FreezeEvents); other properties are read only (e.g., ServiceObjectVersion, DataCount).
  8. The current value of the OPOS driver appears in the edit box below the property selected in the list box. The values 1 and 0 represent true and false, respectively.
  9. To change the configurable property, change the value in the edit box and select Set Properties. This updates the property with the new value.

Creating a Custom OPOS Sample Application

You may use any programming language to create a custom OPOS sample application. However, Microsoft supported languages are recommended (e.g., Visual Basic, Visual C++ or C#).

To create a custom OPOS sample application:

  1. Create a project in the desired Microsoft Visual Studio development environment.
  2. Select Choose Toolbox Items… from the Tools menu.
  3. Select (check) OPOS Scanner Control from the COM Components tab.
  4. Add OPOSScanner.ocx to the project.
  5. Drag and drop to the form/Dialog window.
  6. Add a variable (handle) for the scanner control added to the form/Dialog window.
  7. Call Open(), Claim() methods [e.g., Open ("SYMBOL_SCANNER"); Claim (2000);].
  8. SetDeviceEnabled to TRUE.
  9. Set Freeze Events property to FALSE [e.g., SetFreezeEvents (FALSE)].
  10. SetDataEventsEnable to TRUE to get scan data events.
  11. When done, SetDeviceEnabled to FALSE, Release() and Close() the service.
  12. Call Device Disable property, release and close methods to close the connection.

Return Value and Result Code

When calling any method, check whether the return value is 0 (=OPOS_SUCCESS) to ensure the method is successful. Otherwise it returns an error code, which indicates the reason for the error. After setting property values, check that the result code returns 0 (=OPOS_SUCCESS), indicating success. If unsuccessful, it returns an error code.


Direct IO

The OPOS driver does not support any direct I/O functions to the scanner. However, an application developer can get management access to an RSM-ready scanner through the Zebra Scanner SDK. Refer to the Zebra Scanner SDK for Windows Developer's Guide (p/n 72E-149784-xx) for more information.


Statistics Methods

The Zebra OPOS Driver supports the retrieveStatistics, resetStatistics, and updateStatistics methods. GoodScanCount is the only defined statistic in the Zebra OPOS Driver and can be used as a parameter for these methods.


Modified Claim Functionality

Model number, serial number and the Type (Scanner Host Mode) parameters are available in the system registry as configurable entries so that user can configure them according to the business requirement. Claiming a scanner compares the scanner details provided in system registry with the attached scanner properties. The claim is successful when they match.

Enter * to include anything for the particular entry. For example, enter * for the serial number to claim scanners with any serial number. Otherwise, the claim is successful only if the provided serial number and model number matches the present scanner.

For the model number and serial number, provide the exact value, or part of the string and a star (*). Do not enter a star (*) in the middle of a string; in this case, all data after star (*) is ignored. Provide a value and star as a model number (e.g., LS4208*) to accept all scanners starting with that model number (LS4208). Provide a star (*) for the serial number to accept all scanners regardless of serial number.

It is required to add the full name of each scanner type as a comma or space delimited list to enable the scanners to be Claimed. As an example, to include SNAPI scanners and IBM hand- held mode scanners the "Type" entry should be (USBIBMHID SNAPI). To include all scanner modes (Types) the value should be (ALL)

Since non-RSM scanners, including serial scanners in Wincor-Nixdorf RS-232 Mode B, do not provide the model number and serial number, to claim these scanners set a " * " to both ModelNumber and SerialNumber registry values.


Scale OPOS Sample Application

Overview

The Zebra Scale OPOS Driver suite ships with a sample application that demonstrates all the OPOS operations on a connected Zebra scale.


Scale OPOS Sample Application

The Scale OPOS Sample Application allows you to simulate an application communicating with the Zebra Scale OPOS Driver. This utility displays received weight data from the scale through the Zebra Scale OPOS Driver. The Zebra Scanner SDK includes source code for this VC++ test utility.

Scale OPOS Sample Application Window Functionality

Figure 4: Scale OPOS Sample Application

Table 6: Scale OPOS Sample Application Button/Field Functionality

Button / Field / Checkbox Description Values Code Samples
Open Open Method ZEBRA_SCALE OposScale.Open("ZEBRA_SCALE");
Claim Claim the device with time out value. -1, Any integer starting from zero OposScale.ClaimDevice(1000);
Device Enable Enable the scale. Must enable before using scale. n/a OposScale.put_DeviceEnabled(TRUE);
Device Disable Disable the scale n/a OposScale.put_DeviceEnabled(FALSE);
Release Release the scale n/a OposScale.ReleaseDevice();
Close Close the scale n/a OposScale.Close();
ReadWeight Read the weight on the scale &lweightData is the weight on the scale (a pointer to the variable holding the returned weight value). 5000 is the time in milliseconds to wait before returning an error (if no valid weight measurement read). OposScale.ReadWeight(&lweightData, 5000);
Zero Scale Set the scale weight value to zero n/a OposScale.ZeroScale();
Async Mode Set the AsyncMode Property True, false OposScale.put_AsyncMode(true);
Clear Input Sets all properties populated as result of firing DataEvent or ErrorEvent back to their default value. True, false OposScale.ClearInput();
Status Notify Enables Live Weight values (must be set before Device Enable is sent to the scale). True, false OposScale.put_StatusNotify(true);
Live Weight Reports the Live Weight value. Refer to OPOS Scanner Sample Application source code provided with the SDK installation.
Freeze Events Freeze events True, false OposScale.put_FreezeEvents(true);
DataEvent Enable Enable Data Events True, false OposScale.put_DataEventEnabled(true);
Set Property Set the value of property to the given value. n/a Refer to OPOS Scanner Sample Application source code provided with the SDK installation.
CH Internal Perform a Health check. The device is tested to the extent possible. n/a OposScale.CheckHealth(OPOS_CH_INTERNAL);
CH External Perform a Health check. The device is tested, and a Read Weight command is Sent to the Device. n/a OposScale.CheckHealth(OPOS_CH_EXTERNAL);
CH Interactive Not Supported n/a
Status and Result
Return Value Return value of the last function call. This is only a readable property. n/a
Result Code Return value of result code. This is only a readable property. n/a
Status Status of the scale service object. This is only a readable property. n/a

Retrieving Weight Data

To retrieve weight data using the OPOS Scale sample application:

  1. Connect the MP6200 scanner/scale unit to a host PC with a USB, or serial cable.
  2. Switch the scanner to a management-capable host mode by scanning one of the bar codes on Scanner Configuration Bar Codes to configure the scanner for the correct communication protocol.

    1. IBM Hand-held
    2. IBM Table-top
    3. SSI
  3. Under folder C:\Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scale OPOS\Sample Applications\bin, enter the sub-folder appropriate to the host architecture (x86 or x64) and run OPOSScaleSampleApp.exe to launch the Scale OPOS sample application.

    Figure 5: Scale OPOS Sample Application - Read Weight

  4. Place the item to weigh on the platter of the scale.
  5. On the sample application screen, select Open to open the logical device named in the text box (which is by default installed by the Scanner SDK Installshield).
  6. Select Claim
  7. Select Device Enable
  8. Select Read Weight. The weight of the item, and the measuring unit appear in the text box.

Retrieving Weight Data Asynchronously

To retrieve weight data asynchronously using the OPOS Scale sample application:

  1. Connect the MP6200 scanner/scale unit to a host PC with a USB, or serial cable.
  2. Switch the scanner to a management-capable host mode by scanning one of the bar codes on Scanner Configuration Bar Codes to configure the scanner for the correct communication protocol.

    1. IBM Hand-held
    2. IBM Table-top
    3. SSI
  3. Under folder C:\Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scale OPOS\Sample Applications\bin, enter the sub-folder appropriate to the host architecture (x86 or x64) and run OPOSScaleSampleApp.exe to launch the Scale OPOS sample application.
  4. Place the item to weigh on the platter of the scale.
  5. On the sample application screen, select Open to open the logical device named in the text box (which is by default installed by the Scanner SDK Installshield).
  6. Select Claim
  7. Check the AsyncMode box in DataEvent section.
  8. Check DataEventEnable.
  9. Select Device Enable.
  10. Select Read Weight. The weight of the item, and the measuring unit appear in the text box.

Getting and Setting OPOS Properties

This utility allows getting and setting the OPOS properties of the Zebra OPOS Driver via the Properties drop-down list.

To get and set the OPOS properties of the Zebra OPOS Driver:

  1. Scan the USB OPOS (Hand-held) bar code, SNAPI bar code or Wincor-Nixdorf RS-232 Mode B bar code on Scanner Configuration Bar Codes to configure the scanner for the correct communication protocol.
  2. Under folder \Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scale OPOS\Sample Applications\bin, enter the sub-folder appropriate to the host architecture (x86 or x64) and run OPOSScaleSampleApp.exe to launch the Scale OPOS sample application.
  3. Select Open to use the Zebra OPOSScale Service Object that the SDK Installshield loaded on the PC.
  4. Select Claim.
  5. Select Device Enable.
  6. Select a configurable (setable) property in the Properties drop-down list. You can configure some properties (e.g., AutoDisable, FreezeEvents); other properties are read only (e.g., ServiceObjectVersion, DataCount).
  7. The current value of the OPOS property appears in the edit box below the property selected in the list box. The values 1 and 0 represent true and false, respectively.
  8. To change the configurable property, change the value in the edit box and select Set Property. This updates the property with the new value.

DirectIO

Overview

The OPOS driver does not support any I/O functions directly to the scanner. However, the OPOS sample application exposes management access to an RSM-ready scanner through the Zebra Scanner SDK. Through the DirectIO feature, a POS application communicates directly with the underlying CoreScanner Service.

Information in this chapter is applicable to both scanner and scale devices.


DirectIO Methods

Syntax


LONG DirectIO(
    _In_ LONG   nCommand,
    _Inout_ LONG   *lpData,
    _Inout_ BSTR   *pbstrIOXML
);

DirectIO Method Parameters:

nCommand[in]: Commands to be executed by OPOS Service. Following are the possible values for this parameter.


enum DIO_Opcodes
{
    //Common for Scanner and Scale
    DIO_GET_SCANNERS = 1,
    DIO_RSM_ATTR_GETALL = 5000,
    DIO_RSM_ATTR_GET = 5001,
    DIO_RSM_ATTR_GETNEXT = 5002,
    DIO_RSM_ATTR_SET = 5004,
    DIO_RSM_ATTR_STORE = 5005,
    DIO_RTA_GET_SUPPORTED = 5500,
    DIO_RTA_UNREGISTER = 5502,
    DIO_RTA_GET_EVENT_STATUS = 5503,
    DIO_RTA_SET_EVENT_STATUS = 5504,
    DIO_RTA_SUSPEND = 5505,
    DIO_RTA_GETSTATE = 5506,

    // Scanner Specific
    DIO_SCANNER_UPDATE_FW_DAT = 5016,
    DIO_SCANNER_UPDATE_FW_PLUGIN = 5017,
    DIO_SCANNER_LOAD_CONFIG = 5020,

    //NCR Scanner
    NCR_DIO_SCANNER_TONE = 501,
    NCR_DIO_SCANNER_RESET = 502,
    NCR_DIO_SCANNER_STATUS = 503,
    NCR_DIO_SCANNER_DIRECT = 507,
    NCR_DIO_SCANNER_NOT_ON_FILE = 508,

  //NCR Scale
   NCR_DIO_SCALE_STATUS = 601,
   NCR_DIO_SCALE_LIVE_WEIGHT = 604,
   NCR_DIO_SCALE_DIRECT = 605
};

lpData: Indicates the CoreScanner Status. Refer to the Scanner SDK User's guide for CoreScanner status code description

pbstrIOXML: This value holds input and output arguments for the commands in XML format.


DirectIO Commands

DIO_GET_SCANNERS

This will retrieve all the scanners connected to the system and identified by CoreScanner service. No input XML is required for this command.

OutXml: This contains the raw XML string of all the connected scanners in the format:


<scanners>
    <scanner type="mode">
        <scannerID>id1</scannerID>
        <serialnumber>serial_number</serialnumber>
        <GUID>S_N:XXXXXXXXXXXXXXXXXXXXXX</GUID>
        <VID>vendor_id</VID>
        <PID>product_id</PID>
        <modelnumber>model_number</modelnumber>
        <DoM>date_of_manufacture</DoM>
        <firmware>firmware_version</firmware>
    </scanner>
</scanners>

DIO_RSM_ATTR_GETALL

This will retrieve a list of supported RSM attributes of a connected device. The Product Reference Guide specified for the connected scanner contains the definitions of all these attributes.

InXml


<inArgs>
    <scannerID>scanner_id</scannerID>
    <!-- ScannerID of one of the scanners which could be retrieved by executing DIO_GET_SCANNERS DirectIO command -->
</inArgs>

InOutXml: This contains the raw XML string of all the supported RSM attributes:


<outArgs>
    <scannerID>scanner_id</scannerID>
    <arg-xml>
        <modelnumber>DS8108-XXXXXXXXXXXX</modelnumber>
        <serialnumber>serial_number</serialnumber>
        <GUID>S_N:XXXXXXXXXXXXXXXXXXXXXXXXXX</GUID>
        <response>
            <opcode>5000</opcode>
            <attrib_list>
                <attribute name="">0</attribute>
                <attribute name="">1</attribute>
                <attribute name="">2</attribute>
                <attribute name="">3</attribute>
                <attribute name="">4</attribute>
                <attribute name="">5</attribute>
                ...
                ...
                <attribute name="">25102</attribute>
                <attribute name="">25103</attribute>
                <attribute name="">25104</attribute>
                <attribute name="">25105</attribute>
            </attrib_list>
        </response>
    </arg-xml>
</outArgs>

The value of each attribute in the returned XML list can be accessed using the DIO_RSM_ATTR_GET command.

NOTE: Calling this is not necessary if the attributes you wish to SET, or GET are known ahead of time.

DIO_RSM_ATTR_GET

This command can be used to retrieve scanner attribute information including value, data type, and permission. For more information, refer to the Zebra Scanner SDK for Windows Developer's Guide.

InXml


<inArgs>
    <scannerID>scanner_id</scannerID>
    <cmdArgs>
        <arg-xml>
            <attrib_list>attribute1[,attribute2,…,attributeN]</attrib_list>
            <!-- a list of scanner attribute numbers separated by commas -->
        </arg-xml>
    </cmdArgs>
</inArgs>

OutXml


<outArgs>
    <scannerID>scanner_id</scannerID>
    <arg-xml>
        <modelnumber>DS8108-XXXXXXXXXXX</modelnumber>
        <serialnumber>serial_number</serialnumber>
        <GUID>XXXXXXXXXXXXXXXXXXXXX</GUID>
        <response>
            <opcode>5001</opcode>
            <attrib_list>
                <attribute>
                <id>attribute1</id>
                <name></name>
                <datatype>F</datatype>
                <permission>RWP</permission>
                <value>True</value>
                </attribute>
            </attrib_list>
        </response>
    </arg-xml>
</outArgs>

DIO_RSM_ATTR_GETNEXT

This will retrieve the value of the next available attribute of the given attribute number. Refer to the Scanner SDK documentation for input XML for this command.

InXml


<inArgs>
    <scannerID>scanner_id</scannerID>
    <cmdArgs>
        <arg-xml>
            <attrib_list>3</attrib_list>
        </arg-xml>
    </cmdArgs>
</inArgs>

OutXml


<outArgs>
    <scannerID>scanner_id</scannerID>
    <arg-xml>
        <modelnumber>DS9208-XXXXXXXXXX</modelnumber>
        <serialnumber>XXXXXXXXXXXX</serialnumber>
        <GUID>S_N:XXXXXXXXXXXX</GUID>
        <response>
            <opcode>5002</opcode>
            <attrib_list>
                <attribute>
                    <id>4</id>
                    <name></name>
                    <datatype>F</datatype>
                    <permission>RWP</permission>
                    <value>True</value>
                </attribute>
            </attrib_list>
        </response>
    </arg-xml>
</outArgs>

DIO_RSM_ATTR_SET / DIO_RSM_ATTR_STORE

Sets (volatile, cleared after device reboot) or stores (non-volatile, retained after device reboot) attributes respectively, specified in the XML string given in the obj argument. No OutXml for these two commands.

InXml


<inArgs>
    <scannerID>scanner_id</scannerID>
    <cmdArgs>
        <arg-xml>
            <attrib_list>
                <attribute>
                    <id>rsm_attribute_number</id>
                    <datatype>valid_datatype</datatype>
                    <value>value_maching_datatype</value>
                </attribute>
            </attrib_list>
        </arg-xml>
    </cmdArgs>
</inArgs>

The following are the valid values:

  • rsm_attribute_number: One of the scanners accepted, writeable attributes numbers.
  • valid_datatype: A valid datatype character: F, B, W, D, A, S
  • value_matching_datatype: A value that is consistent with the datatype and the datatype range. For example, 'F' is a 'Boolean' value that may be either 'false' or 'true'. A 'B' datatype is 'Byte' which ranges from 0-255.

For example, to disable UPC Code 128, the actual XML string passed into the obj argument would look this:


<inArgs>
    <scannerID>1</scannerID>
    <cmdArgs>
        <arg-xml>
            <attrib_list>
                <attribute>
                    <id>7</id>
                    <datatype>F</datatype>
                    <value>False</value>
                </attribute>
            </attrib_list>
        </arg-xml>
    </cmdArgs>
</inArgs>

DIO_SCANNER_LOAD_CONFIG

This command can be used to update the scanner configuration by specifying the relevant scannerID and the absolute file path, including the filename, created using 123Scan (.scncfg).

InXML:


<inArgs>
    <scannerID>1</scannerID>
    <cmdArgs>
        <arg-string>C:\DS8108 Config.scncfg</arg-string>
    </cmdArgs>
</inArgs>

OutXml: None. Instead of OutXml, DirectIO events with the following event types will be received.

  • CONFIG_LOAD_START = 17
  • CONFIG_LOAD_PROGRESS = 18
  • CONFIG_LOAD_END = 19

Possible error scenarios are outlined below.

Failure Error Code
File does not exist ERROR_INLVAID_CONFIG_FILE (601)
Incorrect extension ERROR_INLVAID_CONFIG_FILE (601)
Self-hash failure ERROR_INLVAID_CONFIG_FILE (601)
Incompatible device ERROR_INCOMPATIBLE_CONFIG_FILE (602)
XML syntax validation failure ERROR_CONFIG_FILE_SYNTAX_VALIDATION_FAILED (603)

DIO_SCANNER_UPDATE_FW_DAT / DIO_SCANNER_UPDATE_FW_PLUGIN

This command can be used to update the scanner firmware by specifying the relevant scannerID and the absolute path of the firmware file (PLUGIN or DAT), including the filename.

InXML:


<inArgs>
    <scannerID>1</scannerID>
    <cmdArgs>
        <arg-string>C:\DS3678-STANDARD.SCNPLG</arg-string>
    <arg-int>2</arg-int>
    </cmdArgs>
</inArgs>

OutXml: None. Instead of OutXml, DirectIO events with the following event types will be received.

  • SCANNER_UF_SESS_START = 11
  • SCANNER_UF_DL_START = 12
  • SCANNER_UF_DL_PROGRESS= 13
  • SCANNER_UF_DL_END= 14
  • SCANNER_UF_SESS_END= 15
  • SCANNER_UF_STATUS= 16

Possible error scenarios are outlined below.

Failure Error Code
ERROR_FW_INVALID_DATFILE Invalid firmware file (500)
ERROR_FW_UPDATE_FAILED_IN_SCN FW Update failed in scanner (501)
ERROR_FW_READ_FAILED_DATFILE Failed to read DAT file (502)
ERROR_FW_UPDATE_INPROGRESS Firmware Update is in progress (cannot proceed another FW Update or another command) (503)
ERROR_FW_UPDATE_ALREADY_ABORTED Firmware update is already aborted (504)
ERROR_FW_UPDATE_ABORTE FW Update aborted (505)
ERROR_FW_SCN_DETTACHED Scanner is disconnected while updating firmware (506)
ERROR_FW_UPDATE_NOT_SUPPORTED Device doesn't support firmware update (507)
STATUS_FW_SWCOMP_RESIDENT The software component is already resident in the scanner (600)

NCR_DIO_SCANNER_NOT_ON_FILE

This command is used to execute the NCR "Not on File" tone pattern configured through Registry key value.

This registry key can only be configured for the device, not for the logical device. "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Zebra\Zebra Scanners\OPOS\Scanner" - NcrScanNOFPattern

NCR_DIO_SCANNER_RESET

This command is used to reset the device.

NCR_DIO_SCANNER_STATUS

This command is used to get the IBM USB status bytes of the scanner. Status bytes are given as a string.

NCR_DIO_SCANNER_DIRECT

This command is used to execute direct IO commands GetAll, Get, GetNext, Set and Store attributes directly without the corresponding direct IO command for these operations. Direct IO OpCode for these operations is passed as an attribute in the InXml.

InXml


<inArgs>
    <scannerID>scanner_id</scannerID>
    <opcode>5001</opcode>
    <cmdArgs>
        <arg-xml>
            <attrib_list>1</attrib_list>
        </arg-xml>
    </cmdArgs>
</inArgs>

OutXml


<?xml version="1.0" encoding="UTF-8"?>
<outArgs>
    <scannerID>scanner_id</scannerID>
    <arg-xml>
        <modelnumber>DS9208-XXXXXXXXXXX</modelnumber>
        <serialnumber>XXXXXXXXXXXXX</serialnumber>
        <GUID>S_N:XXXXXXXXXXXXXX</GUID>
        <response>
            <opcode>5001</opcode>
            <attrib_list>
                <attribute>
                    <id>1</id>
                    <name></name>
                    <datatype>F</datatype>
                    <permission>RWP</permission>
                    <value>True</value>
                </attribute>
            </attrib_list>
        </response>
    </arg-xml>
</outArgs>

NCR_DIO_SCALE_LIVE_WEIGHT

This command is used to get the live weight value of the scale. No need of providing an InOutXml argument.

NCR_DIO_SCALE_STATUS

This command is used to get the IBM USB status bytes of the scale. Status bytes are given as a string. No need of providing an InOutXml argument.

NCR_DIO_SCALE_DIRECT

This command is used to execute direct IO commands GetAll, Get, GetNext, Set and Store attribute directly without the corresponding direct IO command for these operations. Direct IO OpCode for these operations is passed as an attribute in the InXml.

InXml


<inArgs>
    <scannerID>scanner_id</scannerID>
    <opcode>5001</opcode>
    <cmdArgs>
        <arg-xml>
            <attrib_list>34</attrib_list>
        </arg-xml>
    </cmdArgs>
</inArgs>

OutXml


<outArgs>
    <scannerID>scanner_id</scannerID>
        <arg-xml>
        <modelnumber>DS9208-XXXXXXXXXXX</modelnumber>
        <serialnumber>XXXXXXXXXXXXXXX  </serialnumber>
        <GUID>S_N:XXXXXXXXXXXXXXXXXXXX</GUID>
        <response>
        <opcode>5001</opcode>
            <attrib_list>
                <attribute>
                    <id>34</id>
                    <name></name>
                    <datatype>B</datatype>
                    <permission>RWP</permission>
                    <value>1</value>
                </attribute>
            </attrib_list>
        </response>
    </arg-xml>
</outArgs>

Real Time Alerts (RTA)

Real Time Alerts (RTA) are preselected events that are monitored by a scanner device. When a selected statistic has reached a specified value or when a selected event occurs, it is then reported by the scanner device to the host as an alert.

For more information, see Real Time Alerts (RTA) User Guide

The OPOS driver uses DirectIO commands to invoke Real-Time Alerts (RTA) methods on the scanner or cradle device and utilizes DirectIO events to receive notifications when an RTA event is triggered by the scanner. Because the Zebra OPOS Service Object automatically registers for CoreScanner notification events during the initial Open call, the host application does not need to perform manual registration to receive RTA events.


Return Value

If the function succeeds, the return value will be OPOS_SUCCESS. Else other relevant OPOS result codes defined in UPOS Specification will return.


Using OPOS Sample Application to send DirectIO Commands

DirectIO operations can be done using the panel highlighted in red, as shown in the screenshot given below.

The required DirectIO command can be selected from the drop-down list named as the Command.

The OutXML corresponding to the selected DirectIO command can be retrieved by clicking on the Execute button.

Figure 6: OPOS Sample Application - DirectIO Command Execution

To send Direct I/O commands using the OPOS sample application:

  1. Connect a Zebra scanner and switch to a management-enabled host mode such as IBM OPOS, IBM Hand-held, IBM Table-top, or SNAPI.
  2. Open the OPOS sample application for Scanner.
  3. Click Open and select ZEBRA_SCANNER as the service object name.
  4. Click Claim.

To retrieve a list of all the scanners connected to the PC:

  1. Select DIO_GET_SCANNERS as DirectIO opcode from the Direct I/O section.
  2. Click Execute. The Direct I/O OutXml text box populates with XML with all the attached scanners.

UPnP/WMI Interface

Overview

The Zebra Scanner SDK also supports for Windows Management Instrumentation (WMI) Provider. This is a fulfilling the requirement according to the UPOS specification. The layout, the structure, class names all have maintaining according to the UPOS specification document. Complexity has been covered by the developers to offer more user-friendly dynamic instances to the user with their current OPOS instances.

UPOS WMI Instance

Creating an instance for WMI Provider only need an execution of the OPOS Sample Application (Scale or Scanner) as administration mode and perform the "Open" operation. Then the user can query asset information of the connected Scanner/Scale using a WMI Scripts.

Asset information regarding Scanners would access via UPOS_BarcodeScanner Common Information Model (CIM) class (under root/cimv2/UPOS_BarcodeScanner path) and asset information regarding Scales would access via UPOS_Scale Common Information Model (CIM) class (under root/cimv2/UPOS_Scale path).


Appendix

Supported Symbology Types vs. Scanner Mode

This appendix provides a matrix of scanner modes and supported symbology types in each mode, and the Windows registry keys for the OPOS Scanner and Scale logical names and drivers.

Table 7: Supported Symbology Types vs. Scanner Modes

Symbology Scanner Mode
Type Value IBM HID SNAPI Nixdorf Mode B
UPC-A SCAN_SDT_UPCA X X X
Code 39 SCAN_SDT_Code39 X X X
Code 128 SCAN_SDT_Code128 X X X
QR Code SCAN_SDT_QRCODE - X -


OPOS Logging (spdlog)

The OPOS driver previously utilized a custom logging mechanism based on registry configurations. This has been transitioned to the new spdlog framework to enhance performance and ensure consistency with other products, such as CoreScanner.

The OPOS Scanner SDK now leverages spdlog as its core logging framework to provide robust diagnostic and debugging capabilities. The system is managed via an XML configuration file, allowing for easily customizable settings.

Legacy SDK Logging (For Scanner SDK v3.07.0008 and Earlier)

In SDK versions up to v3.07.0008, the OPOS logging mechanism is controlled through the Windows Registry. You can enable or disable logging, and configure the log file's location, size, and rotation by modifying the registry keys.

Registry Key Definitions

Table 8: Registry Key Descriptions

Registry Key Description
EnableTrace Enable or disable debug/engineering message entries to the log file specified by LogFilePath.
LogFilePath Specifies the full directory path where log files will be saved.
LogFileLength Defines the maximum number of lines each log file can contain.
MaxLogFileCount Specifies the maximum number of log files to retain before overwriting.

Registry Paths

Modify the keys at the following paths to configure the logging mechanism for Scanners and Scales:

Scanner: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Zebra\Zebra Scanners\OPOS\Scanner
Scale: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Zebra\Zebra Scanners\OPOS\Scale

Table 9: Available Registry Keys by Device

Device Available Keys
Scanner EnableTrace, LogFilePath, LogFileLength, MaxFileCount
Scale EnableTrace, LogFilePath, LogFileLength, MaxFileCount, DebugPrint, EngDbgStr, Level

IMPORTANT NOTE: As of Scanner SDK v3.07.0009, this registry-based logging system is deprecated and no longer supported. The logging system has been upgraded to use SPD logs.

SPD Logging (Scanner SDK v3.07.0009 for Windows and Newer)

Starting with Scanner SDK v3.07.0009, the logging system has been upgraded by integrating the SPDLOG library (v1.15.3). This powerful third-party library provides a more robust and flexible logging solution.

For more information on the SPDLOG library, please refer to the official spdlog GitHub repository.

Configuration File

Logging behavior is defined by the properties within an XML configuration file. This file is made available upon the installation of the Scanner SDK.

Configuration File Locations

Table 10: SPD Logging Configuration File Paths

Component Path
OPOS Scanner x64 C:\Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scanner OPOS\bin\OPOSScannerLog_config.xml
OPOS Scanner x86 C:\Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scanner OPOS\bin\x86\ OPOSScannerLog_config.xml
OPOS Scale x64 C:\Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scale OPOS\bin\OPOSScaleLog_config.xml
OPOS Scale x86 C:\Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scale OPOS\bin\x86\OPOSScaleLog_config.xml

XML Configuration Structure


<log_configuration>
  <sinks>
    <sink type="rotating_logger_mt" name="rotating_logger_mt">
      <property key="log_path" value="C:\Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scanner OPOS\bin\Logs\" />
      <property key="max_file_size" value="5120" />
      <property key="max_file_count" value="5" />
      <property key="log_pattern" value="[%d-%m-%Y] [%H:%M:%S:%e] [T%t] [P%P] [%l] [%!] %v [%s]  %#" />
      <property key="log_level" value="2" />
    </sink>
  </sinks>
</log_configuration>

Supported Sink Types

rotating_logger_mt (Rotating File Logger - Multi-threaded)

  • Creates rotating log files
  • File naming: <Device Type (Scanner/Scale)>_<Driver Architecture (x64/x86)>_<ProcessID>_<Instance Number>.log
    Example: OPOSScanner_x64_50944_1.log
  • Automatically manages old log files based on max_file_count and max_file_size
  • Thread-safe for multi-threaded applications

Configuration Properties

log_path

Type: String
Description: Directory path where log files will be stored.
Example: C:\Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scanner OPOS\bin\Logs
Note: The directory will be created automatically if it doesn't exist (requires permissions). If the log folder is created manually, you must also manually set the necessary write permissions for the application.

log_pattern

Type: String
Description: Defines the format of log entries
Default: [%d-%m-%Y] [%H:%M:%S:%e] [T%t] [P%P] [%l] %v

Log Pattern Breakdown

Table 11: Log Pattern Format Codes

Pattern Description
%d-%m-%Y Date (day-month-year)
%H:%M:%S:%e Time (hour:minute:second:millisecond)
%t Thread ID
%P Process ID
%l Log Level (e.g., info)
%v The log message content

For more pattern options, see the spdlog Custom Formatting guide.

Example Log Entry:

[08-10-2025] [21:29:02:949] [T22196] [P28396] [info] [CScannerSO::CScannerSO] Initializing Logging from App Start returns 0 [ScannerSO.cpp] 509

max_file_size

Type: Integer (in KB)
Description: The maximum size of a single log file in kilobytes (KB). The minimum value is 5120 KB (5 MB); any value below this will default to 5120 KB. The maximum value is 20480 KB (20MB); any value exceeding this will default to 20480 KB.
Default: 5120 KB (5MB)
Minimum: 5120 KB (5MB)
Maximum: 20,480 KB (20 MB)

max_file_count

Type: Integer
Description: Maximum number of log files to retain. Any invalid input will default to 1. Any value higher than the max value of 1000 will default to 1000.
Behavior: Oldest files are automatically deleted when limit is reached
Default: 5
Minimum: 1
Maximum: 1000

log_level

Type: Integer
Description: Minimum severity level for logging
Default value: 2 (INFO)

Table 12: Log Levels

Level Numeric Value Description
DEBUG 1 Designates detailed diagnostic events used to troubleshoot issues and analyze internal software behavior.
INFO 2 (Default) Designates useful information about the application's general flow and significant events.
WARNING 3 Designates unexpected events or potential issues that do not stop the application but should be reviewed.
ERROR 4 Designate errors, typically those that have caused a specific operation to fail.
Off 6 Disables all logging.

System Information File

The OPOS Open call triggers the automatic generation of a system information file in the configured log_path. This file provides a snapshot of the environment and contains the following details:

  • OPOS Scanner/Scale Version
  • Driver Architecture (x86/x64)
  • Operating System Name
  • Operating System Build ID
  • Operating System Architecture
  • Number of Processors

System Information Log

Figure 7: System Information Log File

Log File Management

Automatic Log Rotation and Cleanup

To prevent log files from consuming excessive disk space, the logging system uses an automatic size-based rotation mechanism. When the active log file (e.g., OPOSScanner_x64_50944_1.log) reaches its configured maximum size limit (max_file_size), the following sequence occurs:

  • Renaming (Archiving): The currently active log file is closed and renamed by appending an incrementing index number to the extension (e.g., it becomes OPOSScanner_x64_50944_1.1.log). It is now considered a history file.
  • Creation: A new, empty log file is immediately created using the original active filename (e.g., OPOSScanner_x64_50944_1.log).
  • Continuation: The application continues writing new log entries into this newly created active file.
  • Sequential Indexing: If the active file fills up again, the rotation process repeats. The system maintains a sequentially numbered history (e.g., OPOSScanner_x64_50944_1.1.log, OPOSScanner_x64_50944_1.2.log, …) up to the configured maximum file count limit.
  • Rotation Triggers: Rotation occurs automatically whenever the file size limit is reached during operation, as well as upon application startup.
  • Independent Component Logging: If different drivers (Scanner/Scale) or driver architectures (x64/x86) (e.g., Scanner x64 and Scanner x86) are writing log files into the same target directory, they will each manage and rotate their own log files independently, adhering strictly to their respective configuration settings.

The total number of log files generated in the log directory depends on the number of active application instances, the driver configurations, and system logging.

For a single driver, total number of log files is: M + N + 1

  • M: The number of "currently writing" log files (one for each of the M open application instances).
  • N: The maximum number of "history" log files (as defined by max_file_count).
  • 1: The SystemInfo.log file.

If this causes the number of history files to exceed N, the oldest history file is automatically deleted. The system automatically manages log file count; oldest files are deleted when max_file_count is exceeded, and locked files (in use by other processes) are skipped during cleanup.

Log File Naming Convention (Multi-Instance Support)

To seamlessly support multiple simultaneous instances of the OPOS driver, the logging system generates a unique name for each active log file. It does this by appending the Process ID (PID) and the instance sequence number to the filename.

Standard Naming Format: <Device Type>_<Driver Architecture>_<ProcessID>_<Instance Number>.log

OPOS Scanner Examples

  • Configuration File: OPOSScannerLog_config.xml
  • Log File Name Example: OPOSScanner_x64_50944_1.log (Scanner, 64-bit architecture, Process ID 50944, Instance 1)
  • System Info File: OPOSScannerSystemInfo_64.log

OPOS Scale Examples

  • Configuration File: OPOSScaleLog_config.xml
  • Log File Name Example: OPOSScale_x64_67934_1.log (Scale, 64-bit architecture, Process ID 67934, Instance 1)
  • System Info File: OPOSScaleSystemInfo_64.log

Single Scanner Application

Figure 8: Single Scanner Application Log Files

Two Scanner Application

Figure 9: Two Scanner Application Log Files

Mixed Architectures

Figure 10: Mixed Architectures Log Files

Multiple Scanner Objects

Figure 11: Multiple Scanner Objects Log Files

Windows Event Log Integration

The logging system writes important events to Windows Event Log (Application log) for both Scanner and Scale components.

Table 13: Event Log Sources

OPOS Component Event Source Name Purpose
OPOS Scanner OPOSScanner Scanner-related configuration and critical errors
OPOS Scale OPOSScale Scale-related configuration and critical errors

Events Written to Event Log

Both components write the following types of events:

  • ✅ Configuration Loading Errors (Missing or invalid XML configuration file, XML parsing failures, Invalid sink configurations)
  • ✅ Directory Creation Failures (Unable to create log directories, Permission denied errors)
  • ✅ File Permission Issues (Failed to open log files for writing, Disk space errors)
  • ✅ Initialization Warnings (Empty or missing sink configurations, Fallback to default logging)

Viewing Event Logs:

Method 1: Event Viewer GUI

  1. Open Event Viewer (eventvwr.msc)
  2. Navigate to: Windows Logs → Application
  3. Filter by source:
    • For Scanner: OPOSScanner
    • For Scale: OPOSScale

Method 2: PowerShell


# View Scanner events
Get-EventLog -LogName Application -Source "OPOSScanner" -Newest 50

# View Scale events
Get-EventLog -LogName Application -Source "OPOSScale" -Newest 50

# View both
Get-EventLog -LogName Application | Where-Object {$_.Source -like "OPOS*"}

Method 3: Windows Event Viewer Quick Filter


<QueryList>
  <Query Id="0" Path="Application">
    <Select Path="Application">
      *[System[(EventID=4096) and (Provider[@Name='OPOSScanner' or @Name='OPOSScale'])]]
    </Select>
  </Query>
</QueryList>

Table 14: Event Log vs. SPD Logging Comparison

Aspect Windows Event Log SPD Logging
Purpose System-level critical errors Detailed diagnostic logging
Scope Configuration and initialization only All operations
Verbosity Minimal (errors/warnings only) Configurable (trace to critical)
Persistence System-managed File-based rotation
Access Requires admin rights to view File system permissions
Performance Low overhead Optimized async logging

Event Log Configuration

The Event Log integration is automatic and cannot be disabled. It provides a safety net when:

  • SPD logging is misconfigured
  • Log files cannot be created
  • Application is running in restricted environments

Troubleshooting

Problem: No SPD log files are being created

Solutions:

  • Verify XML configuration file exists at the expected location
  • Check directory permissions for log_path
  • Ensure log_level is not set to 6 (off)
  • Verify XML structure is valid
  • Check Event Log for OPOSScanner or OPOSScale source
  • Look for configuration or permission errors

Common Event Log messages indicate:

  • Missing XML configuration file
  • Invalid log path
  • Insufficient permissions

Problem: Windows Event Log Error – "Failed to create log directory"

Solutions:

  • Run application with appropriate permissions
  • Use a directory with write access (e.g., C:\ProgramData)
  • Manually create the directory and grant write permissions

Problem: Log Files Not Rotating

Solutions:

  • Verify max_file_size is set and within valid range (5 MB - 20 MB)
  • Ensure sink type is rotating_logger_mt
  • Check file permissions on log directory
  • Confirm max_file_count is greater than 1

Windows Registry Keys for OPOS Driver

Table 15: Registry Paths to Default Scanner OPOS Logical Names

Key Path (x64)
HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\Scanner\ZEBRA_SCANNER
HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\Scanner\MOTOROLA_SCANNER
HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\Scanner\STI_USBSCANNER
HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\Scanner\SYMBOL_SCANNER

NOTE On 64-bit Windows, there are registry keys for 32-bit applications under the corresponding Wow6432Node.

Table 16: Registry Keys for OPOS Scanner Logical Names

Value Name Sample Data Description
(Default) ZebraScannerSO.ScannerSO Service object name of the scanner OPOS.
Baud rate 9600
115200
Baud rate for serial port.
CheckDigitAutoCalculate 0
1
Automatically calculate Check Digit and append to the decode data label.
0= Disable
1 = Enable
CompatibilityMode 0
1
Specifies how the decode data is stored in the ScanData and ScanDataLabel properties.
0 = Decode data is stored according to the UPOS specification.
1 = ScanData property contains the same data as the ScanDataLabel property.
Connection1 ConnUSB Added for backward compatibility.
Description Zebra scanner logical device Logical device description.
ExclusiveClaimLevel 0
1
Specifies whether an OPOS claim is required to be exclusive to the scanners in the logical device. For example, if a scanner is exclusively claimed by an application, other applications cannot claim it or send management commands to that scanner.
0 = OPOS claim exclusivity is not required for all scanners in the logical device.
1 = OPOS claim is exclusive to all scanners in the logical device. Any other value = OPOS claim is able to claim at least one scanner in the logical device.
ModelNumber 1. DS6707-SR20001ZZR,DS9808*
(* Represents any model of the DS9808.)
Comma separated list of scanner model numbers for use with OPOS driver.
PID1 * (Represents all PIDs) Product IDs of Zebra bar code scanners.
Port COM1 COM1,COM2
* (Represent any COM port)
Comma or space delimited list of serial ports needed for use with OPOS driver.
ScannerHotSwap 0 - Disable
1 - Enable (Default)
Scanner HotSwap feature controls whether the driver accepts and activates a scanner that is plugged in after the POS application has already followed the Open → Claim → Device Enable (hereafter referred to as OCE) process. When this value = 0, only scanners that have completed OCE are accepted. When this value = 1 (default), scanners that have not followed OCE are also accepted, if its host mode matches a logical device that has already completed OCE.
SerialNumber 1. 7116000500337, 7087000501981
2. * (Represents all serial numbers)
Comma separated list of scanner serial numbers for use with OPOS driver.
Type SNAPI NIXMODB USBIBMHID USBIBMTT SSI ALL Comma or space delimited list of scanner modes from the TypePool.
TypePool SNAPI NIXMODB USBIBMHID USBIBMTT SSI ALL All the supported types only for reference. OPOS driver does not read this entry.
VID 0x05E0 Vendor ID of Zebra bar code scanners.

1 Added to maintain the backward compatibility and are optional if the CompatibilityMode is set to disable backward compatibility.

NOTE: The ScannerHotSwap property is supported from Zebra Scanner SDK v3.07.0012 onwards.

Table 17: Registry Paths to Default Scale OPOS Logical Names

Key Path (x64)
HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\Scale\ZEBRAA_SCALE
HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\Scale\MOTOROLA_SCALE

Table 18: Registry Keys for OPOS Scale Logical Names

Value Name Sample Data Description
(Default) ScaleOPOS.ScalSO Service object name of the Scale OPOS.
DeviceDescription Zebra Technologies Scale logical device Logical device description.
ExclusiveClaimLevel 0
1
0 =OPOS Scale service object does not get exclusive access of the device on claiming the device. This may be required if an application needs to access both scanner and scale of the MP6200 scanner at same time.
1 =Scale service object does claim the device exclusively so that no other POS application can access the device.
LiveWeightFrequency 2 Number of live weight events per second (values from 1 to 100).
NoTimeOutOnReadWeight 0
1
0 = ReadWeight method returns OPOS_E_TIMEOUT if no valid weight data is retrieved before the time out elapse.
1 = ReadWeight method does not return OPOS_E_TIMEOUT if no valid weight data is retrieved before the time out elapse. It always reports OPOS_SUCCESS as result code.
ZeroValidOveride 0
1
0 = ReadWeight does not accept zero weight as a valid reading.
1 = ReadWeight does accept zero weight as a valid reading.
WeightChangeThreshold Unit of the value is based on scales weight unit with assumed decimal point. For example, 10 = 0.01kr or 0.01lb Defines hoe large the weight reported from the scanner should differ from the previously reported value in order for the last reported weight value to be a legitimate weight.
WeightChangeMonitorInterval Polling interval in milliseconds. Defines how fast the SO should poll the scale to detect a change of weight on the platter.
UnstableWeightisADifferentWeights 0 = unstable no weight change
1 = unstable reported as weight change
Define whether even an unstable weight reported after stab;e weight is considered as a change ot wight on the platter.

Table 19: Registry Path for Scanner OPOS Driver

Key Path (x64) HKEY_LOCAL_MACHINE\SOFTWARE\Zebra\Zebra Scanners\OPOS\Scanner

Table 20: Registry Keys for Scanner OPOS Driver - Applies to all Scanner OPOS Logical Names

Value Name Values Description
AutoDisableControl 0 = Disable
1 = Enable
0 = Normal AutoDisable property operation.
1 = Automatically disables the scanner after each data event regardless of the value of OPOS property AutoDisable.
AutoDisableDelay 0 Delay in milliseconds to disable the scanner automatically after each data event. Default value is 0.
DataEventAutoDisableControl 0 = Disable
1 = Enable
0 = Normal DataEventEnable operation.
1 = Scanner SO overrides the value of OPOS property DataEventEnable and always delivers the data events to application layer.
DataEventDelay 0 Minimum time gap in milliseconds between two decode data events. Default value is 0 ms.
EnableTrace 0 = Disable
1 = Enable
Enable or disable debug/engineering message entries to the log file specified by LogFilePath.
InterCommandDelay 0 Minimum time gap in milliseconds between OPOS method calls. Default value is 0 ms.
LogFilePath \Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scanner OPOS\bin\Logs\stiopos.txt Path and filename for log file if EnableTrace is enabled.
SetDeviceEnableStateOnFailure 0 = Disable
1 = Enable
0 = Normal Result Code operation
1 = Regardless of the result of DeviceEnable call, Result Code is set to OPOS_SUCCESS.
SetEnableDisableOnEvent 0 = Disable
1 = Enable
0 = Normal Enable/Disable operation
1 = SO keeps the device Enable/Disable state in same state as SO DeviceEnable state. If an external application changes the device state, the SO immediately corrects it.
SetHardwareAutoDisableState 0 = Disable
2 = Enable
Controls the hardware 'Scan Disable Mode' setting on the scanner itself.
0 = Normal operation
2 = The SO sets the 'Scan Disable Mode' on the scanner to 'Auto Disable'. This disables scanning after transmission of a bar code, and remains disabled until the host sends a Scan Enable. This feature is not supported by all scanner models.
SyncDeviceEnableStateOnDiscovery 0 = Disable
1 = Enable
Sync a newly connected device's enable / disable state with the current enable / disable state of the OPOS driver. This is helpful if a new scanner is connected to a POS system where it already has a connected scanner. At the time the new scanner is connected, if the state of the OPOS SO is 'device disabled' the newly connected scanner should also has to change its state to 'device disable'. This synchronization will be performed if "SyncDeviceEnableStateOnDiscovery" is enabled.
EnableBarcodeDataLogging 0 = Disable
1 = Enable
0 - No barcode data (raw data or decode data) is logged.
1 - All the barcode data including raw data and decode data is logged.

Table 21: Registry Path for Scale OPOS Driver

Key Path (x64) HKEY_LOCAL_MACHINE\SOFTWARE\Zebra\Zebra Scanners\OPOS\Scale

NOTE On 64-bit Windows, there are registry keys for 32-bit applications under the corresponding Wow6432Node.

Table 22: Registry Path for Scale OPOS Driver

Value Name Values Description
DebugPrint 0 = Disable
1 = Enable
Enable debug log messages viewable through a debug log viewer such as Microsoft DebugView.
EngDbgStr 0 = Disable
1 = Enable
Enable detailed engineering-level debug messages through a debug log viewer.
FileLog 0 = Disable
1 = Enable
Enable or disable debug/engineering message entries to the log file specified in the Location key.
Level 1 - 5 Level of log messages, from minimal (1) to verbose (5).
Location \Program Files\Zebra Technologies\Barcode Scanners\Scanner SDK\OPOS\Scale OPOS\bin\Logs Path name to log file if FileLog is enabled.

For more details on how to use the registry, see Modified Claim Functionality.


Error Codes

Error Codes - OPOS Scanner

Table 23: Error Codes for OPOS Scanner

Message Return Codes Description
OPOS_S_CLOSED 1 The Control is closed.
OPOS_S_IDLE 2 The Control is in a good state and is not busy.
OPOS_S_BUSY 3 The Control is in a good state and is busy performing output.
OPOS_S_ERROR 4 An error has been reported, and the application must recover the Control to a good state before normal I/O can resume.
This property is always readable.
OPOS_SUCCESS 0 The Operation completed without Errors.
OPOS_E_CLOSED 101 An attempt was made to access a closed Device.
OPOS_E_CLAIMED 102 An attempt was made to access a Physical Device that is claimed by another Control instance. The other Control must release the Physical Device before this access may be made. For exclusive-use devices, the application will also need to claim the Physical Device before the access is legal.
OPOS_E_NOTCLAIMED 103 An attempt was made to access an exclusive-use device that must be claimed before the method or property set action can be used.
If the Physical Device is already claimed by another Control instance, then the status E_CLAIMED is returned instead.
OPOS_E_NOSERVICE 104 The Control cannot communicate with the Service, normally because of a setup or configuration error.
OPOS_E_DISABLED 105 Cannot perform this operation while the Device is disabled.
OPOS_E_ILLEGAL 106 An attempt was made to perform an illegal or unsupported operation with the Device, or an invalid parameter value was used.
OPOS_E_NOHARDWARE 107 The Physical Device is not connected to the system or is not powered on.
OPOS_E_OFFLINE 108 The Physical Device is off-line.
OPOS_E_NOEXIST 109 The file name (or other specified value) does not exist.
OPOS_E_EXISTS 110 The file name (or other specified value) already exists.
OPOS_E_FAILURE 111 The Device cannot perform the requested procedure, even though the Physical Device is connected to the system, powered on, and on-line.
OPOS_E_TIMEOUT 112 The Service timed out waiting for a response from the Physical Device, or the Control timed out waiting for a response from the Service
OPOS_E_BUSY 113 The current Service state does not allow this request. For example, if asynchronous output is in progress, certain methods may not be allowed.
OPOS_E_EXTENDED 114 A device category-specific error condition occurred. The error condition code is held in an extended error code.
OPOS_E_DEPRECATED 115 The requested operation can not be performed since it has been deprecated. See "Deprecation Handling" on page Intro-38 for additional information.
OPOS_ESTATS_ERROR 280 At least one of the specified statistics could not be reset.
OPOS_ESTATS_DEPENDENCY 282 At least one other statistic is required to be reset in addition to a requested statistic.
OPOS_OR_ALREADYOPEN 301 Control already open.
OPOS_OR_REGBADNAME 302 The registry does not contain a key for the specified device name.
OPOS_OR_REGPROGID 303 Could not read the device name key's default value, or could not convert the Programmatic ID it holds into a valid Class ID.
OPOS_OR_CREATE 304 Could not create a service object instance, or could not get its IDispatch interface.
OPOS_OR_BADIF 305 The service object does not support one or more of the methods required by its release.
OPOS_OR_FAILEDOPEN 306 The service object returned a failure status from its open call, but does not have a more specific failure code.
OPOS_OR_BADVERSION 307 The service object major version number does not match the control object major version number. The following values can be returned by the Service Object if it returns a failure status from its open call. The Service Object can choose to return one of these, if applicable, or define additional values. (See the Control Programmer's Guide's GetOpenResult description for details on how the Service Object returns these values. If the Service Object does not implement GetOpenResult, then OpenResult returns OPOS_OR_FAILEDOPEN.)
OPOS_ORS_NOPORT 401 The Service Object tried to access an I/O port (for example, an RS232 port) during Open processing, but the port that is configured for the DeviceName is invalid or inaccessible.
As a general rule, an SO should refrain from accessing the physical device until the DeviceEnabled property is set to TRUE. But in some cases, it may require some access at Open; for instance, to dynamically determining the device type in order to set the DeviceName and DeviceDescription properties.
OPOS_ORS_NOTSUPPORTED 402 The Service Object does not support the specified device.
The SO has determined that it does not have the ability to control the device it is opening. This determination may be due to an inspection of the registry entries for the device, or dynamic querying of the device during open processing.
OPOS_ORS_CONFIG 403 Configuration information error. Usually this is due to incomplete configuration of the registry, such that the SO does not have sufficient or valid data to open the device.
OPOS_ORS_SPECIFIC 450 Errors greater than this value are service object specific. If the previous return values do not apply, then the SO may define additional OpenResult values. These values are Service Object-specific, but may be of value in these cases:
1) The Application logs or reports this error during debug and testing.
2) The Application adds SO-specific logic, to attempt to report more error conditions or to recover from them. This property is initialized by the Open method.
OPOS_EL_OUTPUT 1 Error occurred while processing asynchronous output.
OPOS_EL_INPUT 2 Error occurred while gathering or processing event-driven input.No previously buffered input data is available
OPOS_EL_INPUT_DATA 3 Error occurred while gathering or processing event-driven input, and some previously buffered data is available.
OPOS_ER_RETRY 11 Typically valid only when locus is EL_OUTPUT. Retry the asynchronous output. The error state is exited. May be valid when locus is EL_INPUT. Default when locus is EL_OUTPUT.
OPOS_ER_CLEAR 12 Clear all buffered output data (including all asynchronous output) or buffered input data. The error state is exited. Default when locus is EL_INPUT.
OPOS_ER_CONTINUEINPUT 13 Used only when locus is EL_INPUT_DATA. Acknowledges the error and directs the Control to continue processing. The Control remains in the error state and will deliver additional DataEvents as directed by the DataEventEnabled property. When all input has been delivered and the DataEventEnabled property is again set to true, then another ErrorEvent is delivered with locus EL_INPUT. Default when locus is EL_INPUT_DATA.

Error Codes - OPOS Scale

Table 24: Error Codes for OPOS Scale

Message Return Codes Description
SCAL_SUE_STABLE_WEIGHT 11 Scale weight is stable. The ScaleLiveWeight property is updated before event delivery
SCAL_SUE_WEIGHT_UNSTABLE 12 Scale weight is unstable.
SCAL_SUE_WEIGHT_ZERO 13 Scale weight is zero
SCAL_SUE_WEIGHT_OVERWEIGHT 14 Scale weight is overweight.
SCAL_SUE_NOT_READY 15 Scale is not ready to weigh.
SCAL_SUE_WEIGHT_UNDER_ZERO 16 Scale weight is under zero.
OPOS_ESCAL_OVERWEIGHT 201 The weight was over MaximumWeight.
OPOS_ESCAL_UNDER_ZERO 202 The scale is reporting a weight that is less than zero due to a calibration error. The scale should be recalibrated.
OPOS_ESCAL_SAME_WEIGHT 203 The scale is reporting that the item/weight on the scale is identical to the previously reported item/weight; i.e., the item has not been removed from the scale.

Read Weight Error and Status Codes

Error Codes and Extended Error Codes

Custom Error Codes and Extended Error codes for the Read Weight scenarios can be set by defining the following registry keys under HKEY_LOCAL_MACHINE\SOFTWARE\Zebra\Zebra Scanners\OPOS\Scale.

NOTE : If the registry key is not defined, the default value will be taken.

Table 25: Scale Read Weight Error Codes

Description Registry Key Default Value
Timeout ExResultCode_TimeOut 0
Weight Under Zero ExResultCode_WeightUnderZero 202
ResultCode_WeightUnderZero 114
Weight Over Limit ExResultCode_WeightOverLimit 201
ResultCode_WeightOverLimit 114
Zero Weight ExResultCode_ZeroWeight 0
ResultCode_ZeroWeight 112
Unstable Weight ExResultCode_UnstableWeight 0
ResultCode_UnstableWeight 112

Status Update Events

If the property StatusNotify is true when the scale is enabled, the following StatusUpdateEvent will be generated. Each event is denoted by the tag given in the tag column.

Table 26: Status Update Events

Event Tag
SCAL_SUE_WEIGHT_UNSTABLE US
SCAL_SUE_WEIGHT_ZERO WZ
SCAL_SUE_WEIGHT_OVERWEIGHT OW
SCAL_SUE_NOT_READY NR
SCAL_SUE_WEIGHT_UNDER_ZERO UZ

Download OPOS Drivers for Scanner and Scale

IMPORTANT: Zebra recommends using the latest release whenever possible.

Zebra OPOS Driver for Scanner and Scale bundled with the Barcode Scanner SDK for Windows InstallShield.

To Download Barcode Scanner SDK for Windows:

  1. Visit the Zebra Barcode Scanner SDK for Windows download page and select the desired download(s).
  2. Proceed to the Barcode Scanner SDK for Windows release notes for the version details.
  3. Proceed to OPOS Drivers for Scanner and Scale setup page for installation instructions.