LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access to TestStand Station Options Within LV (2016)

Solved!
Go to solution

I'm not sure whether this question belongs with LV or TS, but will give it a try here!

 

In trying to maintain some legacy code I've found a situation where I need to check, within an LV VI, the boolean state of the property set through TestStand menus at [TestStand > Configure > Station Options > Execution > Immediately Go to Cleanup on Sequence Failure?]

 

I've looked through the station globals and such that are accessible within TS, because I think I can get at those with the "TestStand - Get Property Value" VI, but I can't find anything like this there. I also can't find an exhaustive list of properties that are accessible with that VI - maybe the one I'm looking for is in there somewhere.

 

Any advice would be much appreciated, as the code surgery required to get around this problem is a huge pain.

 

Thanks!

0 Kudos
Message 1 of 3
(1,027 Views)
Solution
Accepted by topic author Overthere

You can access the active TestStand instance using the TestStand ActiveX API.

 

To do this in LabVIEW, you first need access to the current sequence context. You can find the ActiveX control for this in the TestStand menu in the Controls palette. Once you have the sequence context, you can access the contained objects using TestStand ActiveX API. The Engine -> StationOptions contained objects might be useful in your scenario.

Message 2 of 3
(1,002 Views)

Brilliant, thank you! That's exactly what I needed. Sorry for the slow reply, was unplugged for the holiday.

 

For anyone in the future who happens to come looking for this, just to expand slightly:

 

- Add a SequenceContext control to the front panel of whatever top-level VI is being invoked directly from TestStand and connect it as an input

- In TestStand, set the value of that property to ThisContext

- In LV, use SequenceContext > Property Node > Engine > Property Node > StationOptions > Property Node > AlwaysGotoCleanupOnFailure to get the boolean value I was looking for.

 

Thanks again tyk007, much appreciated.

0 Kudos
Message 3 of 3
(960 Views)