03-03-2008 08:05 AM
03-03-2008 09:04 AM - edited 03-03-2008 09:11 AM
03-03-2008 09:30 AM
Hi JeffOverton,
Thank you for your reply.
Unfortunately - I do not understand very well what you mean. I am very new to this part of LabView, could you please send me more explanation, or refer me to some existing example?
Adrian
03-03-2008 09:51 AM - edited 03-03-2008 09:53 AM
When you insert a VI reference into a subpanel, it displays the front panel of the VI whether it's running or not. So one option would be to insert the VI in the subpanel, have the user enter the control values while the subvi is not running, and then drop the actual vi into the block diagram to run it.
Another, and better, option would be to put all your indicator values into an
03-03-2008 09:59 AM
I have to second Jeff's suggestion to turn your sb-VI into an action engine.
One action could be "Set-up" where you show the FP of the sub-VI and allow the user to interact with same. When this action terminates it should first save the users setting in shift registers so they can be used on latter calls.
Another action would be "Grab-data" that again invokes the Action Engine but uses the previously specified settings and returns the acquired data to the caller.
Ben
03-03-2008 10:14 AM
03-03-2008 12:11 PM
Thanks guys for your suggestions.
Finally I managed to get it working in the following way:
1)I create a VI reference and use "Insert VI"
2)then I have a loop which waits for a button to be pressed; before pressing the button I can change the FP of my data acquisition subVI; once the button is pressed the subVI is running
3)after having run the subVI, I read a global variable which is written by subVI
So I have more or less what I wanted, though the solution with the global variable written by the subVI is not that elegant. I will try to look into your suggestions.
I have also trid to use the "Find control by name" VI in LV8 to obtain a reference which afterwards can be used to read the value of the indicator that I am interested in. But then I obtain a "Value", I can see that it makes sense when I wire an indicator to it, but it seems impossible to convert to something useful (in my case an array of DBL).