bobuhh98 Posted May 5 Report Posted May 5 Hello, I am a relatively new Controls Engineer looking for some guidance on an issue I am having with transferring barcode scanner data. Some quick bits of information: Allen Bradley CompactLogix 5380 v 35 Zebra Barcode Scanner DS3608 EA3600 Ethernet Firmware v 001-R08 I am trying to collect barcode data from the scanner and move it to another tag that is a string. The issue is that the data will very occasionally come through as "$00$00$00....". I am wondering if this is a PLC issue, or potentially a configuration issue with the scanner. How I am currently doing it CPS: Source - Scanner.Data[0]; Dest - Scanner2.Data[0]; Length - Scanner.LEN Both Source and Dest are SINTs. Source is Controller level, Dest is local. The data is later moved again using the MOV instruction MOV: Source - Scanner2; Dest - Scanner3 (a UDT) Quote
Ken Roach Posted May 5 Report Posted May 5 I have not used that Zebra unit before, but at first blush this sounds like an RPI timing issue or just a mistake at designating the length. Does the Zebra provide some kind of "new data present" or handshake to let the PLC know that there's a new symbol decode string in the Input data table ? Do you execute that CPS instruction every single scan ? The Scanner.Data[x] SINT array is the Input tag itself, correct ? Do you know what the Zebra is set to do in the event of a bad decode ? I would take a step back and look at how the Input data changes when there's a new decode. You could also maybe troubleshoot by putting a "if .LEN >0" condition on the CPS instruction. Because the source is a simple SINT[x] array input tag, and the destination is an ordinary STRING, there shouldn't be any of the v36+ question about the length of data depending on the size of a UDT that's involved. Quote
BachPhi Posted May 6 Report Posted May 6 I have to give credit to the Zebra engineers — they really made this barcode scanner way more complicated than it needs to be. Next time, I’d recommend going with the RTA 435NBX — it’s truly plug-and-play. Feel free to try out my code below. NEQ bcScanner:I.UpdateCounter LastCounter BST COP bcScanner:I.Data[0] BarcodeReadData[0] bcScanner:I.BarcodeLength NXB MOV bcScanner:I.UpdateCounter bcScanner:O.AckCounter NXB MOV bcScanner:I.UpdateCounter LastCounter BND Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.