duplicate Barcodes

T3491tm

Lifetime Supporting Member
Join Date
Mar 2016
Location
Davison
Posts
11
I am looking for some ideas on how to use RSlogix to watch for duplicate barcodes.
we are using a Cognex camera to read the data matix, the umber is a Hex and i have all of that working well but i am looking for a way to scan stored ascii's to make sure that the code just read has not been used before.
 
That's going to be hard if the number of ascii codes you are reading is high. You will have to create a big array that will be filled, one by one, every time a new code is read. Then run a subroutine that compares last code read against all items inside the array excluding the last one. You have to use an index to compare only filled spaces on the array.
 
That's going to be hard if the number of ascii codes you are reading is high. You will have to create a big array that will be filled, one by one, every time a new code is read. Then run a subroutine that compares last code read against all items inside the array excluding the last one. You have to use an index to compare only filled spaces on the array.

This may be correct but in my experience most codes consist of a "fixed" part (such as a site identifier) and a unique part which identifies the individual item. You can usually make things simpler if you just check the unique part of the code.
 
Thank you very much for the quick response

The type is 1769-L32E CompactLogix5332E Controller.

The Hexadecimal number looks like '0778E6P' the P is the only constant is the P at the beginning.

i am just looking for ideas of how i can protect our selves from shipping a part with a previously printed code.

i have never worked with arrays, if the number was a very simple number like single digit what instruction would i use to store each number in a way that i could search and compare with another instruction?
 
How far back to you need to check for a duplicate number?
Is it just the last 1000 parts? Is it indefinitely?

The answers to those questions will most likely determine your next step.
 
well we are looking to keep a record indefinitely but even a 1000 would be better than what i have.
 
Define indefinite with some hard numbers or at least hard estimates.

A few thousand may be doable in the PLC depending on available memory...much more that and you might need to offload the latest barcode to a PC based system and wait for validation from it. This sort of scenario requires you to analyze more what ifs. Like: What if it takes more than a few seconds, what if the PC is dead or offline.
 
i am looking at about 800000 more parts.
i was just thinking if i convert the Hex number into a regular number i could use something like a GRT, if i can change the source every time i index the number. that way i just make sure that i am at least one number higher then the last one that was printed.
 
With that many parts, I would think the only way to do this would be to hook up the controller with a database on a computer and have it do the checking if you need to be 100% sure.

What is generating the bar codes?
 
With that many parts, I would think the only way to do this would be to hook up the controller with a database on a computer and have it do the checking if you need to be 100% sure.

What is generating the bar codes?
i am using a laser and the PC that runs the laser is where the hexadecimal comes from.
we do have a server and all the necessary components to send, store, scan, and confirm, on a server type collection but I am having a lot of trouble with the return hand shake from the server.
the server gets and stores the number but 900 times out of 1500 times it will respond as a bad number even after storing it correctly. and for the last eight years it has been nothing but trouble for us.
I found the cause for the duplicates but we still need to have some kind of safety check to ensure that we don't send another duplicate barcode.
 
An array of 800000 bits is "only" 100k bytes - use the part number to index into the array and check/set the relevant bit. If the platorm will not support that size array, create several smaller ones.
 
This comparison should really be done by the server on its own database.
Spend more time looking into why you are getting duplicates to begin with.
Maybe if you post more application and interface info we can come up with a better solution then comparing.
 
Can you send the code from laser/PC to the PLC? If so, then you'll only need to compare that reference code to the scanned code. Let the Laser/PC do its job of creating unique codes and just verify with the barcode reader and PLC.
 

Similar Topics

Hello All, need one help , looking for a example which can help me to write following code in Studio 5000 ladder logic. I have 2 String...
Replies
14
Views
10,505
Hello, We have an older machine that has a standard PanelView (2711-T10C3) connected over DH485 to a SLC 5/04 PLC via a 1761-NET-AIC module in...
Replies
1
Views
671
I have an application where I am sending emails and SMS text messages via an SMTP server, using MSG instructions. Everything works fine, except...
Replies
4
Views
1,220
Hello all, Stupid newbie question... Just making sure, a bit constantly flipping, and it is reference by 2 OTE in different ladders, that is...
Replies
9
Views
1,724
I have an existing FTV SE application running on a computer and trying to add another "station" at the location. The application is FTV SE v12...
Replies
0
Views
852
Back
Top Bottom