Sign in to follow this  
Followers 0
Mark_2365

SICK barcode scanner and Device Master UP

6 posts in this topic

I have a Control Logix processor with a local ethernet network setup (using a 1756-ENBT) and 10 SICK scanners on the network. I think they are CLV-460's? Oscillating mirror types. The 10 scanners are hooked to a Hirschmann enet switch (unmanaged). I'm using a Comtrol Device Master UP to send the barcode data I'm reading to the processor. I set up a SINT tag in the processor, and that's defined in my Comtrol Device Master. I've got a simple Write to Tag Setup. So, the barcode scanner scans, the Device Master sends the barcode data with an incremented sequence number. I'm having intermittent problems where I see the scanner scan, the data has been read into the scanner (see it in the CLV software), the sequence number increments in the PLC, the SINT tag has the new barcode data. The problem is there seems to be a lag. The way the PLC is programmed is that this is one rung where this occurs. The first condition looks to see if the new sequence number is not equal to the old sequence number. If not, the barcode data is moved to another tag. I think the sequence number increments, but somehow there are interrupted communications, and the barcode data isn't coming through at the same time. This is intermittent, and seems to happen with more frequency as there is more traffic on the network (production lines are running faster, more barcodes being scanned). Thanks for any help.

Share this post


Link to post
Share on other sites
As noted in a somewhat similar thread on some forum (gosh that was specific, wasn't it?), is there any way to have the sequence number be the LAST item in the scan? We had a setup with a similar problem but I couldn't re-arrange anything. I ended up having to wait a very short time after the first indication that new information was arriving (string length not equal to zero) before attempting to move a string. Obviously not all information travels instantly. Some part has to arrive first and unless all of it copies in at once via an interrupt or something there will be a time when the info is only partially there. Good Luck

Share this post


Link to post
Share on other sites
Thanks I'm sure you're correct. Unfortunately, the sequence number is the first in the message sent from the scanner. The good thing is that the barcode I'm looking for will be a different one every time, so I can program not only looking for a change in sequence number, but a change in the barcode as well. You'd think that the sequence number would be last as that makes more sense. There is also no end of file value, which would be helpful. I wonder if using a synchronous copy would work? I was looking on Rockwell's site last night and opened up the instruction manual pdf. I've never used one. I think it's a CPS instruction.

Share this post


Link to post
Share on other sites
I've had a situation where it took 3 plc scans for a data packet to completely arrive from a source device. Check out your CLV Setup Program I'm pretty sure you can add an end of Data / file / message {EOD} character to your transmitted string. The trick here is when you copy the data in the PLC reset the receive register EOD to 00 and use a non 00 for EOD in the CLV. This way you'll turn on a check for EOD flag when you see the sequence change, but not process the data until you have the EOD. Hope that I am being clear enough.

Share this post


Link to post
Share on other sites
Barcode is on a box right? You get data sometime on the box from the scanner. Now you have data waiting in the data area. Sometimes you say you have a lag. There is no mention of you using a photo eye to attach that barcode to a package of some sort. What I usually do is at the trailing edge of the package is whatever is in that buffer location is attached to that box. On trailing edge send the data to host. LocationA that has the barcode SINT LocationA always has some data showing in this area of memory. Buffer locationB used to copy from the original location above to this location when you receive data or change in seq number from the scanner. LocationB will be cleared of data after transmission of data. Move the data on trailing edge of the box (have to have a photo eye mounted next to the scanner receive point or the tracked location from the scanner) from locationB to locationC where you transmit this to a host system. Now clear the data at locationB LocationC will have data sent to the host. Now you can use a timer or count encoder pulses if your tracking to see where on the box you recieve the data from the scanner. This would be an expression of NEQ LocationB 0, start timer, then on trailing edge of box move this data into a file that will show the timer acculation value. If the locationB has never changed from a cleared state you did not received data on the box or too late. This is a No data from scanner You can also use this same situation to use an add instruction to see how many sequence numbers you recieve on the same box. If you receive more than one sequence number on the box increment a count. Also trap for no reads and multicodes also just by knowing what the barcode scanner sends back for no reads, usually ???, and Multicode, maybe "MULTI" up to you.

Share this post


Link to post
Share on other sites
1. First, when the sequence number changes, start a timer. 2. Meanwhile, save a copy of both the sequence number and the bar code data to a separate buffer on each scan. 3. When the timer times out, then retrieve the value in the save buffer and use the data as it is valid. 4. HOWEVER, if you notice that the sequence number has changed BEFORE the timer times out, then use the last reading (hence the reason for saving it), taken just before the sequence number changed. This will be correct data as it was accurate just before the next sequence arrived. The length of the timer should be based on the longest expected wait time for a packet to arrive. You can always calculatete a worst case wait time if you give it some thought and you've configured your network to be deterministic (not sure that you can make any guarantees with an unmanaged switch though).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0