04-03-2014 02:07 PM
Hello
I am in need to update a control inside a sub VI that is also called inside a container in the main VI.
Please see the project attached.
My goal is simple -
How do I accomplish this ? just a FYI - the sub VI being called is at "C:\Projects\User Examples\Check Time with FGV\Check Time FGV.vi"
Also my stop button functionality is broken, not sure why.
Thanks for your help.
04-03-2014 02:13 PM
You didn't supply any code. The project file is just a software organizer of code. It doesn't contain any of the actual code. Zip up your project and post that.
I would recommend using a queue to send messages into your subVI. Your subVI can then read the queue and update whatever it needs to.
04-03-2014 02:16 PM
Oops
here we go again.
04-03-2014 02:28 PM
This time with path depedencies removed...
04-03-2014 03:58 PM
OK you have a few problems. Lets address the Stop button first:
Add a value change event for the stop button and put the stop button in that case. Wire the button out of the event structure to the conditional terminal of the while loop. WHAT IS HAPPENING: You press "Stop" but the event structure is still waiting for an event so the loop never iterates. Get rid of the wait. the CPU will not be hogged unless you are generating events at warp speed. No user can generate events that fast! so the loop will not be greedy. The event structure does wait for an event it does not poll for them by running contineously.
Now your subpanel. You do know that the FGV runs once when you invoke the run method on it right? You can change the contol value all you want but the vi won't do anything about it because the vi is not running. And even if the vi WAS running changing the value of a control that is read once (outside the loop) would not cause the value on the wire inside the loop to change at all. Does that clear up some of why what you are attempting will not work like that?