I am trying to use 2D Barcode scanner to scan the downtime reason on the floor. I have a tab container and in one of the tab, I have a embedded view that has the barcode BarcodeInput component.
no matter what I scan I get below response on the screen
What regex/pattern matching(if any) is applied to the barcode input component? Show a screenshot of the component properties if you can.
What model of scanner are you using? What is the output of that scanner configured for? (Prefix, suffix, termination character?) What is the content of the barcode you are scanning supposed to be?
There is no specific pattern, I was looking to scan numbers and alphanumeric values to store to a memory tag.
This is the datalogic scanner we have, I don't know how it was set up
Open notepad (or notepad++, if you have it) on the device connected to the scanner. Create a new text file or tab, and make sure your cursor is on an empty line and scan something using the scanner. It should write to the line in notepad, and you should be able to see the general output format of the scanner.
If that doesn't work, you'll need to connect to the scanner using their config software and see how it is configured, and use that to configure Ignition to look for the same things to properly parse the data.
I tried scanning in excel and in notepad and I got 100 & "Not Scheduled" text.
Just to confirm, I did scan many times and every single time I got the correct value through the scan.
The regex pattern is applied to the buffer on every keypress, which makes it rather finicky. When you scan a barcode nd, the scanner will send a keypress n then a keypress d and finally a keypress Enter.
You're lucky though, because your scanner also sends a literal Enter after the input, so you can look for that. A regex like this might work:
^([A-Za-z0-9\-\/ ]+)(?:\n|\r\n|Enter)$
which should allow any alphanumeric characters, dashes, forward slashes and spaces. Add other characters as required.
Be aware that using a "catch all" regex for your barcode scanner component will basically break any other text input field you place on the page. If you want reliable barcode scanning while also allowing other input, you should configure your scanner to emit a non-typable prefix and suffix.
BarcodeScannerInput is not working right at all.
I tried adding a Input TextField in perspective and It is matching the scan. for example 8400 in the Text field shows as 8400 however the same scan in BarcodeScannerInput object for a brief moment is flashes as 8400 vertically like
8
4
0
0
and only 0 stays. Same behavior after changing the captureMode and Regex = (.*)
The regex setting that @VinceV gave does not work after removing the Return carriage behavior by scanning the scancode given by the Datalogic support team to capture .