Scanning labels for data entry

I need to be able to scan labels with barcodes and fill in label values on a Perspective view. Label 1 shows the format of our labels and the data they contain. Label 2 gives a bit more detailed info; the final image is a simplified sketch of our Perspective view layout.

On Label type 1 I have three barcodes

Using an iPad, I can scan each barcode individually and get the raw values shown next to each barcode but can’t get the Best by Date as there is no barcode for that.

On Label type 2 (GS1-128) I have a single barcode

Using the iPad, I can scan the GS1-128 label and get the UPC, Best by Date and Batch number but I cannot scan the Material number as there is no barcode for that.

GS1-128 Label gives the raw data shown in image Label2

]C1010006548798744617250906100012300123

Part 1”]C1” is the GS1-128 code ID

Parts 2, 4 and 6 are CODE-128 App IDs

“01” = GTIN-14 or our UPC code represented by 14 digits

“17” = Expiration Date or Best by Date or Enjoy by Date shown as 6 digits YYMMDD

“10” = Batch Number shown as 10 digits

Parts 3, 5 and 7 are the App IDs values.

“00065487987446” is the UPC number

“250906” is the Best by Date

“0012300123” is the batch number

I can scan the GS1-128 label, send the raw data to a PLC. Concat the data there then send it back to three ignition object tags to fill UPC, Best by Date, and Batch fields. I cannot fill in the Mat number field. I can only have one barcode script for project session event.

Is there a way to get all the data from a single scan of either label? What am I missing? What would be the best way to continue?

NOTE: I use the PLC to concat the data because I am new to ignition. Any scripting advice is very welcome. We are just beginning to use Ignition and I don't have very much to reverse engineer. I have been reading the forums and manuals for a few days now and I am slowly learning.

Tags: iPad IOS Android Mobile Camera Tablet Multiple Barcode Scan GS1-128

Forgetting for a second about the how to transform the data bit, the UPC code is unique to the material is it not? So you can load the UPC numbers in a database and just look up the material number via the UPC number to get the correct material to display?

That may be correct. I am not sure so I will look into in.

I have done a bunch of stuff with the GS1-128 barcodes, Ignition makes it really easy to do string manipulation. One particular tool you can use is python scripting like so:


barcode = "]C1010006548798744617250906100012300123"
codeID = barcode[0:2] #this will grab the characters from position 0 to position 2 and put them in codeID
upcCode = barcode[5:19] #same thing but for the UPC
bestBefore = barcode[21:27]
batchNo = barcode[29:40]

print codeID
print upcCode
print bestBefore
print batchNo

You can run this in the script console to play around with it. It can be inserted in a binding to grab the barcode and return only one of the values to feed one of your elements on screen.

Once you have these values, you can play with running queries on the database using them pretty easily.