Barcode Scanner Input

How does the Barcode Scanner Input from perspective work?

I have an android based zebra scanner with DataWedge.
I followed up the documentation of DataWedge and read the androidmanifestfile.xml of perspective.
I am trying to set the modus to intent output and set the intent delivery to Broadcast intent, but send via start Activitiy doesn’t work as wel.

I can get the scanner to work is a normal textbox as a keystroke output, but that’s not the way we want too recieve our data. We want to get it work with the Barcode Scanner Input component.

You have to program your scanner with a prefix character and a suffix character for the component to recognize the input as a barcode and not just keystrokes. Have you reviewed the component in the user manual?

Yeah, but the manual is not very helpfull.
I already tried with setting a prefix and suffix character but this did not succeed.

Does the settings in DataWedge have to be a keystroke output or an intent activity or intent broadcast?
I tried all of them.

I would say keystroke output. Verify that the prefix and suffix are being added by scanning into a text editor. If you barcode reads 123456 and your prefix/suffix is * and ? then your barcode should scan *123456? into the text editor. If it doesn’t, make sure you get this part right before you start troubleshooting the Ignition side. Next, make sure that you have your prefix and suffix set in the component props. Once this is done, it should only be a matter of the scripting. You will script the component to do something with the scan on an event. I haven’t used this component, but it is very similar to the Sepasoft version for Vision. This is about all I can tell you on it without trying it myself.

Still not working.
I can scan it into a textarea but not get it into the Barcode Scanner Input component as i wish :frowning:
The prefix and suffix are working as expected.

even tried to set actionperformed event on the component

Also to see the input , scripting shouldn’t be needed on the barcode scanner input component.
It should fill the property data with a result.

Hopefully someone else who has actually used it can chime in here.

You are right, scripting is not needed for this component if you are just retrieving values. As long as the prefix and suffix are correct in the components property, it should fill with values coming in from the barcode scanner.
To test if it is configured correctly, try starting up the view in preview mode and manually type in a fake code. For example, if you have a prefix:! and suffix:@, type in !asdf@. If you see the component fill in with asdf, then it is configured correctly. The component doesn’t have to be in focus or anything, it should just start filling in.
If that works, chances are something with the scanner is not functioning correctly with our component, which shouldn’t be the case but it might be. In that case, it’d be best to contact support so we can get further details and get it fixed.

You're right, in preview mode I can type in the example you gave me. However the scanner does not work with the component. With a normal text area I see that the suffix and prefix are there where they are suposed to be.

I will contact support.

1 Like

I noticed the following:

In the designer and in the browser on the computer everything works as expected when I type the prefix and suffix. However at the mobile phone where perspective is installed it doesn’t work at all. Not in the browser and not in the perspective app.

Hijacking this thread a bit.

I did the test of putting the designer in preview and typing the codes and it works. My problem is that it creates a new element in the data array for each scan. Is there a way to prevent the data array from growing each time and just placing the scan result into a single element?

You can also use just a text field and have the focus on that if you want that?
Otherwise with this component you can script with python, creating a script that loops through the array and puts all data in the first array instance.

Having the scans accumulate was deliberate to support collecting multiple scans while off line.

1 Like