NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing arrays of clusters into TestStand

In TestStand, I made a custom data type, a container of two strings, then added an initially empty Array of this container as local variables to a sequence (myList: Array[0..empty] of myEntryType). I need to populate this array in LabView.
The "Set Property Value (string)" VI doesn't work, as the array is empty and attempting to give array indices results in a TS Exception, and I haven't been able to use AsPropertyObject and SetValVariant either (SetValVariant raises an Exception: "Specified value does not have the expected type.")
Any Ideas?
0 Kudos
Message 1 of 2
(3,726 Views)
Tony,

You will need to resize your empty array and then write to it. To resize your array you must first get a reference to it by using the VI "TestStand - Get Property Value (Object).vi". You can then use an invoke node to call GetNumElements and SetNumElement to get and set the size of the array. You could also invoke SetDimensions. Now, using the appropriate lookup string, you can set the value of the array element(s).

Attached is an example that demonstrates this. I would recommend cleaning it up by grouping things in subVIs. Let me know if you have questions.
Download All
Message 2 of 2
(3,726 Views)