LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I'm using UDP Send to send an 1D arry with 3 elements. On the other side I'm using UDP Read to read my 1D arry with 3 elements but they are coming in a string for somereason.

Using UDP send to send a data across a connection to UDP read data by using a Port and IP. The data I'm sending is 1D array with 3-elements. I'm taking the 1D array on UDP send side and converting to a string before I send out b/c UDP can not read an array. So I'm using "Array to Spreadsheet String" to and sending it.
On the Other Side I'm using UDP Read to read the data by listing to a port and capturing the data. I'm receving the data but they are in string format instead of 3 spreate elements. So how can I change that to 3 elements instead of string?

Any help would be grea
tful,
Thanks
Download All
0 Kudos
Message 1 of 5
(2,977 Views)
Cant you use the spreadsheet string to array to get it back to your array ???

Dan
0 Kudos
Message 2 of 5
(2,977 Views)
Dan,

So what do I use to get back what I put in with same order?

Thanks
0 Kudos
Message 3 of 5
(2,977 Views)
It is usually easiest to take any data and flatten it to string before sending.
On the receiving side, use unflatten from string, using the original data type as template.

You can do this with any kind of data (array of strings, array of numbers, booleans, complicated clusters, etc, etc), see attached code image.

Flatten and unflatten is very efficient and does not change the data. For example there is no rounding or formatting loss.
Message 4 of 5
(2,977 Views)
Very good.

Thanks for your help & time.

"New Bi" to Lab View still and lot more to learn...:)
0 Kudos
Message 5 of 5
(2,977 Views)