09-17-2010 08:57 AM
Hello,
I'm having trouble making a pass through reference. I have read the Ni write ups for both a pass through reference and a global variable but I'm still not quite understanding what to do. This is my issue I have a loop to which I have created a local variable called STOP ALL and linked it to the stop function for the loop, which completely stops everything in the program. I have included a pic of it below. So I went ahead and created a sub vi to which I want in the sub vi after its gone through the cases to signal the same ALL STOP command. The second pic below shows this, case 0 the Visa stops the motor control but the test is still running and that’s where I want the ALL STOP to be placed or it can be placed in a case after it doesn't matter to me, whatever is easier. I tried to reference it, use signal triggers but nothing seem to work. It seem like it should be pretty straight forward, so I must be missing something. Any help you can give me would be much appreciated.
Thanks for your time,
Steeltiki
Main
Solved! Go to Solution.
09-17-2010 10:08 AM
Well this is one of those times you should listen to the advice of the forum users. At the risk of starting a flame war- Don't use globals or locals. Read Bens nugget on AE's.
Now I strongly suspect the mechanical action you have on your Stop All control is set to "Latch"- a Lactching boolean has four states. True, False, False transition and True transition. When the boolean is set true it stays true only until it is first read then it becomes false again. That is why you can only stop 1 loop at a time with a latching boolean.