NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Add elements of variable containers with Teststand API

Solved!
Go to solution

hello everyone

I use TestStand to call veristad for data acquisition, and use LabVIEW to call TestStand API function to generate test sequence. In the circle drawing step, I click the plus sign variable container to automatically add a group of variables.like VariableName,VariableUnit......;I want to know how to add elements of variable containers with TestStand API functions.

If you have any way for me how to do this, i will be grateful to you.

 

Best regards,2.png3.png

0 Kudos
Message 1 of 3
(1,668 Views)
Solution
Accepted by topic author OTGZzz

Basically you want to use the property object methods.  Depending on the variable type it will be different.

 

For example:

 

Step.SetValString("MyVariable", 0x1, "Foo")

 

Will create a variable called MyVariable for your step (if it doesn't exist) and set the value to Foo.  It will be a string variable.

 

You can read more about the SetValXXX  methods for the property object here: https://zone.ni.com/reference/en-XX/help/370052AA-01/tsapiref/reftopics/propertyobject/

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 3
(1,587 Views)

Thank you. That's what I want

0 Kudos
Message 3 of 3
(1,573 Views)