LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to create TCP Connection

Hi all,

 

I have two computers on the same work network and I'm trying to make them talk to each other through TCP. I tested the two VI's below on my computer using my PC's IP adress and port 2066 (arbitrary) and they could communicate just fine. When I put the listener VI on a different computer, though, it doesn't ever make a connection. It's always waiting at the TCP Listener subVI. I made sure that the ports matched up and I was using the correct IP address, but no dice.

 

I'm pretty sure that I can make a TCP connection between these computers because I can ping the other computer when I run ipconfig in the command line.

I also checked the firewall settings on both computers and they allow all ports for incoming and outgoing TCP connections for LabVIEW.

 

 

At this point I've exhausted my knowledge of the subject. Any ideas why I can't make a connection?

 

 

 

TCP Listener:

 

TCP Read.png

 

 

TCP Client:

TCP Write.png

 

 

0 Kudos
Message 1 of 4
(3,162 Views)

I don't see where you have the Listener PC's IP address wired into the Address input of the Open connection function.

0 Kudos
Message 2 of 4
(3,156 Views)

Woops, must've missed that control when I grabbed the rest. It was there originally.

 

TCP Write.png

0 Kudos
Message 3 of 4
(3,148 Views)

If it works when you run both VIs on the same computer but not when you're running it on two different computers then I suspect that it's still a firewall/connection issue.

 

Pings are a lower level protocol (ICMP) than TCP so it's quite common to be able to ping a computer but the firewall can block the TCP requests. It's a good thing to do though because it tests that you do actually have a connection between the PCs.

 

I would try using a port checker tool to verify if you can establish the connection and/or speak to your IT department to see if they have any other firewalls/configuration issues that might be blocking the communications.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 4
(3,077 Views)