02-08-2010 07:20 PM
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
02-08-2010 08:18 PM
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.
02-08-2010 08:56 PM
02-08-2010 09:53 PM
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
02-09-2010 12:48 AM
02-09-2010 07:32 AM
02-10-2010 09:01 PM