Barcode Scanner Connection With Ignition

Hello everyone,

I’m trying to work with a Zebra LI4278 handheld barcode scanner for an upcoming project.
This scanner can support interfaces blow:

  • USB connection to a host
  • Standard RS-232 connection to a host
  • Keyboard Wedge connection to a host

Now my question is what interface is supported and works better with Ignition? I am pretty new to Ignition and I have not worked with any barcode scanner before so I am not even sure how to get information from barcode scanner with the above interfaces and send it to Ignition. I would appreciate any information you may give.

Thank you!

I would recommend just using ‘keyboard wedge’ or HID mode. Serial connections can be done, but are (in my experience) more trouble than they’re worth.

In Vision, I always use Serial Mode. No delimiters or focus issues. Yes, you need a read thread to parse and deliver to client tags or to window components.

HID or wedge for Perspective–not really any choice.

Thank you @paul-griffith and @pturmel. What if we send the barcode data to PLC and then send that info to Ignition. Does this make the process easier/faster?

I really like sepasoft’s barcode scanner component for Vision. I set the preamble and postamble to 0x02 and 0x03 (start text and end text). For Vision, it works flawlessly for my projects.

I do like routing through the gateway and only using clients for state display and for manual entry. It also eliminates some concerns about the physical location of a client.

The thing is I am not exactly sure how to get the data from barcode scanner to ignition in serial mode. Is there any place in Ignition that you assign this? I saw a barcode scanner component there and you can change its interface mode but I am not quite sure if that helps me to achieve what I want or not (which is pulling out the data from barcode scanner and searching through an SQL database for that numbers/data)

In serial mode, in Vision, you can use the system.serial.* scripting functions in a background thread to read the port.

So then I think I can use something like this:
system.serial.readBytesAsString
Correct?

You would need to use system.serial.configureSerialPort() and openSerialPort() for setup, then readBytesAsString() when data is recieved. The read is blocking and I don’t think you can just have it sit forever waiting for data. You might need to create some sort of listener to watch for serial data?

Thank you very much for your response!

Yeas, you can wait forever. A thread interrupt from outside can be used to cleanly shutdown.