03-06-2014 11:38 PM - edited 03-06-2014 11:54 PM
As my VI, I wanna creat a specific waveform for testing. But when the first loop ran out, the looping is stop.
How can I make it continuously operate? It is urgent, Thanks for your help!
and one more question is how can I combine this signal VI to my main VI ?
the signal output connect to the Select Signal 3. But seems it can not communicate between two while loop for passing the data.
03-07-2014 02:26 AM - edited 03-07-2014 02:44 AM
Hi rednight,
the MainVI stops when you press the Stop2 button. Don't press that button to make it iterate more often…
Your subVI is very convoluted and will get a honorable mention in the RubeGoldberg thread. Maybe even in the "Why locals are bad" thread too…
- Don't abuse local variables: use wires instead! Please clean up your "signal" VI in that fashion.
- Afterwards rethink your logic. Why do you do the same operation 9 times in your VI? Why not use a loop instead?
- To integrate that VI as subVI in your MainVI you should remove it's while loop - or atleast make it run just once per call. Having a separate stop button in a subVI is (most-often) a NO-GO!
Btw. are you in the same team as Adithya working on a very related topic?
03-07-2014 05:38 AM
Hi GerdW,
Thanks for your reply.....
-As I am newbi in Labview, would you tell me why local variable is bad? ( But I will modify it )
-Cause I design a signal which is for the 3Phase PWM inverter testing and is combined by 9 different frequencies sinewave.
So you recommend me use loop to instead my convoluted logic?
- If I would like to use my main VI to select the sub VI to run continuously until I press stop button is it work?
-No SIr, It is my individual work
Have a nice friday.
Jason Li
03-07-2014 05:43 AM
Hi Jason,
when you're a newbie (which isn't bad at all) you should go through all those free online courses offered by NI on their website.
- When you want to know why locals are considered "bad" you should read the thread I linked to.
- I recommend to use loops instead of working with each array element on it's own and I even more recommend to to the math directly on that array instead of splitting it into elements…