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: 

Enabling TestStand to access defined variables in header files

for instance when using the CMU200, there are lots of defined variables in rscmu200.h e.g. RSCMU_SINGLE_SHOT, however when using TestStand and specifying module variables TestStand does not pick up on these variables.
Is there an easy way of adding these variables to the TestStand project such that they are recognised by TestStand? And therefore automatically picked up when you type them in?
0 Kudos
Message 1 of 5
(3,120 Views)

Hi Nigel,

I should ask which version of TestStand are you using?

I use TS3.1 which has a "Property Loader".  You can select a text file with any extention (*.h).

I'm not sure what you mean by "And therefore automatically picked up when you type them in?"

JLV

Message 2 of 5
(3,098 Views)

Hi JLV,

I guess the Property Loader could be used. I will look into that (I'm using TestStand 3.5 btw), thank you for the suggestion.

In terms of "automatically picked up":

I make a dll in CVI, the project for which containers a header file with various #defines, eg.  #define STATUS_X 23

When I specify the module for a LabWindowsCVI step what I would like to be able to do is just type STATUS_X in the Value Expression box, and that via the dll TestStand would pick up/recognise the definition.

So I guess the next best solution is to use the Property Loader up pick up the #defines.

thanks

 

Nigel

 

 

 

 

0 Kudos
Message 3 of 5
(3,091 Views)

Nigel,

I do not think the property loader is the solution you are looking for.
The Property Loader source file must have a specific format in order to be read properly by the utility.
Basically you want to be able to use a #define as an input parameter for the CVI method you are calling in TestStand.
Unfortunately that is not possible.
The closest solution wold be te following:

 1. Create an enumeration containing all the possible values for an specific parameter. (Translate the #defines into an enumeration)
 2. The desired parameter type should be the new enumeration.
 3. Create a type library.

Next time you try to specify the module in TestStand you would get a list with all the values in the enumeration.
You can select the desired value from that list.

Hope it helps.

If you have any question let me know.

Antonio Lie.


 

Message 4 of 5
(3,088 Views)
Hi Antonio Lie,
 
ok, thanks for the suggestion. Unsure that I will implement as it would take quite a bit of time to do, i.e. adjusting the CVI function enumeration types, etc in the existing files, over 100 hundred functions, all with different variables. Will just look up the #define manually for the moment.
 
cheers
 
Nigel
0 Kudos
Message 5 of 5
(3,077 Views)