LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get user input in the middle of a program that effects the rest of the program

In the middle of a program (using a flat sequence)I want a message to display asking the user to input desired number to be used in the next part of the program (flat sequence).  Idealy I would not want the user to need to press ok for the message, then input then number, and then press ok again.  I am looking to have the message displayed while the user is able to input the data and then press ok once.  The number entered then being processed by the rest of the program.
0 Kudos
Message 1 of 5
(2,776 Views)
That's what the Prompt User for Input function does.
 
You might want to spend a little time learning some of the basics of LabVIEW. Go to http://www.ni.com/academic/lv_training/how_learn_lv.htm and look at some of the free on-line tutorials.
0 Kudos
Message 2 of 5
(2,763 Views)

Why sequences? if your application is flat just pass the values throughout the program using a wire.  If the program is repetitive use a loop and pass the values with a shift register.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 5
(2,761 Views)
Do to the complexity of the program we need to run it with sequences.  This is because we need to aquire data with DAQ until it reaches a certain point and then stop collecting so that it can do its process (only once for all times criteria is met), and then loop around till again collecting after DAQ drops back below certain point looking to once again reach that point.  Another flat sequence is going outside of this where I want to put the prompt and have a user input to affect how many times that that the inner loop is run (No a For Loop instead of the while loop will not work either for other reasons). 
 
I just want to know if after the program starts you can have a user input that will change the effect of the rest of the programs action based on the number inputed.
0 Kudos
Message 4 of 5
(2,757 Views)

There is never a reason that sequences have to be used. It's just a matter of proper coding. A state machine would provide all of the flexibility you need. There are shipping examples and the design patterns (File>New...) that come with LabVIEW also include state machine templates.

In any case, your question about the user input has already been answered.

0 Kudos
Message 5 of 5
(2,748 Views)