Manipulating a String from a barcode scanner.

Cjohnson9127

Member
Join Date
Mar 2018
Location
US
Posts
10
I have a barcode scanner reading bin labels and handing a string to an Laser Guided vehicle to place the bin in its appropriate location based on the barcode. There is a situation where if the bin fails inspection I need to make the system overlook the barcode and take the bin to a different area. To do this I just need to change the 23rd digit of my string to a 5 instead of a 0-4. Can I do this just by copying a 5 into that digit, or do I need to make a seperate string to replace the scanners results when this inspection is failed. Thank you for the help!
 
If this is a Rockwell-based device receiving the barcode, then, yes, it is possible to directly replace a character into the .DATA array element (i.e., [22]) of the STRING tag after the barcode is received. Just make sure to use the ASCII value of "5" and not 5 itself (assuming all received info is ASCII).
 

Similar Topics

Using a 1769-L16ER-BB1B We are receiving a DINT from an external device. Then changing the sign using a SWPB order mode REVERSE dest Dint_2 same...
Replies
7
Views
3,006
Hello, Have aoi written in Ladder to pass in and out string variables. String VAriables that interact with PLC program are declared as InOut...
Replies
5
Views
4,195
Hello everyone. I have a quick question regarding dates in Structured text. What I´m trying to do is to take the current date, add/subtract days...
Replies
3
Views
1,595
Hi, I was wondering if you could help. I am using a Micrologix 1400 where I have an 11 digit number loaded in a L# data type (doubleword). This...
Replies
5
Views
2,979
I'm looking for a decent way to set independent statusbits of the statusword in simatic Step7. (CC0 - CC1 - OV - BR - etc...) When I want to set...
Replies
17
Views
3,350
Back
Top Bottom