• matthew@hierthinking.com

Forum

Please or Register to create posts and topics.

Fanuc Focas - Python Code Connectivity

Hello Sir,

Can you share Sample code of Fanuc Focas connectivity with Python

Unfortunately, Fanuc does not provide an API for Python. You would need to create that on your own by importing the DLL that is written in C and converting all the calls over to Python.

I wouldn't use this in production, but I found this library that reverse-engineers the wire protocol rather than wrapping the Fanuc library.

https://github.com/diohpix/pyfanuc

I do wish Fanuc would open-source the library to make it easier to port to new platforms and languages.

What I recommend is learning SWIG and using it to generate a Python wrapper for the Fanuc Focas library.

https://www.swig.org/Doc1.3/Python.html