LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

barcode reader input to string control

Hi, 

I am using a barcode reader that uses keyboard emulation.  The barcode types on the computer the same way a keyboard would.  When I open notepad and use the barcode reader to read a barcode, the following meesage is typed: 

S/N: 17967

 

Lin: 0.591%

 

Ph: 1.32deg

 

In that exact format.  However, when I try use the reader in labview with a string control the format changes.  The following meassages are printed instead: 

S/N: 17967mn: 0.591%m: 1.32deg

S/N: 17967mn: 0.591%mn: 1.32deg

S/N: 17967mnLin: 0.591%mPh: 1.32deg

S/N: 17967mn: 0.591%m:1.32deg

 

So the format changes.  Sometimes the Lin and Ph are printed other times they are not, spacing in the string changes, and in all cases the carriage return is no longer there.  

Could you please let me know what might be causing this.  Ideally I would like the message to be read in the same format it is in notepad.  My code is attached. 

 

Thanks

0 Kudos
Message 1 of 8
(6,194 Views)

Try to enable '\' Codes Display so you can see what is going on.  i use bar code scanners all the time and they work perfectly fine with a string input.  Codes Display will show you spaces, line feeds, and carriage returns.  It should never change an ASCII value to something different.

 

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 8
(6,169 Views)

Thank you for the reply.  I tried doing that and as expected sometimes the printed string included the spaces (indicated by \s) and other times it did not.  

0 Kudos
Message 3 of 8
(6,101 Views)

Then I would consider using a different bar code scanner.  I always use Symbol Technologies.  There is no reason that a bar code scan should ever be different.  If you are using Symbol, there is a bar code you can scan to return the scanner to the factory default settings. See the user manual.

 

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 4 of 8
(6,092 Views)

Thanks. The scan is the same when I use notepad or word.  The format is not consistent with LabVIEW.  Any idea why that might be?

0 Kudos
Message 5 of 8
(6,085 Views)

I have no idea and have not seen this issue before.  You may want to list the make and model you are using to see if other have seen this issue.  What happens if you copy the scanned information in notepad and paste into a LabVIEW string control?  Is it the same information?

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 6 of 8
(6,080 Views)

The string is displayed in the correct format when I copy from notepad.  

This is the scanner I am using 

http://www.uline.com/Product/Detail/H-1670W/Barcode-Equipment/Motorola-Symbol-LS-2208-Corded-USB-Las...

0 Kudos
Message 7 of 8
(6,073 Views)

Is there a reason you have a timeout event?  You are not doing anything in there.  So I would remove the timeout (you can just remove the timeout input or set it to -1).

 

I'm just thinking that if you set the focus while the scanner is doing its thing is causing the issue you are seeing.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 8
(6,056 Views)