07-13-2010 04:08 PM
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
07-14-2010 12:44 AM
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.
07-14-2010 07:22 AM
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
07-14-2010 12:49 PM
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:
06-12-2012 10:58 AM
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.
06-13-2012 11:57 AM
Hi Sergey,
You are indeed limited to passing the cluster element by element when using the API. See this post for some more information.