Author Topic: Anyone familiar with barcode scanners and associated software?  (Read 3244 times)

0 Members and 1 Guest are viewing this topic.

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Let's say there are cards printed with student information, such as ID #, age, test score, and weight. Each card has those info for a student in the form of 3 barcodes, but the barcodes might not be the same format (symbology), and they are in random positions on the card.

I need a PC application that allows an user to use a bar code scanner to scan the 3 barcodes on each student's card, and print a label. The label will show a single barcode in a consistent format that contains the student info concatenated in a certain format. So if the student ID is 300, weight is 80, score is 20, the label single barcode will corresponds to 3008020.

The PC application needs to have dialog boxes that allows the user to manually input a certain field in case some barcodes cannot be scanned. Under normal use, the PC application should prompt the user to scan each student barcode, possibly via moving the cursor through different field boxes, which gets autofilled if successfully scanned.

Please tell me the easiest way to achieve this. I obviously need a barcode scanner, a PC, a suitable printer. But what about the software portion?

Thanks
 

Offline PartialDischarge

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: 00
Re: Anyone familiar with barcode scanners and associated software?
« Reply #1 on: March 21, 2018, 08:00:04 pm »
Bartender professional edition, its about 420Euros iirc.
But get the standalone pc version not the online webserver based edition, this one is crap
« Last Edit: March 21, 2018, 08:18:42 pm by MasterTech »
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2601
  • Country: us
Re: Anyone familiar with barcode scanners and associated software?
« Reply #2 on: March 21, 2018, 08:14:25 pm »
Most barcode scanners act like keyboards as far as the PC is concerned, so you'd just need to make sure the reader supports all of the required formats, and receiving the barcode in software is fairly simple. 

If your output format is simple (code39 or something) and you want to do the software on the cheap and with little or no programming you could probably just use Excel--you'll want to take advantage of the sheet protection features to prevent mishaps where things get entered in the wrong cell, but simple formulas can do the required concatenation.  A bit of VBA could be useful to improve the user experience, but even that probably isn't strictly necessary.
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Anyone familiar with barcode scanners and associated software?
« Reply #3 on: March 21, 2018, 08:32:26 pm »
Unless you want something limited and costly, you need to look at foundation barcode use is built on.

A lot of barcode scanners act like a keyboard. This is easy to interface but caries a bunch of fails.

The computer should know that chunk of information is from a barcode device, the symbology & the data, Then a program can do the proper thing with the data.

Older scanners used line based codes as they are somewhat easer to scan.

Think about old stuff that acts like a keyboard. The input field has to be correctly positioned when barcode is scanned or information is entered wrong. It is up to user to do a lot of needless work.
To get this to work you may have to drop the symbology, making things worse or more open to errors.

With proper foundation things can get very easy.

Today there is software that can read a barcode from an image.
A phone camera can be your barcode reader input.
By using an image you also get 2d & 3d symbology.
The image could be from a paper scan or a fax.

This helps if the image is a form an do OCR on the form.

So before jumping look at the big picure and where this teck could be used.

Look at barcode options that linux has. This has been around a long time.
Look at barcode on an androd phone.

You then might think of something like a RaspberryPi with camera as your barcode scanner.

You have more options if you can do just a little software.

 

Offline SparkyFX

  • Frequent Contributor
  • **
  • Posts: 676
  • Country: de
Re: Anyone familiar with barcode scanners and associated software?
« Reply #4 on: March 21, 2018, 09:48:35 pm »
For the handheld scanners i am used to, it is either a keyboard wedge connection or there is a serial port. Their data sheets are particulary interesting to read about the subject, so have a look in the documentation of your chosen input device. Some (Datalogic) allow in their configuration to prepend the data with the type of barcode and data length that has been successfully read and would allow to identify which information is which.

In any case a simple bash or perl script would be able to sort input data, the harder part is the barcode generation and finding a standalone solution for barcode generation that can simply be automated in the shell or a script, but not relies on online services. So it really depends how the input is processed, as everything else needs to be compatible to it. Which is why i usually prefer a more flexible shell or script solution to do the job than an application with a user interface and all that, most of those tasks are one timers for me.

For me personally i probably will take a look if a perl module like Imager::QRCode will work in my case.
« Last Edit: March 21, 2018, 09:50:15 pm by SparkyFX »
Support your local planet.
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: Anyone familiar with barcode scanners and associated software?
« Reply #5 on: March 22, 2018, 06:55:50 am »
Unless you want something limited and costly, you need to look at foundation barcode use is built on.

A lot of barcode scanners act like a keyboard. This is easy to interface but caries a bunch of fails.

The computer should know that chunk of information is from a barcode device, the symbology & the data, Then a program can do the proper thing with the data.

Older scanners used line based codes as they are somewhat easer to scan.

Think about old stuff that acts like a keyboard. The input field has to be correctly positioned when barcode is scanned or information is entered wrong. It is up to user to do a lot of needless work.
To get this to work you may have to drop the symbology, making things worse or more open to errors.

With proper foundation things can get very easy.

Today there is software that can read a barcode from an image.
A phone camera can be your barcode reader input.
By using an image you also get 2d & 3d symbology.
The image could be from a paper scan or a fax.

This helps if the image is a form an do OCR on the form.

So before jumping look at the big picure and where this teck could be used.

Look at barcode options that linux has. This has been around a long time.
Look at barcode on an androd phone.

You then might think of something like a RaspberryPi with camera as your barcode scanner.

You have more options if you can do just a little software.

In my students example, the cards contain different info in multiple barcodes. The barcodes are not necessarily in fixed corresponding locations, and can be in different format. The way I understand it, most modern scanners can auto detect barcode format so that's not a problem. The fact that the barcodes are in random locations means an user would have to individually scan each barcode in an given order (An intelligent OCR solution will be better but I can't do that given the time constraint...)

So my software need to have a dialog boxes with multiple fields. You guys mentioned that barcode scanners are like keyboards so that means it can autofill the textboxes. A simple program using C# might do this. In fact, I'm going to use Zebra scanners and they offer a SDK (software development kit) for their scanners.

https://www.zebra.com/us/en/products/software/scanning-systems/scanner-drivers-and-utilities/scanner-sdk-for-windows.html

I have some programming experience so this step shouldn't be that hard. But I'm a little unclear on how to create a new barcode that contains the concatenated info. Currently, I'm looking at this label maker software by Zebra:

https://www.zebra.com/us/en/products/software/barcode-printers/zebralink/zebra-designer.html

Not sure if it can be interfaced with whatever program I develop with their SDK.

Just want to make sure I'm on the right track for something like this, and that there are no easier/better solutions.

Thanks
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Anyone familiar with barcode scanners and associated software?
« Reply #6 on: March 22, 2018, 08:36:00 am »

In my students example, the cards contain different info in multiple barcodes. The barcodes are not necessarily in fixed corresponding locations, and can be in different format. The way I understand it, most modern scanners can auto detect barcode format so that's not a problem. The fact that the barcodes are in random locations means an user would have to individually scan each barcode in an given order (An intelligent OCR solution will be better but I can't do that given the time constraint...)


Just want to make sure I'm on the right track for something like this, and that there are no easier/better solutions.

Thanks

if you throw away most all the information before it gets to a program, your only option is using the crippled information input.
So you can not use the fact that information came from a barcode to select which input fields.
The fact that when processing a lot of barcode input that same symbology is used for the same barcode.value and select proper input field.

A good program lets you use all information to make job easer with a fall back to dumb operator assisted.

So a barcode scanner acting like a keyboard is the easiest to start using, but will always be crippled.
With more information your program can throw away information to get to simple if needed but can use information if it helps.
Today a USB bar code scanner should have a mode that says it's a bar code scanner an program can make some choices.

A windows program is based on events.
A mouse event allows mouse actions.
Think of a touch screen. A touch screen has different capabilities then a mouse. If you do input correctly your program has a touch screen event, A mouse event & a touch pad event. Only then is a smart choice possible in a program.
With out this your program has to be dumb and can never use the touch screed zoom event.

So by having a bar code event lets you do the best input and still allows a dumb program . No bar code event forces program be dumb.
So the question is do you always want dumb program.
Why not use the computer as a smart device it can be instead of a dumb thermal.


 

Offline djnz

  • Regular Contributor
  • *
  • Posts: 179
  • Country: 00
Re: Anyone familiar with barcode scanners and associated software?
« Reply #7 on: March 22, 2018, 11:11:28 am »
I have some experience with this, so here are my 2 cents.

Most modern commodity barcode scanners can be configured by the consumer to output data in different modes. This is not a factory configuration, but rather, the same scanner can be reconfigured quite easily by the end user  and it is standard practice to supply the instructions to do so.

The three most common modes are USB keyboard, PS2 wedge (PS2 Keyboard), and Serial. The output mode of the scanner is not determined by the connector of the cable that comes with it - the cable is detachable in most cases and can be changed to change the type of connector.

The easiest modes to use are the keyboard modes, but they have a disadvantage. Because the scanner appears to be a keyboard to the computer, all standard rules of typing text in apply. The text always appears at the current position of the cursor / caret. This can be a problem. For example, if you have your custom application running and click somewhere else, say the address bar of a web browser, the text sent by the barcode scanner will appear in the address bar of the browser, not in your custom application. This makes the system less robust / less idiot proof.

The better way to do this, I think, is to use the serial output mode of the scanner. This way, you can have robust program design that does not depend on cursors. One way of designing such a program is to have a background thread / process which reads the data from the scanner over serial ("COM Port" in windows) and then your application can get the data from there.

 

Offline SparkyFX

  • Frequent Contributor
  • **
  • Posts: 676
  • Country: de
Re: Anyone familiar with barcode scanners and associated software?
« Reply #8 on: March 23, 2018, 03:22:00 am »
A different symbology per information in the input data is an advantage here, because it assists in the input validation/sorting. Can´t help you with that.

Keyboard wedge driven scanners are usually configured to send a tabulator or newline after the data so they jump to the next input field.

I too prefer serial data over that, as you can automatically configure the scanner based on the application, like setting which barcode types are accepted (no other unintended barcodes types can be scanned), if it should buffer input data until the interface is free or reject scanning the same code twice (another common problem when pulling the trigger or setting it to auto detect) but only send the first event to the host. This configuration can of course also be done by scanning configuration codes manually and it will keep that configuration in non-volatile memory.

As for the generation of barcodes... i´d try to avoid proprietary programs... it´s too much hassle and usually not automatable - besides sendkeys (runs into problems regarding window or input field focus) or solutions like AutoIT (for sending keyboard and mouse events - down to the proper control field and without focus change problems). I´d probably do that in a system call to a script that outputs an image - even formatting of an image is quite simple with tools like ImageMagick.

The printing part seems to be a snap in C#, regarding this stackoverflow question, as long as you have an image available.

Support your local planet.
 

Offline cstratton

  • Regular Contributor
  • *
  • Posts: 62
  • Country: us
Re: Anyone familiar with barcode scanners and associated software?
« Reply #9 on: March 23, 2018, 03:32:49 am »
Note that for the USB keyboard interface, on a Linux system it should be possible to read from the specific input device, and so disambiguate the barcode results from other keystrokes.

That said, on a current project it's kind of nice that the software will accept a suitable formatted string from either the scanner or the keyboard, as being able to punch in a dummy product serial number simplifies debugging without having to have a scanner and barcode label at hand.
 

Offline SparkyFX

  • Frequent Contributor
  • **
  • Posts: 676
  • Country: de
Re: Anyone familiar with barcode scanners and associated software?
« Reply #10 on: March 23, 2018, 04:38:33 pm »
The ZXing Scanner App or Barcode Scanner+ allows to send a custom formatted GET-Request to a webserver, i used those to do such jobs that way, but the phone camera is not as good as the one of a Datalogic scanner i have laying around, regarding minimum focal distance. The Datalogic is able to scan even very small QR Codes (like 5mmx5mm), the phone (LG Nexus 4) does not get the picture big enough for the barcode scanner to read it properly. 1D Codes are read a lot faster by the Datalogic. Might vary from phone to phone of course.

P.S.: and as personal data is involved, avoid online services to process the data.
« Last Edit: March 24, 2018, 01:21:17 pm by SparkyFX »
Support your local planet.
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: Anyone familiar with barcode scanners and associated software?
« Reply #11 on: March 25, 2018, 02:34:00 pm »
I have some experience with this, so here are my 2 cents.

Most modern commodity barcode scanners can be configured by the consumer to output data in different modes. This is not a factory configuration, but rather, the same scanner can be reconfigured quite easily by the end user  and it is standard practice to supply the instructions to do so.

The three most common modes are USB keyboard, PS2 wedge (PS2 Keyboard), and Serial. The output mode of the scanner is not determined by the connector of the cable that comes with it - the cable is detachable in most cases and can be changed to change the type of connector.

The easiest modes to use are the keyboard modes, but they have a disadvantage. Because the scanner appears to be a keyboard to the computer, all standard rules of typing text in apply. The text always appears at the current position of the cursor / caret. This can be a problem. For example, if you have your custom application running and click somewhere else, say the address bar of a web browser, the text sent by the barcode scanner will appear in the address bar of the browser, not in your custom application. This makes the system less robust / less idiot proof.

The better way to do this, I think, is to use the serial output mode of the scanner. This way, you can have robust program design that does not depend on cursors. One way of designing such a program is to have a background thread / process which reads the data from the scanner over serial ("COM Port" in windows) and then your application can get the data from there.

Okay, thanks. Do you have experience with Barcode softwares like BarTender?

The person I'm doing this for wants me to use an off the shelf software like BarTender. I'm still studying the BarTender to see its capabilities. It seems to allow you to build a form (with different text fields) that'll accept scanned barcode. The Keyboard mode will obviously work in this scenario, and it's probably what the customer want. I'm not sure if the serial output can be used. BarTender allows for VB scripting, so perhaps that's something I need to look into?

Another issue I have is that the user will scan different barcodes (for different fields) and the application needs to concatenate them into a new barcode and print it. This concatenated barcode will be fed into a system that'll parse it.  The way it parses it is that it uses a "data type identifier" like "Q" for quantity, "P" for product number, so my application needs to prepend a character to the barcode prior to concatenating. Is this something VB scripting can do? (prepending/appending or pretty much manipulating the scanned barcode anyway you want...)

Speaking of parsing, they use a UNIX like Regular Expression. So for "product number", the parser is :
^P\([A-Z0-9]\{0,19\}[A-Z0-9]\{1\}\)[]*$

I know it'll look for the starting character P, and any character A-Z0-9 given that the length is from 0 to 19. But I'm not sure what "[]*" means at the end.

I'm also not sure how it'll parse a product number like "P03P5" where the letter P actually appears as part of the number.

Please advise. Thanks

And even after I figure out how they parse it,
« Last Edit: March 25, 2018, 02:37:17 pm by engineheat »
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Anyone familiar with barcode scanners and associated software?
« Reply #12 on: March 25, 2018, 04:29:28 pm »

You can make life hard for user or easy.
Step one is you need to think like a computer.\

When a user fills a form, they use extra information to select what field to enter data.
Bar code scanner just gives data. If data does not specify what field then user has to position before scan.
Think of how slow this can be like at a store filling a sales form.
Stores use fact that it's a UPC code to know.
A special sale item uses a special local use UPC code or uses a different symbol code to identify the item.
Ease of use is not just getting a number it is also getting what blank on a form.
Many ways to do this. If number is in this range it's ____
With bar code symbology & larger numbers are easy.
 

Offline SparkyFX

  • Frequent Contributor
  • **
  • Posts: 676
  • Country: de
Re: Anyone familiar with barcode scanners and associated software?
« Reply #13 on: March 26, 2018, 10:06:04 am »
Another issue I have is that the user will scan different barcodes (for different fields) and the application needs to concatenate them into a new barcode and print it. This concatenated barcode will be fed into a system that'll parse it.  The way it parses it is that it uses a "data type identifier" like "Q" for quantity, "P" for product number, so my application needs to prepend a character to the barcode prior to concatenating. Is this something VB scripting can do? (prepending/appending or pretty much manipulating the scanned barcode anyway you want...)
Most scanners already do this for you, as long as there are different formats for each and you always know which is which.

Quote
Speaking of parsing, they use a UNIX like Regular Expression. So for "product number", the parser is :
^P\([A-Z0-9]\{0,19\}[A-Z0-9]\{1\}\)[]*$

I know it'll look for the starting character P, and any character A-Z0-9 given that the length is from 0 to 19. But I'm not sure what "[]*" means at the end.

I'm also not sure how it'll parse a product number like "P03P5" where the letter P actually appears as part of the number.
In English, this means:
^ - Start of String
P - followed by exactly one letter "P"
\([A-Z0-9]\{0,19\}[A-Z0-9]\{1\}\)  - followed by 0..19 characters in between A-Z or 0-9 and followed by exactly one character of that set (it means the last character will be treated separately, as the regex tries to match based on the preceding and following expression)
[]* - 0 or more of an empty character set, might be a catchall for non printable characters as carriage return / newline combinations, tab,
$ - end of string

{}, + and * are multiplier modifiers,
{} can have a specific amount or range of multiples of the preceding expression (which can be encapsulated in parantheses to have more complexity),
+ = one or more,
* = zero or more

Appending a "?" to + and * makes them "non-greedy", meaning they do respect right hand side expressions before capturing all matching characters toward the right.

For start of string and end of string it depends if it runs in single line or multiline mode and if extended whitespace is switched on or off and if the same expression runs over the same data several times. Those are usually controlled by modifiers outside the expression. Usually start of string is left of the first character and newline/carriage return/formfeed as end of string, so it depends on the exact implementation what is considered start and end.

There is of course a lot more to regular expressions, it really is worth learning if you tend to work with plenty of parsing and data processing.
« Last Edit: March 26, 2018, 10:21:19 am by SparkyFX »
Support your local planet.
 

Offline ebastler

  • Super Contributor
  • ***
  • Posts: 6426
  • Country: de
Re: Anyone familiar with barcode scanners and associated software?
« Reply #14 on: March 26, 2018, 10:24:21 am »
In my students example, the cards contain different info in multiple barcodes. The barcodes are not necessarily in fixed corresponding locations, and can be in different format.

The problem appears somewhat ill-defined. If it is not clear which barcode is which, how can either the software or the user assign them correctly? I take it that there is no identifier encoded in the individual barcodes, which would allow you to recognize its meaning after you have read a barcode?

Quote
The fact that the barcodes are in random locations means an user would have to individually scan each barcode in an given order (An intelligent OCR solution will be better but I can't do that given the time constraint...)

That seems extremely error-prone. And how would the user identify which barcode is which? Are they at least co-located with a legend in plain text?

Out of interest: How did your customer end up with such a mess of input sheets? Did they just apply barcode stickers at random locations of a plain piece of paper? Isn't there at least a standard layout printed on the form, which tells the person compiling the original data which barcode goes where?
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: Anyone familiar with barcode scanners and associated software?
« Reply #15 on: March 26, 2018, 02:48:13 pm »

Out of interest: How did your customer end up with such a mess of input sheets? Did they just apply barcode stickers at random locations of a plain piece of paper? Isn't there at least a standard layout printed on the form, which tells the person compiling the original data which barcode goes where?

I used students as a simple example. The real problem actually deals with feeding reels of electric components into a production systems. The parts come in reels from different suppliers but the production system needs to parse a consistent barcode that contains things like part number, quantity, etc...
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: Anyone familiar with barcode scanners and associated software?
« Reply #16 on: March 26, 2018, 02:56:58 pm »
Most scanners already do this for you, as long as there are different formats for each and you always know which is which.

By different format do you mean different symbologies like Code 39, Code 128, etc?

Quote

Appending a "?" to + and * makes them "non-greedy", meaning they do respect right hand side expressions before capturing all matching characters toward the right.

So in my example above, the parser would be greedy and therefore would capture the string for as long as possible. Then I don't have to worry about the string containing the data type identifiers. But this would also mean there needs to be an "end marker" to a string, like carriage return or newline?

Quote
Usually start of string is left of the first character and newline/carriage return/formfeed as end of string, so it depends on the exact implementation what is considered start and end.

I guess most scanners can be set to append a carriage return or newline to the scanned data, and then it would mark the end of the string, and the []* term of the parser will catch it. Then I got no issues?

Thanks for the helpful answer by the way.
 

Offline SparkyFX

  • Frequent Contributor
  • **
  • Posts: 676
  • Country: de
Re: Anyone familiar with barcode scanners and associated software?
« Reply #17 on: March 27, 2018, 05:06:17 am »
By different format do you mean different symbologies like Code 39, Code 128, etc?
Exactly.

Quote
So in my example above, the parser would be greedy and therefore would capture the string for as long as possible. Then I don't have to worry about the string containing the data type identifiers. But this would also mean there needs to be an "end marker" to a string, like carriage return or newline?
Or simply no more characters, regexes imho do only work on blocks of data (vs. non-blocking streams of data), cause they also implement look-ahead features. What the regex engine does with a newline at the end is afaik controlled outside the regex. So you can separate data before running the regex over it or you can use the regex to split the data in the right position(s). Which part of the information you keep for control purposes or sense checks is up to you.

Quote
I guess most scanners can be set to append a carriage return or newline to the scanned data, and then it would mark the end of the string, and the []* term of the parser will catch it. Then I got no issues?
Should work. The []* literally means 0 or more of an empty character set class, it doesn´t make much sense to me, as you could write all cases into it or leave it. It could mean that there shouldn´t be anything in between the last barcode character and end of string, but that is negated by using "*" which allows 0 occurences of that term. Anyway, the whole expression would not match if there were additional characters, it must be followed by the end of string to match the whole line.

Support your local planet.
 

Offline engineheatTopic starter

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: Anyone familiar with barcode scanners and associated software?
« Reply #18 on: April 04, 2018, 05:20:31 pm »

Appending a "?" to + and * makes them "non-greedy", meaning they do respect right hand side expressions before capturing all matching characters toward the right.


Thanks.

I think I simplified the problem a bit. I only need to concatenate 4 fields: product number (P), quantity (Q), operator number (O), and lot number (L). All of them are numeric, except for lot number which can contain random alphabets in addition to numbers.

I plan to concatenate such that lot number comes last. So if:

Product number = 100
Quantity = 2000
Operator number = 999
Lot number = 55L888

I will concatenate it as:        P100Q2000O999L55L888

I can parse the product number using ^P[0?9]{0,19}, which would give me 100. The subsequent "Q" will be not parsed because it's not a number. Similarly, I can use ^Q[0?9]{0,19} to parse quantity, and ^O[0?9]{0,19} for operator number.  This is the beauty when you only deals with purely numeric data.

Lot number is tricky because it can contain alphabets. I want to use ^L[A-Z0?9]{0,19}, but the lot number might have the letter "L" in it, as shown above. This is where "greedy vs non-greedy" comes into play. Based on your answer above, ^L[A-Z0?9]{0,19} should be greedy, so it would capture "55L888" rather than just "55", right?

Please correct me if anything I've mentioned above is wrong. If I understood it correctly, then I believe I got a solution.

Also, the data will be scanned into fields on a form. For the numeric data, will the scanner send it as characters (char) or pure numbers (int) usually?

Thanks
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf