ni.com is experiencing intermittent service disruptions.

Support teams are actively working on the resolution.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Probem making a pass throught reference

Solved!
Go to solution

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 understaning what to do. This is my issue I have a loop to which I have created a local variable call STOP ALL and linked it to the stop function,  which completelly 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 thats 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 tryied 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 appreaciated.

 

Thanks for your time,

Steeltiki

 

Main

 

24134i9A538832B371D374

Subvi

 

24136i077F293B5E18C3AA

0 Kudos
Message 1 of 3
(3,443 Views)
Solution
Accepted by Steeltiki

Hello,

 

You cannot use a local variable from your top level application in a subVI. Additionally, it doesn't look as though don't you actually need the local variables you are currently using. The better method for that would be to use shift registers on your loop to store those values. If you want to modify the value of a control from within a subVI, you need to use a property node.

 

-Zach

0 Kudos
Message 2 of 3
(3,416 Views)

Thanks Zach! I was able to use that information elsewhere in my program. I ended up using just the labview stop vi and tied everything to that and it all worked out.

 

Thanks again,

Steeltiki

0 Kudos
Message 3 of 3
(3,350 Views)