01-31-2017 04:04 AM
Hello everyone.
Iam trying to open a Labview SubVi in a while loop but the only thing that happens is that the SubVi pops upp, disapears, pops upp .... and so on...
Which make sense when looking at the while loop...
Now Iam wondering how I can make the SubVi stay.... Would one use a variable for that which contains the status of the window?
Thanks in advance,
best regards,
Michael
01-31-2017 04:38 AM
Hi Mike,
attaching code instead of images has it's advantages! We would know the settings of your subVI, but from an image we have to guess…
You probably set your subVI to "Show FP when run" and "Close afterwards", which makes it flash on/off in each iteration. To overcome this you could:
- run the subVI in parallel and have it stay open for a longer period of time
- open/close the FP programmatically using property nodes/ method nodes
- (un)load it in a subpanel container
- set the VI to "Show FP when loaded"
Choose a method which fits best to your requirements…
01-31-2017 05:20 AM - edited 01-31-2017 05:21 AM
Hello Gerd.
Thanks for your comment and sorry for only posting the picture...
I did not use the "close afterwards" option, but I found that there was no loop in my Sub Vi which explained the flashing.
What I plan to do is to open a graph which is placed on my SubVi by for example checking a checkbox or a using a TF button and send values to it....
Would that be possible with an asynchronously method?
Thanks,
Michael
01-31-2017 06:52 AM
Hi Michael,
What I plan to do is to open a graph which is placed on my SubVi by for example checking a checkbox or a using a TF button and send values to it.
Yes, it's possible!
Simplest solution is to open/close the FP programmatically as mentioned above. Your subVI would always receive new data for the graph.
More advanced would be to use a producer-consumer scheme to separate DAQ from UI/Display. LabVIEW comes with example projects…