LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tcp/read

hiii,
      can i set the same PC as server and client in TCP/IP data communication?(for testing purpose)
0 Kudos
Message 1 of 8
(3,575 Views)
Hi sumsum,
yes you can. For more information about it, see the shipped examples.
Mike
0 Kudos
Message 2 of 8
(3,574 Views)
actually i want to write a msg to a port in my PC and am trying to read that msg..so what all blocks are reqiured..for that first i've to establish a connection(tcp open connection),then  tcp write is it right?...and can i read that msg immediately after the write block..and at last close connection,right?..what is the diff b/w tcp listen and create tcp listner?is it needed in my appliction?


pls help me to make it successful,thanx...
Message 3 of 8
(3,565 Views)

Hi sumsum,

write your application as you need it. And to simulate the other side you can write another application which runs on the same pc. Did you look into the "tcp listen.vi"? If you do, you will see that this vi create´s a listener and waits on it. You can use this, or you use both vi´s to create your own listener.
To build a TCP/IP connection you need a listener on one side and a program which connects to it, on the other side.

Mike

Message 4 of 8
(3,557 Views)
actually the msg is written on the port i've mentioned , but i couldn't read the same...here im attaching the file..pls giv me a solution
Download All
0 Kudos
Message 5 of 8
(3,527 Views)
Hi sumsum,
your vi´s are empty. Smiley Very Happy Open the example finder! Search for tcp/ip and open the vi´s "Data Client.vi" and "Data Server.vi", that´s what you need.
Mike
Message 6 of 8
(3,517 Views)
am a beginner with labVIEW...so i designed that blocks in a simple way...ie..i gave the input string as HelloWorld...and i just tried to read it out...since the 'bytes written' o/p of the TCP write block gave 10 , i thought the msg has written...:)...anyway thanx..
0 Kudos
Message 7 of 8
(3,503 Views)
Designed what blocks? As noted, your VIs are empty, so what exactly did you design? Did you look at the examples that ship with LabVIEW?

To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
0 Kudos
Message 8 of 8
(3,473 Views)