LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scan arrays from binary string

I have TCP connection that is sending a great number of fixed size arrays that I need to convert. Is there a simpler way to do that than the one I have attached?

 

0 Kudos
Message 1 of 4
(2,813 Views)

Okay, I found another way which is a bit simpler. At least I don't have to calculate the number of bytes. Please let me know if there is a simpler way.

 

0 Kudos
Message 2 of 4
(2,806 Views)

Hello Teraj,

 

Have a look with attached example. I think this should enough for you.

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 3 of 4
(2,794 Views)

Sorry, I didn't write my question clear enough.

I know how to do TCP data transfer. I also know how to unflatten the binary string back to data, but I was hoping there was a clearer way to do it than the way I suggested. For scalar values one can make a cluster containing the data in the binary string and only one "unflatten from string" is needed.

However, if the binary string is composed of arrays (even though they are fixed in size) I need one unflatten string for each array. In my case I have many small arrays. The attached example with only three arrays was only to illustrate what I wanted to do.

I have now found a way using a cluster of clusters. I don't know if this is the ideal way of doing this, but it works, and when enabling "view cluster as icon" I can make the code much more compact and easier to read

0 Kudos
Message 4 of 4
(2,788 Views)