LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prompt user for input

Hi,
 
Can anyone help me???
 
I try to use the "Prompt User for Input" express VI with a scanner for getting serial number off from a barcode label.
 
When the dialog box pop out, I need to use the mouse to put the cursor in the box before I can use the scanner to get the number in it. After this, I have to use the mouse to click on the "OK" button to finish.
 
I wonder is there any way I scan the number in without using the mouse. I want to cut the user interaction to a minimum.
 
Thanks very much.
 
Vincent
0 Kudos
Message 1 of 10
(15,584 Views)

Don't use Prompt User for Input.  Instead see the code below.  The focus is set on the string control so that when you run it, the cursor will appear inside the string control.  You enter in some text, then press the Enter key.  This stops the while loop and the program is done.  You must set the Key Navigation of the OK button to the Enter key for this to happen.  Also, your barcode scanner must be programmed to send a newline character (carraige return and line feed) after scanning.  This will trigger the OK button just as if someone pressed the Enter key.

Message Edited by tbob on 08-02-2006 05:22 PM

- tbob

Inventor of the WORM Global
Download All
Message 2 of 10
(15,580 Views)

Like BCrabbit I'm also trying to minimise unser interaction as much as possible. What I'm trying to do, is just display some messages to the user

examples: 1)Place the unit on the board

                 2) Slide the pot to 70

                3) Turn the main power on

So on and so forth. I don't want the user to hit any ok button as well and nor do they have to enter any data. How can I accomplish this.

Because the vi you have attached needs a string input (whihc I'm guessing is from the user).

 

Message 3 of 10
(15,318 Views)

this post is 1.5 year old.

your question doesnt seem directly related. also i dont understand what you exactly want to do. is it just to show slides, like a ppt presentation with timing?

if yes, check this thread will show you how to open subvis that will close automatically.

 

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 4 of 10
(15,314 Views)
Imho, if you have a message to the user and have it automatically close without user action, sooner, rather than later, you are going to have to change it because a large percentage of the time, the user will miss the message and your whole test will fail. Do you really expect the user to be doing nothing except watching the screen continuously? You simply cannot assume that the action has taken place before resuming the program.
0 Kudos
Message 5 of 10
(15,309 Views)
I'm aware of what you're saying but I do want the user to see the messages without the buttons. Have to minimize the user interaction. The boss wants it like that. Can't do much
0 Kudos
Message 6 of 10
(15,304 Views)

When confronted by the same sort of idiotic request from management, I arranged a demonstration for my management and the management of the end users. While talking, the pop-up came and went with any action being taken. This resulted in a false failure and the necessity to start the test over from the beginning. Production people really dislike false failures and having to redo something. I was then told to add an OK button to the pop-up.

In any case, to have a timed pop-up is pretty simple with an Elapsed Time function wired to a while loop's conditional terminal. What will help is also setting the background color or something else to blink. If there is a sound card, you could also generate some obnoxious tone.

Message 7 of 10
(15,298 Views)

smm wrote:
I'm aware of what you're saying but I do want the user to see the messages without the buttons. Have to minimize the user interaction. The boss wants it like that. Can't do much

There is no strict need to have a time limit on the OK button. The extra carraige return or line feed character sent by the barcode reader at the end will be the OK button activation. So no extra user interaction but the activation of the barcode scanner itself.

 

Of course I would make the close cross in the right upper corner available to the user so they have a way to cancel that dialog anyhow if they decide for some reason that they need to abort that action.

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 10
(14,035 Views)

Hey Rolf.  You just responded to a message that is over 2 years old.  I think the OP solved his problem by now. Smiley Wink

We all do this now and then....

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 9 of 10
(14,001 Views)
Actually I noticed it's old but come to it from another thread and thought it may be helpful to others to see this rectified.
Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 10
(13,982 Views)