LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Manual variable control while vi is running

I'm almost sure that this question can be answered very simply, but is there a way to use a device such as a knob or dial to change the vi while it is running? In my program, one portion needs to be changed by hand while the rest runs continuously. Is there a simplier method to complete this task other than stopping and restarting the vi? Any help would be greatly appreciated!

Thanks!
0 Kudos
Message 1 of 6
(3,151 Views)
Hi Danielle,

You can do this is variety of Different ways. Just by putting your Control in a while loop will force the control to be read every time. You can use this value to do a number of tasks.

You Can also have two while Loops in Parallel. Just Make sure you have delay in them to save CPU Overload.

Take a Look at the Attached Example. I hope you get the Idea and can take it from there.

Good Luck!!

Mache
Good Luck!

Mache
0 Kudos
Message 2 of 6
(3,151 Views)
"Danielle" wrote in message
news:5065000000080000006C540000-1027480788000@exchange.ni.com...
> I'm almost sure that this question can be answered very simply, but is
> there a way to use a device such as a knob or dial to change the vi
> while it is running? In my program, one portion needs to be changed by
> hand while the rest runs continuously. Is there a simplier method to
> complete this task other than stopping and restarting the vi? Any help
> would be greatly appreciated!
>
> Thanks!

Why can't you use the control while the vi is running?
0 Kudos
Message 3 of 6
(3,151 Views)
That's what I don't understand. When I manually change the knob, the values change while the vi is running, but it won't effect the output of the program until I stop and restart it.
0 Kudos
Message 4 of 6
(3,151 Views)
Hi Danielle,

The reason most Probably is that the Program is in a while loop and your Knob is outside the while Loop. So when the Program is run the Knob value is taken and Program enters While Loop. Now if you change the Knob this has no effect as Program is Already in the Loop with the Existing Value.

You may want to Move the Knob within the While Loop to Have its effect on the Program.

All this on my part is just guess work. It would be better if you cou8ld post the VI or Picture or Better explain what is on your diagram.

Mache
Good Luck!

Mache
0 Kudos
Message 5 of 6
(3,151 Views)
Perfect! That is exactly what I needed to do! Thank you so much for your patience.
0 Kudos
Message 6 of 6
(3,151 Views)