dle Posted December 6, 2016 Share Posted December 6, 2016 Hi Guru, I have an MCU with an ethernet TCP/IP server application that sending data package. Attach is the raw data that I capture using device monitor studio software tool. I set up DF ethernet TCP/IP client (IP: 192.168.0.90, Port: 5001) I don't see anything on the DF COM monitor. when I tried to send out something from DF, it keep saying the port is busy. Do you have any suggestion? Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted December 6, 2016 Share Posted December 6, 2016 When you try and send something out a TCP port in DAQFactory and it gives you "Port is busy" it most likely means that the socket could not be established and the port is busy trying to establish it. In general that usually means you got the IP address or Port # wrong. 5001 is an unusual port # for Modbus TCP. 502 is the standard. Also, its possible that your device can only handle one connection and so while your other tool is running, DAQFactory can't connect. Note that this does not apply to serial ports. For serial ports, if you get Port is busy when you try and send, it usually means its locked due to other comms. Quote Link to comment Share on other sites More sharing options...
dle Posted December 7, 2016 Author Share Posted December 7, 2016 Thanks Guru, I looked at the code of the MCU and it is actually port 7. nx_tcp_server_socket_listen(&ip_0, 7, &socket_echo, 5,NX_NULL); Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted December 7, 2016 Share Posted December 7, 2016 That would do it. It's easy to forget that connecting over Ethernet requires more than just the IP address. The IP address just gets you to the proper office building. You also need to know what the port number is to get to the right office in the building and there are 65535 offices in the building and 99.99% are empty. If your MCU is going to act as a standard ModbusTCP slave, put it on port 502, as that is the standard port and anyone doing Modbus TCP is going to try 502 first without looking at any documentation you provide. Also, you should avoid port's below 256 as they are kind of "reserved". Quote Link to comment Share on other sites More sharing options...
MikeTV Posted July 1, 2020 Share Posted July 1, 2020 Hi, I am evaluating SCADA's for a small 21 PLC project for a semiconductor manufacturer. I am having the same issues using a Mitsubishi FX3U and an ENET module set to an IP and port 5000. I started with port 5000 for Fernhill which I evaluated and it is working. Now I am on to DAQFactory. I tried a few ports and cannot connect due to port is busy. I am just trying to determine learning curve by just a quick setup and evaluating a digital I/O and an internal word. The server is a new WIN10 PRO build with WIFI turned off. IPv4 set to 192.168.1.10 and module set to 192.168.1.26 and it pings fine. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted July 1, 2020 Share Posted July 1, 2020 Go to the monitor and try just typing one character and then Send. If it comes back "port is busy" then it almost certainly means that DAQFactory was unable to open a socket connection to that IP/Port combination. This sometimes happens when one gets the IP or more likely, the port incorrect. It also happens when the device has a limit on the number of active connections, which most devices do, and you've reached that because you have some other software connecting to the PLC. Quote Link to comment Share on other sites More sharing options...
MikeTV Posted July 1, 2020 Share Posted July 1, 2020 I removed the other software and tried three different ports. I can try a different IP/Port Combination for sure. Quote Link to comment Share on other sites More sharing options...
MikeTV Posted July 1, 2020 Share Posted July 1, 2020 Different combination also did not work. I am pinging fine. Unsure if I need to install additional DAQFactory Software. I even tried to reserve the port, bad hail mary. Is there any special mapping that is required> This is with firewall disabled and enabled. The firewall has daqfactory allowances. My last effort would be using a router and try some port method that way. Active Connections Proto Local Address Foreign Address State TCP 127.0.0.1:49153 INTEL-NUC:49674 ESTABLISHED TCP 127.0.0.1:49674 INTEL-NUC:49153 ESTABLISHED TCP 148.148.1.1:51650 148.148.1.48:1000 SYN_SENT TCP 148.148.1.1:51652 148.148.1.48:1000 SYN_SENT Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted July 2, 2020 Share Posted July 2, 2020 This is an outgoing connection to your device, so no firewall issues. Allowing DAQFactory for the firewall would be for incoming, like using DAQFactory as a web server, or for Connections to 2nd instances of DAQFactory. I would do this: 1) reboot the computer 2) start DAQFactory 3) go to Quick - Device Configuration -> New Serial Ethernet device. 4) add a new Ethernet Client, use the IP / Port you think will work. 5) select Monitor to popup the monitor window. Try just typing something and hitting send. If it gives you Port Locked then DAQFactory is unable to open a socket to the device and the issue is outside DAQFactory, or you have the wrong IP/Port. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.