LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

passing data from vi's inside a main vi to main front panel during execution

Hi

I'm having a problem that is quite common I guess but I don't seem to find the right solution. In the vi I included I want to send data from VI's inside to my main front panel during the execution. Now, only the last measured value is passed to the main front panel. It should get obvious when you look at the program.
I first tried it with local variables but that didn't seem to work, then I did some research on global variables but I can't seem to figure it out.
Thanks in advance

Filip
0 Kudos
Message 1 of 3
(2,204 Views)
You've got several problems, the most significant is that you din't include your subVIs. You should do a Save With Options and select development distribution. This will create an llb (LabVIEW library) that will include your main and all subVIs. The local variables do nothing because they are "local" to the VI in which they exist. "Global" variables share their values between VIs and are one way to accomplish what you want to do. I would recomend using a "functinal" global instead of the normal global. You can lookup functional globals in the on-line help for more information. You could also use a control reference to update an main VI indicator from a subVI. There is information in the on-line help on control references as well as shipping examples. You can also do a search of this forum for functional globals and control references to find other examples. Post your llb and someone is liable to modify your code to show you exactly what needs to be done. Lastly, if your subVIs included error in/error out connections. you could enforce execution flow without using a sequence structure.
0 Kudos
Message 2 of 3
(2,193 Views)
I see... Harder than I thought. But ok, thanks a lot, I will look up the information you're talking about and see what I can do. So much to learn and still so little I know Smiley Happy
0 Kudos
Message 3 of 3
(2,188 Views)