This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

LabVIEW Barcode Scanner Processing Issue

Updated Jan 19, 2023

Reported In

Software

  • LabVIEW Base
  • LabVIEW
  • LabVIEW Full
  • LabVIEW Professional

Issue Details

I have a barcode scanner that reads in values as if it is a keyboard. I need to process multiple barcode scans in my program. I am using a keyfocus to scan the barcode number into a string control in LabVIEW, but how can I process it in my program after I read in a certain number of characters?

Solution

Continually poll the value of the string control at user defined intervals until the string length reaches the size of the expected barcode.
  1. Create a property node for the string control. 
  2. Wire a boolean True to the property UpdtWhileTyping to update the value of a string as the barcode scanner enters characters. This property is similar to the Update Value while Typing item on the shortcut menu of a string object. 
  3. Inside a while loop, create a property node for the string control and select the property Value. Wire this value into the String Length VI and compare the length until it is the size of the barcode. 
  4. When the string length equals the barcode size, exit the while loop and output the value of the string.
An example program is referenced below. Additional links are provided for further information on barcode scanners.