NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set a LV Conditional Disable Symbol from TestStand?

I have several VIs which depend on a Conditional Disable Symbol defined in a LV Project.  I'd like to be able to call these VI's from TestStand as well.  Is there a way for me to set the value of the Conditional Disable Symbol in TestStand so that the appropriate sections of code are run in my VI's instead of the just the default cases?
0 Kudos
Message 1 of 8
(3,914 Views)

Hey Taki,

 

Could you provide your project file and one or two of your VIs so we can see what we're dealing with?

David Pratt
Group Manager for Application Engineering Specialists | Automated Test
NIC
0 Kudos
Message 2 of 8
(3,896 Views)

I can't distribute the actual code but this generic stub project and stub vi should illustrate what I'm trying to do.

 

I have multiple StationArchitectures that I'm trying to support.  If I stay entirely within the realm of LabVIEW, I can define my StationArchitecture at compile time and my EXE will include all of the correct routines.  I'd like to be able to use the VI's that I've already built for LabVIEW inside of TestStand.  (i.e. I want TestStand to run the appropriate Conditionally Disabled Code when I have an Action Step which calls the Stub VI.)

 

I hope that clears things up a little.  Let me know if there's anything else I can provide to clarify.

0 Kudos
Message 3 of 8
(3,892 Views)
Hi Andrew,

There is no way to directly set these Conditional Disable Symbol values from TestStand. What might be possible would be to use the ActiveX adapter to call the LabVIEW ActiveX server to open up the project and use the project's API to set this symbol's value.

However, this will still not achieve what you are trying to do. The reason for this is because the symbol exists only within the context of the project, however, when TestStand calls VIs through the LabVIEW adapter, it launches the VIs independent of any project. This means that the symbol will not exist anymore in the context of the VI.

This is very similar to the attached example. I have created a project with a Conditional Disable Symbol called "mySymbol" and set its value to "True" in the project properties. The project contains a VI that has a Conditional Disable structure, and will display a message popup based on the following values of "mySymbol":
True: Display "True"
False: Display "False"
Any other value: Display "Default"

Notice that if you open up the project and run the VI from the project, the VI displays "True". Now close the project (and the VI) and simply re-open up the VI by itself. Running the VI now displays "Default". This is because even though we set the value of "mySymbol", the VI is now executing outside the scope of the project. This is what would happen if we called the VI from TestStand as well.
Jervin Justin
NI TestStand Product Manager
0 Kudos
Message 4 of 8
(3,867 Views)

Thanks Jervin,

 

I kind of had a feeling that my desired behavior was unsupported.  Was hoping that there would be some kind of tricky backdoor though.  I appreciate the response.  I guess I'll just have to rewrite the code in my project to use a Functional Global for StationArchitecture instead of using the Conditional Disable Symbols.

0 Kudos
Message 5 of 8
(3,859 Views)
Why don't you just read a TestStand variable? Presumably, that is where your station architecture would be stored.
0 Kudos
Message 6 of 8
(3,856 Views)

Readback from a TestStand StationGlobal would also work.  I have a slight preference for letting LabVIEW handle the variable.

 

There are some modules in my application which I don't want to tie to TestStand (i.e. some device drivers which should be able to run in a standalone debug mode or in an automated mode with TestStand.).  For maximum reusability of these modules, I think a LV Functional Global which TestStand can Set or Get gives me more flexibility than a TestStand StationGlobal which would require all modules to instantiate TestStand regardless of whether they needed TestStand functionality or not.

 

I'm also fairly new to TestStand so LV is just a little more comfortable for me at the moment 🙂

 

Thanks for the suggestion though.  It's something that I didn't really think about until after I saw your post.  It definitely gave me more to think about.

 

0 Kudos
Message 7 of 8
(3,850 Views)
True, and pass that in to your VI as a parameter...You could use a straight up case structure in LabVIEW to pick what to do instead of the conditional disable structure.
Jervin Justin
NI TestStand Product Manager
0 Kudos
Message 8 of 8
(3,849 Views)