What's new
What's new

Fanuc Controller + FOCAS + PC = real-time data transfer?

shubh

Plastic
Joined
Feb 16, 2024
Location
Delhi
Hi,

I have gained interest in reading and understanding about Fanuc Controllers and CNC machines. I am interested to know if it is possible to:
1. Connect a CNC machine with Fanuc Controller (0i-TF Plus), having USB and Ethernet Slot (and possibility to activate FOCAS) to a PC or a Raspberry Pi
2. Transfer real time data from Controller to PC/Raspberry Pi (eg: part count, cycle rate, idle time or any other data it is already recording)

If yes, please walk me down with what all tools, software and hardware I require. As per my research, theoretically, no hardware is required (I am just a beginner, so feel free to correct me) - we only need to establish connection between Controller and PC/Ra Pi using FOCAS and/or FTP (correction needed) and then write a code to transfer data from Controller to PC/Ra Pi (validation needed).

Can somebody experienced guide me and validate my thought process? Is it possible to do this with Ethernet+FOCAS+PC/Pi or additional hardware is required? Is there any other way of doing this?

Thank you,
Shubham
 
For NC Code I/O, the USB or PC card by themselves will work and that's how most people do it.
The Ethernet is nice if you want to access a server somewhere, but not necessary.
 
Hey Douglas, thanks for your reply.
I want to make the Controller data (part count, current program, idle time, etc) available remotely via a Dashboard/Website.
For this, what should I be doing? Simply plug an Ethernet from my Controller to PC?
Or I need to setup some connection, software or change other settings?
I will be really obliged if you could assist.
 
There are multiple companies that offer machine monitoring software which will allow you to view everything from your PC. If you are wanting to make your own setup, I unfortunately don’t know much about what is required for that. Seems like you would need some sort of code/logic on your PC that would take the FOCAS data and convert it into something easily viewable.
 
Ethernet, Focas, and Linux/Windows is all you need. Here is our open source Focas adapter. https://github.com/ladder99/fanuc-driver
First of all, thanks a lot for your help. I have set it up in my linux, however, I don't see certain data fields in the dashboard that I need, namely: Idle Time, Down Time, Part Count, Production (daily/hourly), Cycle Rate, Current Program Running, Efficiency - while I understand some of these can be calculated if some data point is available; but I have no clue how to find even some of these data points.
Will these data points automatically appear once I connect this system to the live Fanuc Controller? Or there is custom coding required? Please suggest.

Second, how can I connect 8 such machines to a single industrial PC? Will I have to run 8 different setups or there is some other way?

Please guide me in the right direction.
 
Last edited:
Hey shubh. To answer the last question, you can use a single PC. The machine YAML file lets you configure multiple machines. From experience, each machine utilizes about 10% CPU, so if you have multiple CPUs, you should be fine.

As far as the data points.... well, each Fanuc can be different with regard to part count, program name, etc. The other items, such as durations do have to be calculated. There is a program running timer in the control, but other stuff has to be calculated.

Did you setup MQTT or MTConnect output from the driver? What dashboard software are you using?
 
Hii cmisztur, Yes, I've set up ladder99 with both the Fanuc driver and MTConnect agent. For my dashboard needs, I'm utilizing Grafana, and the database backend is Postgres. Currently, I'm able to visualize some data like temperature on my dashboard.

However, in my Grafana Dashboard, when I'm adding a new panel, I often get confused about which query I should use because I don't know from which Schema/table I can get these details.

Could you guide me on how to access and display these metrics on my Grafana dashboard?

Thanks for your help!"
 
How to do you feed the data you already have to Postgres?
Currently, we are testing with Ladder99's demo data, assuming this data will be pulled automatically once we connect it to the Controller (please rectify if my assumption is wrong)
 
Sorry, I misunderstood. It sounded like you were using Postgres for another application and wanted to bring the additional data from focas into that. I haven’t messed around with all of the ladder99 stuff yet, didn’t know that was included out of the box.
 
Hey shubh. To answer the last question, you can use a single PC. The machine YAML file lets you configure multiple machines. From experience, each machine utilizes about 10% CPU, so if you have multiple CPUs, you should be fine.

As far as the data points.... well, each Fanuc can be different with regard to part count, program name, etc. The other items, such as durations do have to be calculated. There is a program running timer in the control, but other stuff has to be calculated.

Did you setup MQTT or MTConnect output from the driver? What dashboard software are you using?
Hi cmisztur,

Can you help me understand, if I have successfully setup Ladder 99 in my system, do I just need to connect my PC with Fanuc Controller and make IP Settings in my Controller? Or do I need to initiate connection using certain code or command? I am stuck here.

Also, the current demo data doesn't show running timer, part count, program name.. could you help me understand how to call for them? If I need to code, can you give me a template/sample command on which I can explore and do my work?


Thank you for reading
 
Hi,

I have gained interest in reading and understanding about Fanuc Controllers and CNC machines. I am interested to know if it is possible to:
1. Connect a CNC machine with Fanuc Controller (0i-TF Plus), having USB and Ethernet Slot (and possibility to activate FOCAS) to a PC or a Raspberry Pi
2. Transfer real time data from Controller to PC/Raspberry Pi (eg: part count, cycle rate, idle time or any other data it is already recording)

If yes, please walk me down with what all tools, software and hardware I require. As per my research, theoretically, no hardware is required (I am just a beginner, so feel free to correct me) - we only need to establish connection between Controller and PC/Ra Pi using FOCAS and/or FTP (correction needed) and then write a code to transfer data from Controller to PC/Ra Pi (validation needed).

Can somebody experienced guide me and validate my thought process? Is it possible to do this with Ethernet+FOCAS+PC/Pi or additional hardware is required? Is there any other way of doing this?

Thank you,
Shubham
 
When somebody is asking about communication or data transfer issues, I always recommend

the application I'm currently using: COMMUNICATION SOFTWARE FOR FANUC CNC.
This application is very well developed and easy to use for any type of communication systems (Ethernet, serial RS232 etc.).
You can download from SOFTPEDIA web page for free.
 
When somebody is asking about communication or data transfer issues, I always recommend

the application I'm currently using: COMMUNICATION SOFTWARE FOR FANUC CNC.
This application is very well developed and easy to use for any type of communication systems (Ethernet, serial RS232 etc.).
You can download from SOFTPEDIA web page for free.
Hi,

Is this a readymade application or a way to connect to the CNC?
My use case: I want to fetch data from CNC to my PC in real time. Data points I want: parts count, current program, idle time, down time, current cycle, any other possible to fetch in real time.

I am not looking for a paid solution. I would prefer something I can customize/code, but okay with existing app too (free not paid).

If you know something that can help us, please suggest, been looking for last 5+ months.

Regards.
 
Contact your local FANUC office. You may be able to get the FANUC FOCAS2 libraries for free. I believe the Part Number is;

A02B-0207-K738-V010
 
Contact your local FANUC office. You may be able to get the FANUC FOCAS2 libraries for free. I believe the Part Number is;

A02B-0207-K738-V010
Tried getting that from FANUC but they said since our Tool Builder has not opted for FOCAS model (basically not paid for the software) - they can't provide FOCAS Libraries to us as we are not direct customers, we have to source it through Tool Builder and they have obviously declined.

Any help would be greatly beneficial.
 
There's two components to FOCAS; Software on the CNC side (read it's an option and must be paid for) which your builder chose not to include with your machine... most likely to cut cost, and the PC Software side.

Even if I gave you the FOCAS2 libraries (which I cannot), it would be of no help/benefit since the control doesn't have the option.
 
There's two components to FOCAS; Software on the CNC side (read it's an option and must be paid for) which your builder chose not to include with your machine... most likely to cut cost, and the PC Software side.

Even if I gave you the FOCAS2 libraries (which I cannot), it would be of no help/benefit since the control doesn't have the option.
Not sure, the online catalog of the Fanuc Controller that I have mentions having FOCAS internally. Can you point me a way where I can find the data points I need without FOCAS? Using a simple Ethernet (my machine has Ethernet Ports)
0i TF and 0i TF Plus are my Controller Versions
 
Without FOCAS, your other option would be to use Custom MACRO B and the system variables. In the "Common to Lathe Center and Machining Center Operation manual" there is a Custom MACRO B section. There you will find all the system variables. From there, you can use the POPEN, DPRNT. and PCLOS functions to open your I/O channel, DPRNT to format data and output the data, and PCLOS to close the I/O Channel.
I/O channel 9 should be your ethernet port.
 








 
Back
Top