04-04-2017 07:17 AM
Hello everybody !
I am very new to Labview software, and i am having a trouble when trying to use a subVi from a main VI (File attached below). My sub Vi doesn't work, although it runs smoothly when i start its from its own front panel.
I have tried using While Loop, Case Structure, ...and none of them works.
Thank you for reading. Here are the files:
Solved! Go to Solution.
04-04-2017 07:22 AM
Your Main VI pauses when calling the subVI and waits for the subVI to finish. That is what LV is about: Dataflow implementation.
You have an incorrect understanding of LV that you obviously expect LV to run the subVI in parallel to the rest of your Main VI....
You have to look into Producer/Consumer as this enables you to provide what you want to have.
04-04-2017 08:03 AM
you need to create References for all controls in main VI and pass it to sub VI to update values of main VI.
I have modified your VI to update values of main VI control by reference.
04-04-2017 10:46 AM
@Manjunatha.sn2011 wrote:
you need to create References for all controls in main VI and pass it to sub VI to update values of main VI.
This is typically not a good solution and belongs in the Rube Goldberg thread. We should be teaching new LabVIEW users the easy and correct ways.
I would strongly suggest to listen to Norbert instead!
@Manjunatha.sn2011 wrote:
I have modified your VI to update values of main VI control by reference.
If attaching modified VIs, you need to give them new names to avoid confusion. Your main VI will still call the old subVI because the browser will rename your new VI by adding a number to the end of the name to avoid file name conflicts.