JeremyAdair
Member
I have ignition running on a PC. There is a barcode scanner app from Sepasoft that allows an PC running ignition to accept barcodes. It costs 500 bucks to enable it on the whole ignition server.
Their documentation is garbage! It has a pretty picture though. Googlers will need this code put into the OnBarcodeRecieved event in the scripting of the barcode component.
print "onBarcodeReceived called..."
result = event.toDict()
barcodeText = result['Default'][0]
print "onBarcodeReceived barcode = %s" %(barcodeText)
tagPath = "TESTERS 9 AND 10/Pretest_Barcode_Scan"
#print tagpath
system.tag.write(tagPath, barcodeText)
Also be aware if you get the barcode addon from sepasoft there will be two barcodes in your component pallet in ignition. The one you need will be at the very bottom of the pallet.
Now I have spent a full month fighting this barcode scanner. It was not working properly and missing scans. I finally found it.
There are these things called scan classes in Ignition. I change my default tags to Leased at the start of every project.
Leased tags have a fast and slow tag update rate. It is slow if nothing is using the tag. It is fast if there is a screen using the tag.
The problem I believe I found is that my tag on the barcode component is not continuously running on the screen. I changed my PLC tag from leased to driven(auto poll at one speed) and all of my barcode problems went away.
The problem I was having was consecutive fast barcode-scanner scans would drop data. I had the client PC open on the console with barcode debug logs set to debug. The debug log had everything coming in fine and I could see every character that ignition processed. My Plc would not get the data but ignition said it sent it.
Since I do not have ignitions phone support I hope to contribute this info to the community here. It bit me.
Good luck guys
Their documentation is garbage! It has a pretty picture though. Googlers will need this code put into the OnBarcodeRecieved event in the scripting of the barcode component.
print "onBarcodeReceived called..."
result = event.toDict()
barcodeText = result['Default'][0]
print "onBarcodeReceived barcode = %s" %(barcodeText)
tagPath = "TESTERS 9 AND 10/Pretest_Barcode_Scan"
#print tagpath
system.tag.write(tagPath, barcodeText)
Also be aware if you get the barcode addon from sepasoft there will be two barcodes in your component pallet in ignition. The one you need will be at the very bottom of the pallet.
Now I have spent a full month fighting this barcode scanner. It was not working properly and missing scans. I finally found it.
There are these things called scan classes in Ignition. I change my default tags to Leased at the start of every project.
Leased tags have a fast and slow tag update rate. It is slow if nothing is using the tag. It is fast if there is a screen using the tag.
The problem I believe I found is that my tag on the barcode component is not continuously running on the screen. I changed my PLC tag from leased to driven(auto poll at one speed) and all of my barcode problems went away.
The problem I was having was consecutive fast barcode-scanner scans would drop data. I had the client PC open on the console with barcode debug logs set to debug. The debug log had everything coming in fine and I could see every character that ignition processed. My Plc would not get the data but ignition said it sent it.
Since I do not have ignitions phone support I hope to contribute this info to the community here. It bit me.
Good luck guys
Last edited: