11-02-2011 05:37 AM
Hi,
I am a 4th year undergraduate new to Labview. I am task to create a joystick control VI for or UAV. Now, the main part of the VI is done. But when I try to use it as a subVI, I cannot read any data. On the blank page of the VI, I just create indicators and control and connect them to the subVI.
Can anyone enlighten me as to what went wrong?
Thanks.
Ting Yu
Solved! Go to Solution.
11-02-2011 05:43 AM
Hi,
Can you repost your VI in LV 2010 version.
Regards,
Bijay
11-02-2011 05:57 AM - edited 11-02-2011 05:58 AM
Hi Ting Yu,
Welcome to the NI Forums.
If the attached VI is what you are trying to convert into a SubVI, the reason that it loses its functionality is due to the While Loop; you have to imagine that when While Loops are implemented, due to dataflow they are essentially oblivious to data operations around them. For example, your output indicator values such as Front/Back(Y) will only be passed out of the While Loop once it has finished (With respect to your Main VI/Top Level VI).
To make your code function appropriately, only convert the inner code of the While Loop to a SubVI, then use the Top Level VI to control its execution. I.e. You must separate the execution control and the signal manipulation in order for your code to respond normally.
11-02-2011 05:59 AM
Hi Bijay
Thanks for helping. I hope this is correct.
Sincerely,
Ting
11-02-2011 06:05 AM
Hi TingYu,
That's Correct.
Thanks Alex .T
Regards,
Bijay
11-02-2011 06:26 AM
thanks., of course thats the problem.