LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

send / receive string by tcp/ip

Solved!
Go to solution

I want to send a string by tcp / ip from one pc to another pc.

Attached the used vi's, unfortunatly without succes, can anybody help me?

 

 

Download All
0 Kudos
Message 1 of 6
(6,214 Views)

Hi,

 

Unfortunately, now I don't have access to labview. However, there is a vi in the examples which provided with labview, the name of the vi is TCP send/receive as I remember. From the Help menu select find example, in the search tab, search for TCP, go through the examples and you will find a single vi in one of these examples that can send/receive data through the network.

 

Hope this helps

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

Dear Zaki,

 

I am figuring out one of the examples. (actually two data server.vi and data client.vi)

 

But I totally don't get it:

- data server.vi starts to listen if there is data on the specific port???

- in data server I can't find to which address there is writen, only to a port?

 

 

For my opinion it should be:

- On server : select adress and port

- On server : write some data

- On client : select same adress and port

- On client : list if there is data and when there is listen

 

0 Kudos
Message 3 of 6
(6,206 Views)

Hello!

 

  There are two LabVIEW examples on the distribution disks: "TCP Communicator - Active.vi" and "TCP Communicator - Passive.vi".  It's probably installed in the LabVIEW program directory in the examples folder.

 

  The TCP Communicator - Active.vi is started on the master PC, then the TCP Communicator - Passive.vi is started on the slave PC.  This allows text to be sent back and forth between the two PCs.

 

  Both .vi's can be run on the same PC, just start the "Active" first, then the "Passive" next.

 

  Hope this helps ...

0 Kudos
Message 4 of 6
(6,193 Views)
Solution
Accepted by topic author thls

But I totally don't get it:

- data server.vi starts to listen if there is data on the specific port???

- in data server I can't find to which address there is writen, only to a port?



It works like this:

The server listens e.g. on a specified port for someone (a client) to connect.

As soon as a connection exists, client and server can communicate with each other as long as the connection exists. (Just like in real life.)

0 Kudos
Message 5 of 6
(6,179 Views)

Guenter, thanks that was the explanation I was looking for!

 

 

0 Kudos
Message 6 of 6
(6,172 Views)