NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass Cluster Type Value from TestStand to UI Using TestStand API

Hello,

 

I simply want to pass a cluster from LabVIEW to my TestStand sequence. I tried several approaches, but none was working.

 

In the end, I tried the approach from this forum, flatten LabVIEW cluster to XML string and use Set Sroperty from TestStand API (see labViewTx.png): How can TestStand interprete this XML string? I defined inside TestStand a custom data type of type container with exactly the same structure and naming as the LabVIEW cluster. The checkbox of cluster passing is enabled inside the custom data type. But TestStand cannot receive the XML string and convert it as cluster. I got follwing error message:

"-17308; Specified value does not have the expected type."

 

Is there maybe a better way to pass a cluster to TestStand by doing it with references?

 

Thanks and best regards,

 

Dennis

 

Download All
0 Kudos
Message 11 of 12
(821 Views)

Hi Abb127,

 

Is there a reason why you're passing this cluster using the API rather than just passing it out to TestStand using the VI connector pane? There are shipping examples for TestStand that illustrate this process at: 

 

"C:\Users\Public\Documents\National Instruments\TestStand <version (bitness)>\Examples\TestStand API\Accessing Properties Using API\LabVIEW"

 

The original question was dealing with passing cluster from TestStand to a LabVIEW UI using UI messages. In that case, LabVIEW is handling both the flatten to XML and the unflatten from XML and TestStand is just handling the passing of the string between the two. For your case, you don't need to pass it as a string, you just need to set each element of the container separately:

 

For instance, if your container had a string and a numeric, you would need two calls to Set Property Value (one string and one numeric). The string version would point to "Locals.Tests.GraphFFT.Cluster.string" and the numeric would point to "Locals.Tests.GraphFFT.numeric", the individual data members you want to set. 

 

Regards,
0 Kudos
Message 12 of 12
(798 Views)