NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating TS container from labview

Hi,
I have a labview cluster which I defined as a container in test stand. I want to update this container from labview using the set property function.I also want to create the item if not present. I see this polymorphic VI doesnt have option to choose clusters.
 
I tried to use the methods and properties of TS in labview. There I chose the option for variant. But here I cannot enable the option to create the variable if not found.
 
How can I update a container in teststand from labview? How can I create it if not present at runtime?
 
The attahed vi is based on the second method, where I cannot create variable in runtime?
0 Kudos
Message 1 of 3
(3,359 Views)
Hey Gops,

Unfortunately there is a not a single method you can use to directly create a container in TestStand from a LabVIEW cluster.  What you will have to do is create the container and set each subproperty individually.  I would recommend first making a custom data type for your cluster so you don't have to create each subproperty programmatically as well.  I have attached a small example that will programmatically create a copy of Locals.Original_Cluster at Locals.NewCluster.  In the example I use the Engine to create a new property object that is of the type "myCluster" (custom data type I created for the cluster).  Then I set each subelement using setvalstring, setvalboolean, and setvalnumeric.

I know you had mentioned that you needed to do this programmatically, but if it is possible, it would be much easier if you were to just pass this as a parameter of your VI.  This way TestStand will do everything for you. Hope this helps!
Pat P.
Software Engineer
National Instruments
Download All
0 Kudos
Message 2 of 3
(3,340 Views)

Thanks for the example, but the 'NewCluster' doesn't pop up after the VI execution.

 

David Koch

0 Kudos
Message 3 of 3
(2,769 Views)