LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP

I'm trying to use TCP/IP functions to communicate b/w two PC by using "TCP Open Connection" on one end and "TCP Listen" on the other end. Sounds so simple but I'm missing some pts here. When open "TCP Listen" and trying to configure the "Pins" and that's where I am missing some pts. For �Net address� I select the "Constant" box, so I can put in the IP address of the PC that I'm using? Is this correct? 2nd the �Port� is the origin PC�s port? THX..
0 Kudos
Message 1 of 22
(4,976 Views)
i do this between several machines here in my department... on the TCP Listen.vi i only wire the port (i use 30000) and a timeout (50ms) and leave the net address unwired. if you have more than 1 NIC you will probably have to wire something to it. then on the other pc with the TCP Open Connection i wire the address of the "server machine" (listener), the port (30000) and the timeout (5000 in this case)...

if you need an example i can wire something up for you

good luck

Dan
Message 2 of 22
(4,974 Views)
Have a look at the examples included with LAbVIEW. Look in "Networking... TCP&UDP". There is a "Simple Data Client.vi" and a "Simple data server.vi".

For TCP listen, you only need to wire the net address if you have more than one network adapter. Otherwise, leave it unwired. The port is the local port where you want to accept connections.
0 Kudos
Message 3 of 22
(4,769 Views)
Thanks Dan for the response. As for the example, I have "TCP Listen" side, I have "Port" assign to 3000 with 50ms time dealy with "Indicator"? Is this correct? Would it be easier if can send you the "LabView" file for "Listen" and "Open" and make the corrections from there?
Thanks,
0 Kudos
Message 4 of 22
(4,974 Views)
you can send it if you want and i'll take a quick look... or look at the examples

Dan
0 Kudos
Message 5 of 22
(4,974 Views)
Thanks
Download All
0 Kudos
Message 6 of 22
(4,974 Views)
what kind of error do you get ??? it works here
0 Kudos
Message 7 of 22
(4,974 Views)
Try to take a look at this.

THX...
0 Kudos
Message 8 of 22
(4,973 Views)
it works here.... did you enter a value for the timeout ??
0 Kudos
Message 9 of 22
(4,973 Views)
5000 on "Open side" and 5000 on "Listen side" as well.
0 Kudos
Message 10 of 22
(4,973 Views)