What's new
What's new

Fanuc ethernet port connection problem via Focas Library

semih

Plastic
Joined
Oct 22, 2018
Hi everyone,

I've got Fanuc Focas Library CD and I've coded a new app for monitoring controller in Python, called Focas library files (in windows and linux platform) those to access Fanuc controller via ethernet Focas1 (for controllers other then 30 series).
I can connect to controller via IP and port numbers with telnet, ping and other cnc connection apps. But when I run my own code cnc_allclibhndl function of Focas library returns -16 (means no connection).

Can you help?
 
Hello Semih,
I am curious how you got the dll to work with python. Or are you using the Shared object file for linux and making your own wrapper in python? I d like to discuss this more.

Here are some thing to check on the machine. Depending on which model of cnc. Sometimes there are two ports on the back of the control. One is an embeded port Focas 1. And the other is if the machine has the data server option. If the machine has a data server option card you will need to make sure the fanuc s707 option is installed to talk to focas through this port I would check to make sure the connector is going to the correct port. Also make sure in the parameter for the embeded port that port 8193 is set for focas. Some machines do not have this set. this will give you -16 for sure i have ran into this many times.

Can you tell me which controller you are trying to connect to?

Thanks

Marcus
 
Hello Semih,
I have got it to successfully work with the ctypes module in python 3.7. I have connected to a 16I-M control without any issues. it turned out to be easier than i had originally thought.
Please let me know if you got the connection to work.

Thanks

Marcus
 
Hi Marcus,
Sorry for my late reply. I was working on another project. Now I'm on this project again. Here are my answers;
- I used ctypes library to run dll files in windows and so files in linux.
- I tried connection on different fanuc controller like 18i, Oi... And these machines don't have any data server. They just have embedded ethernet port.
- Settings on controller are correct, (IP, port...) I've memorized Fanuc docs about these settings :)

Thanks,
Semih.
 
That's great. Did you code on Windows or Linux? Which os and version? I could not achieve this connection issue yet. But I started to work on it again now. Could you get some machine info via this connection? Can you share python code?

Thanks,
Semih.
 








 
Back
Top