JOE SKEET
JOE SKEET

Reputation: 8098

checksum middleware software for barcode scanner

we are currently printing code 39 barcodes. The operator of the scanner scans the barcodes very quickly and the barcode is outputted incorrectly once out of every 1000 scans. I would like to implement a checksum to catch this output error. Has anyone done something like this in C sharp Python or Java? Can someone help me get started with some resources?

Upvotes: 0

Views: 621

Answers (2)

s1lence
s1lence

Reputation: 2188

Despite Code 39 Barcodes are often used without checksum, it sometimes is done with a mod 43 checksum appended. Wikipedia provides a small and easy to understand example of how you could do it: http://en.wikipedia.org/wiki/Code_39#Code_39_mod_43

Of course you're completely free to do your own checksum calculation. The goal should of course be a equally distributed output for all possible inputs...

Upvotes: 1

Hugh Bothwell
Hugh Bothwell

Reputation: 56634

"Code 39 is just about the only type of barcode in common use that does not require a checksum" (http://www.mecsw.com/specs/code_39.html).

If you are determining what the code should be, you are perfectly welcome to add whatever checksum values you like - modulo-43 is apparently pretty standard - or simply demand that every code be a certain number of characters, starting with (for example) N and ending in G.

Upvotes: 0

Related Questions