02-20-2014 12:30 PM
I have been attempting to pass around a cluster of data in TestStand as a string using LabVIEW's 'flattened to string' function. When I create a local variable in TestStand of 'string' data type and attempt to write the flattened cluster to this it simply does not get passed. If I convert the flattened string to a binary array and then pass this around I can recover the cluster of data just fine.
Is there something I am missing here?
I have attached an example Teststand sequence that demonstrates this issue. If you run this sequence the 1st test will fail which is the attempt to simply pass the data structure as a flattened string and the 2nd test will pass as this is the binary array I generated from the flattened string.
Thanks,
Pete
Solved! Go to Solution.
02-20-2014 12:32 PM
attachment included this time...
02-20-2014 01:20 PM
If I had to take a guess, I would say it is because your first byte is a NULL character. If TestStand follows a C paradigm, then a NULL signals the end of a string.
Why not just make a Container in TestStand and pass that around?
02-21-2014
06:43 AM
- last edited on
10-18-2024
05:50 PM
by
Content Cleaner
crossrulz is correct. The Null character is affecting how TestStand is handling the string. You'll have to specify the string to be a binary string in the parameter list for both of the VI's. TestStand then encodes the string so it can prevent data loss.
If you need to operate on the binary string within TestStand you'll have to convert it to a raw data array with PropertyObject.GetValBinary.
02-21-2014 06:51 AM
That was simple enough!
paulmv... thank you for clarifying on crossrulz's response.