LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I send data array and then retrieve it in a server-cliente TCP connection?

Hi!
I need to send data in a TCP client-server connection, like the way it does in the simple examples on NI's web page. I  don't understand the way it converts types , and i don't know how can I send an array of numeric values and then retrieve them in the client.
Thanks!
0 Kudos
Message 1 of 3
(2,499 Views)
Hi,

I just found a really good and easy example for that in the LabVIEW Example Finder.
Just open it (Help>Find Examples) and search for TCP. When you then select TCP there will show up some VI's. Open the "Data Server.vi" and the "Data Client .vi".
First start the Server VI and then the Client and you will see that it works. It works also if you open the Server VI on a diffrent PC if it is in the same network. You just have to adjust the IP-Adresse in the Client VI.

You can use nearly any datatype. Important is that you convert it before you sent them into a string (with Typecast f.e.). And when reading the data you have to convert it back into the type it was before.
This example is really good and I hope it answers your questions.

Greetins, RMathews
Ramona Lombardo
Applications Engineer, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 2 of 3
(2,471 Views)
Hi!
Your answer and the examples are being very usefull.
Thanks!
0 Kudos
Message 3 of 3
(2,467 Views)