Cognex Scanning Error Handling

So we have existing methods that exist that up until this point have utilized the autoload’s 1D scanner to scan barcodes. Due to switching some barcodes to be 2D, we purchased the cognex that is now integrated onto our hamiltons.
Since we have existing methods, we don’t want to rewrite the structure of them.

We’re trying to figure out if we need the system to scan up to ~64 tubes and the order of each barcode matters since it will live in an array that generates a sequence, what happens when it misses a scan somewhere in the middle?
Is it easiest to clear the array, have it rescan and pray that it catches everything?
Is there a way to have it scan a specific errored position on a 32 position carrier?
Is there a way to have it stop scanning when it errors and allow for manual entry at that point so the array position is not messed up?

Open to suggestions…

1 Like

I implemented the exact same thing as you but with 96 scanned tubes.

I check the array for “NO CODE” or “No Code” which indicates that a tube wasn’t scanned. Prompt user with two options, manual scan missing barcodes or retry. Retry has the cognex scan the entire tube rack, but adds the newly scanned barcodes into the array. Manual scan prompts the user at what position on the tube rack to scan. The user manually scans the barcodes one at a time. I also had to implement and duplicate barcode checking feature in case the user double scans or the cognex double scans.

The key to implementing this was knowing how many tubes to scan, tubes must start at position 1 and that there is no gap of tubes in the tube rack. I used an array of 96, and used the index of the array to keep track of no barcodes and which one to rescan.

1 Like

Okay so when it does a rescan it only inserts the new information into the errored positions into the array rather than it overwriting and potentially populating more errors?
Would you call it easy enough to have it do the automated retry once or twice and if it still has errors populating then prompt for the manual scan?

To clarify, the library doesn’t have that feature to insert new information into the errored positions, I had to script that in.

It was a crap shoot for us if the retry worked. Potentially the 2D barcode was obscured when the user put the tube in the tube carrier, so they would have to reposition the tube anyway to get a scan. In short sometimes retry worked. I gave the users unlimited retries, but once they went into manual scan, they needed to manually scan all the errored positions.

Hey folks,

I was wondering which Hamilton library supports the Cognex barcode readers. Could you please let me know?


You should reach out to your Hamilton rep. I believe there are at least two Cognex libraries. Which one you use depends on the Cognex model.