Forum
-16 ERROR when connecting to CNC
Quote from Paolo Tacchinardi on November 15, 2022, 4:49 amHi everybody,
I'm new to this forum, so forgive me if it isn't the right section for my question.
I'm trying to connect to FANUC Series Oi-MF using the method I've found on this blog, but I always get the -16 error. The CN FOCAS 2 config should be ok (TCP port 8193 and UDP port 0) and I'm using the Ehternet port on the back of the control cabinet behind the HMI.
what can I do to solve the problem?
Thank you very much,
Paolo
Hi everybody,
I'm new to this forum, so forgive me if it isn't the right section for my question.
I'm trying to connect to FANUC Series Oi-MF using the method I've found on this blog, but I always get the -16 error. The CN FOCAS 2 config should be ok (TCP port 8193 and UDP port 0) and I'm using the Ehternet port on the back of the control cabinet behind the HMI.
what can I do to solve the problem?
Thank you very much,
Paolo
Quote from Versex on November 15, 2022, 10:39 amHi Paolo,
For anyone who runs across this thread in the future, a -16 error is a Socket Error (Ethernet connection error).
There are a couple of reason you may be getting this error. The first is a bad Ethernet cable. This will obviously cause an issue with the ethernet communications.
If you are sure that the cable is good, then you are going to want to check which port you are plugged into on the controller. Some controllers have both the embed port (standard ethernet communication) and a Fast Ethernet / Data Server card. Figure out which one you are plugged into and check the IP address settings in the Fanuc HMI screen in the Embed Port tab (Standard Ethernet port) or the Ethernet tab (Fast Ethernet / Data Server). Check that the IP address you are attempting to connect to matches the IP address of the port you are using.
Next, we need to check that the IP address on the computer you are using is on the same network as the port you are connecting to. So for instance, if you are connecting to Standard Ethernet on the Fanuc controller and the IP address in the Embed Port tab in the HMI screen is 10.0.0.3, your computer will need to be on 10.0.0.x to be able to communicate with the controller. The same goes for the Fast Ethernet. If you are using Fast Ethernet go to the Ethernet tab in the Fanuc HMI screen and see what the IP address is and make sure your computer has the same first 3 numbers.
If all that is good, you will need to ensure that nothing else is taking the IP addresses you are using. So unplug the machine from the network, and connect directly from your computer to the machine and see if you can connect then.
Let me know if any of this helps. If not, go ahead and send me some screenshots of your network configuration on your computer, your cnc machine, and your code and we will try to get it figured out.
Hi Paolo,
For anyone who runs across this thread in the future, a -16 error is a Socket Error (Ethernet connection error).
There are a couple of reason you may be getting this error. The first is a bad Ethernet cable. This will obviously cause an issue with the ethernet communications.
If you are sure that the cable is good, then you are going to want to check which port you are plugged into on the controller. Some controllers have both the embed port (standard ethernet communication) and a Fast Ethernet / Data Server card. Figure out which one you are plugged into and check the IP address settings in the Fanuc HMI screen in the Embed Port tab (Standard Ethernet port) or the Ethernet tab (Fast Ethernet / Data Server). Check that the IP address you are attempting to connect to matches the IP address of the port you are using.
Next, we need to check that the IP address on the computer you are using is on the same network as the port you are connecting to. So for instance, if you are connecting to Standard Ethernet on the Fanuc controller and the IP address in the Embed Port tab in the HMI screen is 10.0.0.3, your computer will need to be on 10.0.0.x to be able to communicate with the controller. The same goes for the Fast Ethernet. If you are using Fast Ethernet go to the Ethernet tab in the Fanuc HMI screen and see what the IP address is and make sure your computer has the same first 3 numbers.
If all that is good, you will need to ensure that nothing else is taking the IP addresses you are using. So unplug the machine from the network, and connect directly from your computer to the machine and see if you can connect then.
Let me know if any of this helps. If not, go ahead and send me some screenshots of your network configuration on your computer, your cnc machine, and your code and we will try to get it figured out.
Quote from Paolo Tacchinardi on November 16, 2022, 9:31 amHi,
it WORKED! Thank you for your help. For anyone who may have my error, in my case the problems were two:
a) I was connected to the Embedded Port, but I was trying to connect using the Fast Ethernet IP.
b) In the CN config the FOCAS2 port was 9000, once I put 8193, it started.
Thank you again,
Paolo
Hi,
it WORKED! Thank you for your help. For anyone who may have my error, in my case the problems were two:
a) I was connected to the Embedded Port, but I was trying to connect using the Fast Ethernet IP.
b) In the CN config the FOCAS2 port was 9000, once I put 8193, it started.
Thank you again,
Paolo