Professional Documents
Culture Documents
This white paper covers the Honeywell OPOS suite which supports the following products:
Xenon 1500, 1900,1902, Voyager 1200, 1202, Hyperion 1300, VuQuest 3310g.
Installation.
Download and install the OPOS Suite from the Honeywell Scanning & Mobility website. This
installation provides everything required to configure and test as well as provides ActiveX
components for developing a custom application.
Getting Started.
Honeywell provides a graphical environment in the OPOS Suite which allows straightforward
configuration and testing of a scanning device prior to commencing any development work. This
is a good starting point as the validation tools use the same class libraries and UPOS functions
that a finished POS application will use.
It also allows you to set up a scanner profile and create the correct registry profile entries.
Open the configuration utility and with the flag set to ‘Add device’ enter a profile name.
Set the Auto port detect to ‘true’ or ‘false’ (If false, select the port the device is connected to)
and click the ‘Add Device’ button to save the profile.
This is an entry from the Honeywell Imaging and Mobility Knowledge base. As part of our ongoing effort to improve and enhance the quality of
the solutions, we ask you to inform us if you feel that we can improve on the content of this solution.
For North America: natechsupport@honeywell.com or EMEA: HSMeurosupport@honeywell.com
Select the profile created in the Configuration Utility and click the red icon to verify the device
Once the icon turns green, scan an item to verify the connection within 10 seconds.
The Advanced View provides step by step UPOS testing for both the basic and more advanced
UPOS functionality.
This is an entry from the Honeywell Imaging and Mobility Knowledge base. As part of our ongoing effort to improve and enhance the quality of
the solutions, we ask you to inform us if you feel that we can improve on the content of this solution.
For North America: natechsupport@honeywell.com or EMEA: HSMeurosupport@honeywell.com
This is an entry from the Honeywell Imaging and Mobility Knowledge base. As part of our ongoing effort to improve and enhance the quality of
the solutions, we ask you to inform us if you feel that we can improve on the content of this solution.
For North America: natechsupport@honeywell.com or EMEA: HSMeurosupport@honeywell.com
7. Click the ‘ReleaseDevice’ button to release the OPOS connection when testing is
complete
8. Click ‘Close’ to close the connection.
The buttons in the ‘Properties and Methods’ frame echo the actual properties and methods
used in the driver ActiveX control so can be used to test individual functions when developing
an OPOS application. Full details can be found in the OPOS Suite help files.
The following assumes that Microsoft Visual Studio .Net is being used. Any illustrations shown
below are taken from Visual Studio 2008.
The following examples and the linked source code samples illustrate the basic UPOS
functionality to open, claim & enable a connection, receive barcode data and to release and
close the connection. The first example is written in C#.
1. Create a new C# project in Visual Studio. The example code here is a Windows form
application with buttons for each of the three open and close steps. A label control displays the
bar code data.
This is an entry from the Honeywell Imaging and Mobility Knowledge base. As part of our ongoing effort to improve and enhance the quality of
the solutions, we ask you to inform us if you feel that we can improve on the content of this solution.
For North America: natechsupport@honeywell.com or EMEA: HSMeurosupport@honeywell.com
5. Add the namespaces for the OPOS Scanner to your program as shown here.
- Declare the HandHeldScanner object and create a new instance of the object.
- Also create an event handler which will fire when the host receives data from the scanner
This is an entry from the Honeywell Imaging and Mobility Knowledge base. As part of our ongoing effort to improve and enhance the quality of
the solutions, we ask you to inform us if you feel that we can improve on the content of this solution.
For North America: natechsupport@honeywell.com or EMEA: HSMeurosupport@honeywell.com
- Add code for the Open / Claim / Enable routines. It’s a good idea to check the status of
the connection before opening it.
- Note the ‘AssignLogicalName’ and the ‘XenonP4N’ name we wish to assign. This was
the profile we created with the configuration utility earlier and saved in the Config.xml file
in the POS4NET\bin folder. If there are likely to be other scanning devices used, it would
make sense to assign the logical name dynamically rather than hard code it as here.
- The ‘control.enabled’ properties included here are merely to prevent other buttons on the
sample form being clicked out of sequence.
This is an entry from the Honeywell Imaging and Mobility Knowledge base. As part of our ongoing effort to improve and enhance the quality of
the solutions, we ask you to inform us if you feel that we can improve on the content of this solution.
For North America: natechsupport@honeywell.com or EMEA: HSMeurosupport@honeywell.com
Ensure the scanner is connected, the interface is configured correctly, and an OPOS profile has
been established.
If the source code entered is correct, it should be possible to load the application, click Open,
Claim & Enable, scan a bar code and see the scanned data appear in the ‘lblBarcode’ object.
If that’s the case then the OPOS application has been successfully created.
Further assistance for developing an application with the Honeywell OPOS driver can be found
in the help files accessed from the validation utility. This includes methods & properties for
adding additional OPOS functionality.
For full listings of the sample source code for both C# and VB.Net see the appendix section of
this document. Bear in mind that these are only samples and your application will need to be
fully error trapped and thoroughly tested in the context of your own application.
This is an entry from the Honeywell Imaging and Mobility Knowledge base. As part of our ongoing effort to improve and enhance the quality of
the solutions, we ask you to inform us if you feel that we can improve on the content of this solution.
For North America: natechsupport@honeywell.com or EMEA: HSMeurosupport@honeywell.com
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using OposScanner_CCO;
namespace OPOS_Suite_Csharp
{
public partial class frmTestOPOS : Form
{
public OPOSScanner mScanner; //declare OPOSscanner object
public frmTestOPOS()
{
InitializeComponent();
mScanner = new OPOSScanner(); //create new scanner object instance
mScanner.DataEvent += new
_IOPOSScannerEvents_DataEventEventHandler(mScanner_DataEvent); //create data event
sBarcode = mScanner.ScanData;
lblData.Text = "Scan Data: " + sBarcode;
mScanner.DataEventEnabled = true;
This is an entry from the Honeywell Imaging and Mobility Knowledge base. As part of our ongoing effort to improve and enhance the quality of
the solutions, we ask you to inform us if you feel that we can improve on the content of this solution.
For North America: natechsupport@honeywell.com or EMEA: HSMeurosupport@honeywell.com
try
{
if (txtProfile.Text == "")
{
MessageBox.Show("Please Enter a Profile Name"); //make sure a
profile name is entered
return;
}
//check if connection is open and if not open it
if (mScanner.State == 1) // 1=closed
{
mScanner.Open(txtProfile.Text);
btnClaim.Enabled = true;
btnOpen.Enabled = false;
btnClose.Enabled = true;
return;
}
}
catch (Exception Ex)
{
MessageBox.Show(Ex.Message);
btnClaim.Enabled = false;
return;
}
try
{
if (mScanner.Claimed == false)
{
mScanner.ClaimDevice(5000); //claim device with timeout
btnEnable.Enabled = true;
btnClaim.Enabled = false;
btnRelease.Enabled = true;
lblData.Text = "Scan Data: ";
return;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
btnEnable.Enabled = false;
return;
}
}
mScanner.DataEventEnabled = true;
btnDisable.Enabled = true;
btnEnable.Enabled = false;
btnClose.Enabled = false;
btnRelease.Enabled = false;
}
}
catch (Exception Ex)
{
MessageBox.Show(Ex.Message);
btnDisable.Enabled = false;
return;
}
btnRelease.Enabled = false;
btnClose.Enabled = true;
btnClaim.Enabled = true;
btnEnable.Enabled = false;
lblData.Text = "Scan Data: ";
return;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
btnRelease.Enabled = false;
return;
}
}
This is an entry from the Honeywell Imaging and Mobility Knowledge base. As part of our ongoing effort to improve and enhance the quality of
the solutions, we ask you to inform us if you feel that we can improve on the content of this solution.
For North America: natechsupport@honeywell.com or EMEA: HSMeurosupport@honeywell.com
}
}
Imports OposScanner_CCO
Imports OposImageScanner_CCO
Exit Sub
End If
If mScanner.State = 1 Then
mScanner = New OPOSScanner
mScanner.Open(txtProfile.Text)
btnClaim.Enabled = True
btnOpen.Enabled = False
btnClose.Enabled = True
End If
Catch ex As Exception
MsgBox(ex.Message)
btnClaim.Enabled = False
Exit Sub
End Try
End Sub
End If
btnEnable.Enabled = True
btnClaim.Enabled = False
btnRelease.Enabled = True
Catch ex As Exception
MsgBox(ex.Message)
btnEnable.Enabled = False
Exit Sub
End Try
End Sub
btnDisable.Enabled = True
btnEnable.Enabled = False
btnClose.Enabled = False
btnRelease.Enabled = False
'enable data event
mScanner.DataEventEnabled = True
Catch ex As Exception
MsgBox(ex.Message)
btnDisable.Enabled = False
End Try
End Sub
Try
If mScanner.DeviceEnabled Then
mScanner.DeviceEnabled = False
End If
btnEnable.Enabled = True
btnRelease.Enabled = True
btnDisable.Enabled = False
lblBarcode.Text = "Scan Data: "
Catch ex As Exception
MsgBox(ex.Message)
btnEnable.Enabled = False
End Try
End Sub
sBarcode = mScanner.ScanData
sPrefix = Strings.Left(sBarcode, 4)
sBarcode = Mid(sBarcode, 5)
mScanner.DataEventEnabled = True
lblBarcode.Text = "Scan Data: " & sBarcode
End Sub
End If
btnRelease.Enabled = False
btnClose.Enabled = True
btnClaim.Enabled = True
btnEnable.Enabled = False
lblBarcode.Text = "Scan Data: "
Catch ex As Exception
MsgBox(ex.Message)
btnRelease.Enabled = False
End Try
End Sub
End If
btnClose.Enabled = False
This is an entry from the Honeywell Imaging and Mobility Knowledge base. As part of our ongoing effort to improve and enhance the quality of
the solutions, we ask you to inform us if you feel that we can improve on the content of this solution.
For North America: natechsupport@honeywell.com or EMEA: HSMeurosupport@honeywell.com
btnClaim.Enabled = False
btnOpen.Enabled = True
lblBarcode.Text = "Scan Data: "
Catch ex As Exception
MsgBox(ex.Message)
btnClose.Enabled = False
End Try
End Sub
End Class
Revision History
Rev Date Changed by: Details / Comments
V1.0 03/09/2011 Chris Ingram Document created
This is an entry from the Honeywell Imaging and Mobility Knowledge base. As part of our ongoing effort to improve and enhance the quality of
the solutions, we ask you to inform us if you feel that we can improve on the content of this solution.
For North America: natechsupport@honeywell.com or EMEA: HSMeurosupport@honeywell.com