LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial barcode scanner

I have created a vi to read a barcode scanner (Mfg Handheld Model 3800 series) attached to the COM1 serial port. The barcode I am scanning is standard code 39 and after scanning it into Hyper terminal, it matches the label. However, when I scan it using the vi attached, it does not match up. The vi works, it just does not show the correct characters. Any help would be appreciated. Thanks.
0 Kudos
Message 1 of 10
(5,309 Views)
Just how exactly does it not match up? If you were to run the VI until you had data, select Edit>Make Current Values Default, save the VI, and then post that, someone could look at it to see the actual differences. Also provide informations on what you expect to see. You could also give the attached VI a try.
0 Kudos
Message 2 of 10
(5,299 Views)
Thanks for the response. The attached snapshot shows what I get in the read buffer. It should display 284-3004-00 and it does when scanned into Hyperterminal.
 
Matt
0 Kudos
Message 3 of 10
(5,290 Views)
Why did you post a file that was almost 5MB? You could have done what I suggested and had a file that was reasonable to download and a file with real data. Did you try my example? Are you sure the settings in Hyperterminal are the same as in your VI?
0 Kudos
Message 4 of 10
(5,282 Views)
The settings in Hyperterminal are exactly the same. See the example you provided attached.
Message 5 of 10
(5,278 Views)
So, your Hyperterminal Setup looks like this?  Which specific model of the 3800 do you have?  Handheld list several in that series, none of which are just 3800.  The one I happened to look at, the 3800g, has a default setup which is different than what you have, so I am assuming you changed the basic configuration of the scanner?


Message Edited by Matthew Kelton on 10-22-2007 04:00 PM

0 Kudos
Message 6 of 10
(5,271 Views)
You are reading an italic 2, italic 8, italic 4 for the first 3 characters. The difference between these and the characters you expect is is that the most significant bit is high. Hyperterminal on your pc may be simply ignoring what I believe is called the high bit set of ASCII characters. You could simply AND the byte array with x7F and get the correct results.
0 Kudos
Message 7 of 10
(5,267 Views)
One of the options for Hyperterminal (File>Properties>ASCII Setup) is 'Force incoming data to 7-bit ASCII'. If you have this set, that would account for the difference.
0 Kudos
Message 8 of 10
(5,256 Views)
Thanks to all for your input. I found the programming chart online for the scanner (3800pdf) and scanned the correct word length (8 data, 1 stop, parity none) into the scanner. The vi now displays the correct information. Thanks again.
0 Kudos
Message 9 of 10
(5,253 Views)
You should buy a scanner that acts as a keyboard wedge and you may not have such problems. I have been using them with LV for years and have never had a problem.



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 10 of 10
(5,243 Views)