So your device is operating as a keyboard wedge. So in your page that they filling out this form or whatever you could use expressions to populate the fields. I do this as well. I don’t use the bar code scanner component I just use a regular text entry field. Then I BIND other fields to this source value and use the same methods to split it up. But, I do it with expressions. Then I have like a save or submit button. Which will take those expression values and call system.tag.writeBlocking in the script that fires when button is clicked.
For example… On one of my pages on start-up this text entry component appears and on the composition end event a scrip is called to hide the visibility. The <c/r> at the end of the string will tab to the next field in order. This fires that composition end event. This event will toggle the visibility of that component. I don’t want this janky string “<0D>19D03336A001<C/R>19000001905” where they can see it or manipulate it. (control - J) brings up the menu to attach these scripts and what not to these events…
So after that is populated I have labels with the self.props.text property expression bound to the same property of my now invisible component with the janky string…
So janky invisible string populates a couple of labels with the formatted data.
Understanding these bindings and types of bindings and transforms is key… for doing this kind o fstuff on the front.
then at the end of the day, I use these sets of formatted data, in my script that gets called when the button is clicked
var1 = self.getSibling("count").props.text
var2 = self.getSibling("part").props.text
var3 = self.getSibling("heat").props.text
# Specify the paths
paths = [
# Specify the values
values = [
# Send the writes off
I also have some scanners and scales I just use TCP driver and the telnet port. 23? I think. Alot of scanners work like this too… That is the easiest method. I am not familiar with this device…
Also, I don’t know if it’s advisable to do it this way. There are some old heads here that could weigh in. In my case I have a lot of projects that run only on one client. I also have quite a bit of hp in terms of physical server computing power. I know very little about best practices. I just get it done. Which is what is nice about ignition and perspective honestly.