LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fixed-size array or string

Dear all,

 

I have been looking for a long time a good way to typecast a u8 array output from a Call Library Function node with a complex cluster structure containing string other arrays and so on. So far, I use the only way it seems possible to do so that it is using a cluster with the same number of u8 variables as the array size I want to represent.

 

This works well when array size is small like 8-10 elements, but thinking on strings with hundreds of characters it can become a nightmare. That is what I would like to know if someone else has come with a better solution. Indeed having the option of defining a typedef control with fixed size arrays will be quite cool.

 

Thank you!

 

0 Kudos
Message 1 of 3
(3,498 Views)

I have to admit, I am not entirely sure what you are asking. Your post is a little hard to read.

 

However, I have been doing string to U8 array back to string in one of my applications for some binary database storage stuff. You don't need to know the size of the U8 array to convert back to string. Am I missing something? 


Corey Rotunno

0 Kudos
Message 2 of 3
(3,458 Views)

Can you provide a snippet showing an example? I've played around a bit with the "Byte Array to String" function but I can't work out what you're currently doing, so it's not clear how to improve it.

 

If it works with your current setup, and the difficulty is creating clusters with so many elements, scripting might be the answer.

If you have the cluster, but want to index the items, Cluster to Array might help (if you can split the elements appropriately).


GCentral
0 Kudos
Message 3 of 3
(3,433 Views)