LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending 2D Array string through TCP

Hi all, I'm still new to LabVIEW, is there a kind soul that can explain to me how to send a 2D Array string, in my case is a table through TCP.

Do I need to use any conversion, or flatten.

Thank you in advance

0 Kudos
Message 1 of 6
(2,495 Views)

Flatten to String and Unflatten from String.  Make sure you are prepending the array size with the boolean.

 

0 Kudos
Message 2 of 6
(2,482 Views)

In this, a table is an array of strings, so replace all the orange stuff with the equivalent. The rest stays the same.

0 Kudos
Message 3 of 6
(2,466 Views)

Hi

Thank you for the explanation, but can I know if this can be done through TCP/IP and how?

 

For example, I have 2 different vi files, one client and one server. The server will have the information of the 2D array, while the client will have to read from the server through TCP/IP.

 

May I know is there a way to do it?

 

Best regards,

timothysilverman

0 Kudos
Message 4 of 6
(2,437 Views)

Yes.

 

The TCP/IP stuff would be the part that is effectively in the middle of the example.  TCP/IP sends string data.  So take the left after to go from 2-D array to string in the VI that will send the data.   Take the right half of the example to go into the receiver VI that will take the string it reads from the TCP/IP and recover it back to a 2-D array.

 

 

0 Kudos
Message 5 of 6
(2,386 Views)

It's already shown. Left side is the sender code and the right side is the receiver code. The plain string in the middle is sent over tcp. Look at the examples included with LabVIEW. .(e.g. sent the size first so the receiver knows how many bytes to read).

0 Kudos
Message 6 of 6
(2,385 Views)