LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically call VI containing only a user prompt

Is it an acceptable practice to call a vi dynamically that contains only a user prompt, for the purpose of prompting the user without suspending the main vi? 

 

Thanks,

Greg

v7.1
0 Kudos
Message 1 of 7
(2,427 Views)

You could do that.  Make sure you close the VI and its reference when done.

It's not a common practice, but that does not mean it's not acceptable. 

I can't think of any reasons to oppose the idea.

0 Kudos
Message 2 of 7
(2,415 Views)
There's nothing inherently right or wrong about doing that. What matters more is the problem you're trying to solve by doing that. Could you elaborate on it some?
Jarrod S.
National Instruments
0 Kudos
Message 3 of 7
(2,407 Views)

I have a prettt simple program that monitors an input voltage, and switches a relay (to turn on a pump) and sounds an alarm when the input voltage reaches a threshold level.  The whole time, the readings from the ai and the state of the pump are displayed on a chart.  The pump, once triggered ON, has to manually be turned off.  I would like there to be a prompt that says "Are you sure you want to turn the pump off?" when the user presses "Turn pump off" button, but in the meantime I would like the chart to still be updating in the background.  More generally, there are lots of times when I want to add confirmation input after button presses, and I am trying to prevent them from always suspending the main program.

 

I have a sneaking suspicion, based on the responses so far, that there is still something fundamentally wrong with the way I design my programs.  I am just learning to use queued message handling, state machines, producer/consumer designs.  I realize their potential to tremendously improve my programs, but I need help implementing them.  I am still searching for good text on the basics of these architectures.  Can you suggest any, preferably one that skip over the basics?

 

Thanks!

Greg

v7.1
0 Kudos
Message 4 of 7
(2,401 Views)
your approch for launching the UI dynamically is perfectly fine (as per your application is concerned)
Regards
Guru (CLA)
0 Kudos
Message 5 of 7
(2,392 Views)
There's nothing wrong with using a Dynamic VI.  I'll have to think about your implementation.. Nothing comes to mind at the moment..
0 Kudos
Message 6 of 7
(2,367 Views)
Appreciate it!
v7.1
0 Kudos
Message 7 of 7
(2,340 Views)