Barcode Scanner Input Component

I’m trying to get the output data from the Barcode Scanner Input component in the Perspective Module.
When I print to the console I only get the following.

scanEntry=QV[[Lcom.inductiveautomation.ignition.common.model.values.QualifiedValue;@39f8d703, Good, Wed Dec 31 18:00:00 CST 1969]

What am I missing? The Component prints the expected result onto the component, I just don’t know how to access the data.

That output is indicating that the value you’re printing is a qualified value…of which, the value member is itself an array (list, technically) or qualified values. Generally speaking, you should be able to iterate over the scanEntry list transparently - try just for scan in scanEntry in your script.

I played around with the barcode component yesterday.

I created a button that triggered the scan barcode event, Then in session events added this script under Barcode scanned.

system.tag.writeAsync(['[default]New Tag'], [data.text])

New tag was the name of the memory tag I created just for testing. The button opened the device camera and as soon as it detects a barcode it closes the camera and puts the barcode results into the tag.

2 Likes