NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for tips on navigating the TestStand API.

Solved!
Go to solution

I've been using TestStand for a few months now (self taught with the help of a LV architect with some TS experience) and I'm finding myself wanting to do certain things programmatically at run time and end up staring at the massive chart of properties/methods, etc and wondering which are the properties/methods that will let me do what I have in mind.  Is there something fundamental I'm missing in learning to figure out which path to take to get down to the specific class and property/method I am interested in?

 

For instance, at the moment I'm firing off a couple of extra executions from the process model in addition to the main client execution generated on Test UUTs entry. I'd like to be able to programmatically either from within TS itself or more likely from LabVIEW hide or show these tabs during runtime...I'm assuming this is possible.  I know the executions can be set initially hidden but a 20 minute search of the API didn't immediately reveal the magic objects to let me do this programmatically.

 

0 Kudos
Message 1 of 10
(4,257 Views)

Hi,

 

Start with the first call ie the Engine.NewExecution, then look at the parameters you have to pass, in paraticular the ExecutionTypeMask. You can OR these setting.

 

 

Regards
Ray Farmer
0 Kudos
Message 2 of 10
(4,253 Views)

Hi

 

If am struggeling with the API i take a look on the API reference poster

"xxx\National Instruments\TestStand 2010\Doc\Manuals\TestStandAPIReferencePoster.pdf"

and of course on screen you should use "TestStand 2010\Doc\Help\TSHelp.chm"

here you may really navigate. One of the best .chm i have ever used.

 

 

Hope this helps

 

Juergen

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 3 of 10
(4,250 Views)

There is an API reference manual to help you navigate through all the objects/methods/properties availlable.

 

http://zone.ni.com/devzone/cda/tut/p/id/7022

 

http://zone.ni.com/devzone/cda/tut/p/id/7560

 

 

Rodéric L
Certified LabVIEW Architect
Message 4 of 10
(4,249 Views)

I tend to use the online version of the help found at

 

http://zone.ni.com/reference/en-XX/help/370052J-01/

 

 

Regards
Ray Farmer
Message 5 of 10
(4,240 Views)

So maybe my question is more of a TestStand Application type question.  I've used everything you guys have mentioned for trying to figure out how to make the software do what I want it to do.  However, I think the way TestStand is architected is still a bit muddy for me.  Maybe an explanation of my current problem will highlight what I'm getting at:

 

Up to this point, I've developed all my sequences in the Sequence Editor.  That is my world.  I'm able to get references to most of the core API things (SequenceContext, and Runstate.Engine particularly) and manipulate them either within TestStand or by passing them along to LV and operating on them with property nodes there.  So like I mentioned above, when running sequences from the Sequence Editor, if I launch 2 addition executions from within the model then how can I control them programatically from TestStand?  I see that ApplicationMgr has an Executions property but how can I get ahold of these objects from within TestStand? 

0 Kudos
Message 6 of 10
(4,205 Views)

Hey SmokeMonster,

I want to make sure I understand what you are trying to do, when you say "when running sequences from the Sequence Editor, if I launch 2 addition executions from within the model" what are you referring to? Are you trying to multi-thread? 

BeauH
Applications Engineer
National Instruments
0 Kudos
Message 7 of 10
(4,184 Views)

Yes, trying to multi thread.  We have 6 analog output boards, 4 analog input, 3 digital I/O boards, all (unforutnately) measurement computing.  The client sequence uses a modified Sequential model and this sequence uses those boards for our testing.  In addition to the client sequence we also want to always display various analog input signals of interest in a 'Gauges' window.  Additionally, we want to do some background monitoring of these same inputs in an 'Alarms' process (to shut our ATE down if we need to).  We initially had the Gauges and Alarms process launched as seperate threads from within our model.  This works fine except for when we hit a break point.  This stops all threads and we don't get any input on our Gauges or our Alarms process.  So, I'm now launching these processes as New Executions so that we can break the client execution and not stop the other processes.  This works quite well and I can get the handle to these New Executions and stop them from the client execution if I want.  But what happens to these references if I abort the client execution?  The Gauges and Alarms will continue running and this is fine.  But when I go to restart the client execution, what magic API calls from the Sequence Editor can get me handles to these executions?  I can understand calling this all from LV using the UI control is pretty straightforward as ApplicationMgr.Executions is the collection of executions that would get created from LV side, but how do I access these objects from within the Sequence Editor programatically using TestStand built-in (presumably the ActiveX) step types?

 

A general question...are most people developing their sequences from LV using the Simple or Full Featured as their base?

0 Kudos
Message 8 of 10
(4,177 Views)
Solution
Accepted by CoastalLabVIEWER

Hey Smoke,

 

The TestStand the ApplicationMgr is located within the TestStand UI controls server. To access the Application Manager you first need a ActiveX action step(because this is an ActiveX control) and from RunState.Engine.GetInteralOption(InternalOption_ApplicationManageryou get an Application Manager Object. 


Example:

Select the Module Tab and under Automation Server Select » NI TestStand XXXX UI Controls(Ver X.X)

Object Reference » RunState.Engine.GetInteralOption(InternalOption_ApplicationManager) 

Object Class » ApplicationMgr(IApplicationMgr)

Get Property           Executions

 

 

That will return an Object reference to and Executions Class, so create an Object reference variable(Local,FileGlobal,etc) to use to pull the Application Manager properties out of. 

Also note that to get the individual properties out of your Application Manager object you will ActiveX action steps for the desired property.

 

Hope this Helps.

BeauH
Applications Engineer
National Instruments
Message 9 of 10
(4,146 Views)

Hi Beau,

 

Those were the magic API properties/references I was looking for.  Seems like there would be a little bit of an easier way to get a reference to the ApplicationMgr object when running from the Sequence Editor.  I'm thinking something like This.ApplicationMgr rather than Engine.GetInternalOption.  Without knowing this property exists it's pretty hard even with the very nice built in help to search for this and be able to find this.

0 Kudos
Message 10 of 10
(4,139 Views)