Locked Symbol LS2208 Sample vb .net Code

  • Tuesday, May 11, 2010 9:05 PM
     
     

    I am brand new to using a scanner in vb .net.  I have spent the last couple of hours trying to figure this out.  Is there anywhere that can simply state how to create the scanner object in VB, be able to capture the scan data and send the scan type to one textbox and the scanned data to another.  I can get the scanner to work just fine if I have it send text and an enter key.  Ive installed the OPOS from Microsoft and gotten the SDK from Symbol.  The sample code is for VB 6.  Anyone out there willing to help out?

     

    Thanks

     

     

All Replies

  • Sunday, May 16, 2010 8:52 PM
    Answerer
     
     Answered

    Hi,

    I don't have any VB .Net sample code (could possibly whip up some C# if you want it),  but the SDK documentation isn't bad and the basic steps should be;

    1. Reprogram your scanner... it sounds like it is currently in 'keyboard' mode which won't work with Pos .Net. The scanner needs to be in 'USB' mode. You can tell if the scanner is programmed correctly by opening notepad and scanning a barcode... if no text appears in notepad then it's in the correct mode, if text does appear then it's in keyboad mode and needs to be reprogrammed.

    2. Install the appropriate service object (sounds like you already have).

    3. Create an instance of the PosExplorer object from Pos .Net.

    4. Call GetDevices() and find the barcode scanner you want to use. There are two ways to do this, basically call the GetDevices method and loop through the results and test each scanner until you find one you want to use based on properties etc. Alternatively, call GetDevices and provide the pre-configured logical name (needs to be setup prior to running the code) to choose a specific scanner.

    5. Create an instance of the device.

    6. Connect to the DataEvent of the scanner object (keep a reference to this object somewhere where the DataEvent handler can access it).

    7. Call open, claim and then set DeviceEnabled = true. Call release/close either on app shutdown or when you are done with the scanner.

    8. Write your code in the DataEvent event handler. The barcode and scan type (symbology) should be available from properties on the scanner object.

     

  • Sunday, May 16, 2010 10:59 PM
    Answerer
     
     Answered

    There is sample VB.NET application that interacts with a scanner in my book. The book samples can be downloaded here:

    http://www.annabooks.com/Book_WEPOS.html

    Other information here: http://www.seanliming.com/WEPOS.html

     

    -Sean

     


    www.sjjmicro.com / www.seanliming.com, Book Author - XP Embedded Advanced, XPe Supplemental Toolkit, WEPOS / POS for .NET Step-by-Step
  • Wednesday, March 28, 2012 7:58 PM
     
     

    Hi Terry Warwick

    I'm having problem with  scanner logical name my getdevice always return null value,i having trying to fix this since last three days please help me in solving this issue

    Thanks

    Syed

  • Thursday, March 29, 2012 2:22 AM
    Answerer
     
     

    Have you tried using the sample application that some with the POS for .NET SDK? What about my SOManager - http://www.seanliming.com/POSforNET.html?

    -Sean


    www.sjjmicro.com / www.seanliming.com / www.annabooks.com, Book Author - Pro Guide to WES 7, XP Embedded Advanced, Pro Guide to POS for .NET

  • Thursday, March 29, 2012 11:47 AM
     
     

    Thanks for your reply

    I tried SOmanager also its not allowing me to add logical name its giving error

    and using your inventory sample code but its not allowing me to connect scanner n  raising null value exception cos scanner logical name in getDevice

    Please tell me some other way to add logical name.or any other solution for the above mention problem

    Thanks

  • Thursday, March 29, 2012 4:42 PM
    Answerer
     
     

    Do you see the device listed in SOManager? What about the sample application that comes with POS for .NET and POSDM.EXE?

    What scanner are you using? Is it connected via USB?

    -Sean


    www.sjjmicro.com / www.seanliming.com / www.annabooks.com, Book Author - Pro Guide to WES 7, XP Embedded Advanced, Pro Guide to POS for .NET


  • Friday, March 30, 2012 8:31 PM
     
     

    POSDM SETPATH "C:\Program Files\Motorola Scanner\Common\CoreScanner.exe" /TYPE:Scanner /SONAME:"MOTOROLA_SCANNER"

    When run this command i got this error

    POSDM: Exec 'SetPath' failed: res=80131500: Scanner.MOTOROLA_SCANNER: Is a Legac
    y Device! (can't set hardware path)

  • Wednesday, April 04, 2012 8:38 AM
     
     

    hI

    WHEN I OPEN NOTEPAD SCAN THE OUTPUT GOES TO NOTEPAD,IT MEANS IT WORKS AS KEYBOARD,HOW I CAN CHANGE TO usb MODE PLEASE HELP ME

    tHANKS

  • Wednesday, April 04, 2012 3:12 PM
    Answerer
     
     

    Typically, the user manual that comes with the scanner has some bar codes to scan to change modes. Check with the manufacturing to see if the device can be put into USB HOD mode.

    -Sean


    www.sjjmicro.com / www.seanliming.com / www.annabooks.com, Book Author - Pro Guide to WES 7, XP Embedded Advanced, Pro Guide to POS for .NET