05-16-2013 10:34 AM - edited 05-16-2013 10:35 AM
Just a quick check
I have a subVI. In it I have numeric indicators with a value 2, in a while loop.
My main VI calls the sub VI 's numeric indicator. Will my main VI indicator shows 2 or 0?
Assuming it shows 2, then it must be something wrong with my sbrio.
If it is 0, how can I make it to show 2 instead?
05-16-2013 10:36 AM
How are you passing the data from the sub VI to the main VI? Are you using the Invoke methode and the Reference?
05-16-2013 10:38 AM
You are going to have to show some code. I don't understand what your situation is.
05-16-2013 10:50 AM
First picture is my main VI, second picture is the sub VI. Right now, "ALL OTHERS" in Main VI is showing 0 instead of different values.
05-16-2013 10:58 AM
Your subVI has to complete before your while loop can actually loop. In fact, your subVI has to complete before you get any data out. Furthermore, your subVI will never exit unless you have Stop set to true BEFORE the subVI is called.
I think what you really want is to turn that subVI into an Action Engine. Remove the wait inside of the subVI. Have the loop only iterate once (wire a TRUE constant to the stop terminal, get rid of the Stop input). Remove the 0 constant from the shift register initializing.
05-16-2013 11:13 AM - edited 05-16-2013 11:14 AM
Ive uploaded the subVI for your better understanding of my purpose.
Actually the case structure has 4 cases, different values each case. It will loop back to the1st case after the 4th case. Before going to each case, there will be a delay.
05-16-2013 01:51 PM
That's just the subVI. What about the main?
Again, this subVI will never exit and you will therefore never get your values out. The reason this subVI will not exit is because you are wiring the stop value in. It is simple data flow, you pass a FALSE into the subVI and the value will always be FALSE. It doesn't matter if you change the value of the stop button of the main VI because the FALSE has already been passed to the subVI.
05-16-2013 04:32 PM
You need to use a reference to the indicator in your main that you want updated by the subvi. A reference points to the memory location of the main variable. In the subvi, you write to the reference and the main gets updated immediately without waiting for the subvi to finish.
Study the two attached VIs.
05-16-2013 04:33 PM
For some reason my VIs did not get attached. I'll try again
05-16-2013 04:41 PM - edited 05-16-2013 04:42 PM
One more time, using Google Chrome instead of Internet Exploder (typical Microsuck piece of crap)
YEAH! It worked. Can someone tell me why IE doesn't work with this site anymore? The site even looks different with Google Chrome.