LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Is it possible to directly read a barcode into Labview?

 hi everyone..

                         Im also scanning a barcode using scanner and im able to get a result of it aswell. But in my situation my scanning will be automatic and scanned value will be adapted by the labview automatically. In my case PC will be used by the operator and labview.exe may be minimised or running behind all desktop windows and he will be using PC for other purposes.In that case im not able to get the scanned barcode value even if its scanned,the scanned value is generated only if the labview is opened and its in front of all desktop windows and cursor is clicked on the control space provided.

                        Any one can help me in this situation,were we can read the barcode value even if its minimised or its behind all the desktop background running.

                 

0 Kudos
Message 1 of 26
(3,496 Views)

Hi sudhin,

 

barcode scanners usually just emulate a standard keyboard, so you need an active window with an active text/string input to receive the scanned code.

That being said you may try to use the low level "Input device" functions ( in the connectivity functions palette) to read any keyboard input. Now it's your duty to filter any relevant text input!

 

(There has been a thread with basically the same problem about 2 month ago, maybe you just start to search for this.)

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
Message 2 of 26
(3,476 Views)

THANK YOU SIR FOR YOUR QUICK REPLY..

                 Is there any way that i can make my labview active in all ways and it can read the scanned barcode values in it.I am new to this labview and cannot find any idea on this as well. 

 

0 Kudos
Message 3 of 26
(3,464 Views)

1. Place a String control (possibly you need a Focus property)

2. Shoot barcode reader

3. Profit.

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
Message 4 of 26
(3,457 Views)

1. Place a String control (possibly you need a Focus property)

2. Shoot barcode reader

3. Profit.

                     Here if the labview is behind any desktop window it does not read the barcode data. Labview .exe has to be clicked in order to read the data in the string control. 

0 Kudos
Message 5 of 26
(3,445 Views)

What do you mean by "read the bar code"?  It is certainly possible to have a routine (in LabVIEW or some other application language) have a little window in the upper-right corner of the screen that shows the latest Bar Code value (and blanks after 3 minutes, if you want), but if you "cover it up" with another window, you won't "see" it.

 

You can also have a program that, for example, saves the Bar Code (maybe with a time-stamp) to a known file, and have your "What is the latest Bar Code Value?" software look at that file, but then you need to be able to control the caller program.

 

Sounds like your question is less a LabVIEW question and more a "how do I set up multiple simultaneous and totally independent tasks from various vendors to cooperate with each other?" question, an important, but difficult, question.

 

Bob Schor

0 Kudos
Message 6 of 26
(3,428 Views)

@sudhin_sudh wrote:

1. Place a String control (possibly you need a Focus property)

2. Shoot barcode reader

3. Profit.

                     Here if the labview is behind any desktop window it does not read the barcode data. Labview .exe has to be clicked in order to read the data in the string control. 


Quite true. If you set the VI to Modal it should stay in front.

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 26
(3,424 Views)

HI BOB .....Thank you for your reply.

                               My barcode scanning will be done automatically by the robot.During that time operator may be working in the same pc doing his work on it. He may not understand when barcode is happening.So he will not be able to click the .exe labview before the scanning is happening.Is there any way that barcode scanned value is read in a labview which is running behind the desktop window.

 

Your faithfully 

Sudhin

0 Kudos
Message 8 of 26
(3,395 Views)

This is a three step process.

 

  1. When you expect the barcode to be scanned open a modal dialog like this one attached with those windows properties. so the key focus is on the string entry  (if possible generate a /r/t/r at the scan end and the OK button gets magically pressed for you)
  2. Buy the operator a computer to use for his or her business.  The deployment PC has tasks it needs to be doing
  3. Shoot the user

 

 


"Should be" isn't "Is" -Jay
Message 9 of 26
(3,390 Views)

There are barcode readers emulating a serial port over USB. The LabVIEW code could poll the port and drive any input to the proper wire.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019
Message 10 of 26
(3,372 Views)