NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing LabVIEW Cluster in TestStand PropertyObject (Attribute)

I am attempting to store a large LabVIEW cluster within a TestStand attribute of a Seuqence Property object using the TestStand API.

 

My first attempt was to Flatten the Cluster to string along with SetValString and GetValString to write to a PropertyObject.  It appears that TestStand does not store non-printable characters in strings so this method did not work when unflattening.

 

The second attempt was to write the cluster directly to SetValVariant and GetValVariant, but it appears that I cannot use the PropOpt_InserIfMissing and this type is used for arrays.

 

The third attempt was to write the cluster using the SetValBinary and GetValBinary, however the output of the GetValBinary is not the same as the input.

 

 

I have attached some snippets for reference.  Please advise on how to read and write a generic LabVIEW cluster to a TestStand PropertyObject via the API.

 

Thanks

CLA, CTA
0 Kudos
Message 1 of 6
(3,805 Views)

Hi,

 

What version of TestStand are you using?

 

If it's version 4.x, why dont you pass the cluster back via the VI connector pane.

 

 

Regards
Ray Farmer
Message 2 of 6
(3,791 Views)

Ray,

 

Using TestStand 4.2.1

 

I am creating a sequence file using the TestStand API so I cannot pass the cluster through a LabVIEW module call.  I am using the attribute to write a hash table related to UI display when the Sequence is loaded.

 

Thanks

CLA, CTA
0 Kudos
Message 3 of 6
(3,776 Views)

After looking into the data structure of the returned Variant, I was able to convert the cluster to the original format.  See the attached block diagram.

 

However, the GetValBinary does not return the same data written to the SetValBinary.  It seems like this is a bug in the GetValBinary method.  The GetValBinary function returns an array of bytes with a zero padded lower nibble:

18949iBDB5F3472298B7DC

 

 

  • Is there a simpler way of storing arbitrary data within TestStand?
  • Is this a bug or expected behavior?
CLA, CTA
0 Kudos
Message 4 of 6
(3,755 Views)

I have the same problem. Is it possible to store a cluster as a whole in matching TestStand container using TestStand API? I only see how to store a cluster element by element.

0 Kudos
Message 5 of 6
(3,382 Views)

Hi Sergey,

 

You are indeed limited to passing the cluster element by element when using the API.  See this post for some more information.

Justin D
Applications Engineer
National Instruments
http://www.ni.com/support/
0 Kudos
Message 6 of 6
(3,358 Views)