Results 1 to 3 of 3

Thread: Send error message to bar code scanner

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2015
    Posts
    4

    Send error message to bar code scanner

    I have got a bar code scanner and am using it as a virtual serial port. I can read from it fine in my program but I want to be able to trigger the error light to go off from my program. I am using the serial port tool and the write event for it. Is it possible to send an error through the serial to the bar code scanner or will I have to contact the manufacturer. Do I need to write an ASICC character to it.


    Private Sub BarCodeScanner_DataReceived(sender As Object, e As Ports.SerialDataReceivedEventArgs) Handles BarCodeScanner.DataReceived

    Dim Data As String = BarCodeScanner.ReadExisting
    'Write error (will be in if statement)

    End sub

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Send error message to bar code scanner

    The SerialPort class has methods for writing data so that's no problem, but you'll have to consult the documentation for the hardware to find out what command you have to write.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: Send error message to bar code scanner

    There's no real standard for accessing all bar code scanners. You'll have to consult the scanner's manual to know what you do to light that light.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width