TCPsocket connection

I’m trying to communicate with a CDC 5300 data acquisition controller via TCPsocket. When I try to connect w/o specifying a port, the connection appears to be made (IsConnected is true), but I immediately get an error 102 (lost connection). If I specify the CDC recommended port, the connection fails with error 103 (couldn’t find IP address). Am I being misled in the first case by IsConnected being true, or is something happening that is closing the connection after being connected? And can the wrong port cause the error 103 in the second case?

How are you specifying the port and address to the socket?

Can you post your code?

You will need to assign a tcp port number to connect to for sure. Do you know if that unit listens on port 23 or another tcp port?

5300 Catalog

Now I’m not sure how your 5300 is configured hardware wise but this CPU controller supports (assuming the CPU controller with fast Ethernet ports) web hmi access which said a default of port 80. I haven’t touched one of these so I am not an expert on it, but there appears to have a bunch of good documentation at the cdc web site. Hth