From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Where is Step information, properties...?

Solved!
Go to solution

I am writing an app that generates TestStand starter workspaces.  They will be a head start for our test developers and shall include initialization of instruments, helper sequences, etc.  My biggest problem is determining/setting the properties, settings, etc. for each step type.  This topic helped, but wasn't the whole answer.

 

The topic provided the location and names of the settings for the "If" step. I thought I had finally found where Step settings were stored (sub properties), but I was wrong.  Other steps seems to store their settings elsewhere.  For instance, the GoTo step stores its settings in CustomTrueActionTargetByExpr.  Is there any documentation that describes where each step type's settings are stored?  At the moment I have to find these settings by searching for forum topics or reverse-engineering.

 

 

0 Kudos
Message 1 of 4
(3,100 Views)
Solution
Accepted by topic author TucsonDave

If your goal is to simply generate a template for them to start from then why wouldn't you just create it all and then in your app make a copy of it and rename only the parts that need to be renamed....as opposed to generating it all from scratch?  I think this way you could edit the original template a lot easier (using the sequence editor).

 

That being said you need to realize that step types are just glorified data types.  What sets step types apart from each other are their subproperties...that's it.  So if you look in the type definition for a step type you should be able to see all of the settings/sub properties by simply finding the step type definition and expanding it.  All of the dialogs and guis for editing steps are simply changing values in the subproperties.

 

There is a special subproperty for every step called TS.  Not sure what it stands for but it is usually hidden.  You can show it by going to Configure>>Station Options>>Preferences and checking the Show Hidden Proprties box.  The engine uses the data in here to determine how to handle the step.  The GoTo step is simply an action step with a "none" adapter.  What makes it unique is that the edit substep allows you to change some of the TS properties which impact the post action of the step.  The reason you are seeing a method in the API called CustomTrueActionTargetByExpr (which by the way is used for every step type) is because there are several TS variables that need to change and NI made it convenient by wrapping all of that in a single method.  You could accomplish the same thing by setting the variables in the TS property if you knew which ones to set.

 

Also every step type has something called common custom properties.  These are the things in the Result (error info, status, reporttext and common).  Look up  Common Result Properties in the help.

 

Lastly, all of the NI native step types have a blurb about them in the TestStand help.  This is how I learned about what the different step types were for.  So for example if you go to the TestStand help and on the index tab type "Numeric Limit Test step type" you will see the help on that step type.  It goes over the sub properties that are additional to the TS and common properties and what the additional sub properties mean.  This is true for all of the NI native step types. 

 

Setting subproperties through the API is where it gets tricky.  In the case of CustomTrueActionTargetByExpr it makes life easy.  But there isn't an API call for setting the Step.NumericArray for a Multi Numeric Limit step type.  So you would need to use the SetValXXX and GetValXXX methods for the property object.  It takes a bit getting used to them but after it comes then it is easy.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 4
(3,063 Views)

Thanks for the quick and thorough reply.

 

In regards to my templates, they are not fixed, but very dynamic.  For instance, the suite of instruments may vary from one to another.  I also plan on allowing the user to choose certain canned tests/sequences to include in their template.  There are many other options on the list. 

 

I shall look into your discussion about properties, etc. a bit more.  I may get back to you with more questions.

0 Kudos
Message 3 of 4
(3,032 Views)

Btw, the differ is an easy way to see what is actually changed when you edit a setting in a file.

Message 4 of 4
(2,975 Views)