05-20-2021 10:27 PM
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
05-20-2021 11:00 PM - edited 05-20-2021 11:00 PM
Flatten to String and Unflatten from String. Make sure you are prepending the array size with the boolean.
05-20-2021 11:04 PM
In this, a table is an array of strings, so replace all the orange stuff with the equivalent. The rest stays the same.
05-21-2021 12:17 AM
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
05-21-2021 07:54 AM
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.
05-21-2021 07:56 AM
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).