LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP server code to read out positional data

Hi, I am quite new to labview and am struggling at the moment with the TCP program I need to write. Hopefully someone here can help me out!

 

First, I need to write a program for the server, which is a robotic arm that needs to send positional data (time with its x,y,z coordinates and the rotations about those axes) to the client, which is a computer. I have a listener waiting for the connection, when there is a connection with the client, the positional data should be read out by the server and afterwards it should be written towards the client. However, I have no clue how the positional data can be correctly read out by the TCP functions. I have connected the TCP read to the TCP listener through 'connection ID' and 'error', but have no idea how I should correctly connect this to the positional data measurements. 

 

Thanks,

Guusje

0 Kudos
Message 1 of 3
(2,828 Views)

first goto are the included examples in labview "Help -> Find Examples".

search for TCP and find "Simple TCP.lvproj"

 

i think that will help you

 

regards


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 2 of 3
(2,751 Views)

Here are a few examples National Instruments has on their website, the first one sends files instead of coordinates, but you may be able to gleam how they are doing it and input data there instead of files. Additionally, attached is link to an example that just sends a String Array, you can figure out how to implement the coordinates you want from here as well.

 

Sending files through TCP/IP with LabVIEW: (The files are attached to the right of the page under "Downloads")
https://forums.ni.com/t5/Example-Code/Sending-files-through-TCP-IP-with-LabVIEW/ta-p/3996223

 

Send a String Array using TCP:

https://forums.ni.com/t5/Archive-TKB/Send-a-String-Array-using-TCP/ta-p/3503760

0 Kudos
Message 3 of 3
(2,734 Views)