FANUC FOCAS Data Acquisition: Controllers, Protocols and What Data You Can Collect

If you run CNC machines, you almost certainly run FANUC. VMCs, lathes, HMCs and grinders from dozens of machine builders use FANUC controls, often several generations on the same floor. That makes FANUC the most important control to get right in any monitoring project.

The good news: FANUC controls expose a lot of data through a well-established interface called FOCAS. The catch: what works depends on the control series, the Ethernet hardware and a few settings that are easy to miss. This article explains what FOCAS is, which controls support it, what data you can read, and when MTConnect or OPC UA make more sense. The FANUC step-by-step setup guide covers the installation itself.

The problem: one brand, many generations

On a typical Indian shop floor we see:

  • Series 0i-F and 0i-F Plus on newer machines
  • Series 0i-D on machines from roughly the last decade
  • Series 0i-C, 0i Mate and 18i/21i on older machines
  • Series 30i/31i/32i on high-end and five-axis machines

All of them are “FANUC”, but they differ in Ethernet hardware, available options and how much data they expose. A plan that assumes every FANUC behaves like a 0i-F will fail on the older half of the floor.

What FOCAS is

FOCAS (FANUC Open CNC API Specification) is FANUC’s library for talking to its CNCs from a PC or gateway. It is a set of C functions, shipped as a library for Windows and Linux, that read and write CNC data over Ethernet (or over the high-speed serial bus on some older systems).

On the network, FOCAS2 over Ethernet uses TCP, normally on port 8193. Each function call is a request to the CNC, and the CNC answers with the data.

You get the library through FANUC or a FANUC distributor. Read the license terms before you use it in a product.

What data you can collect

Data Typical FOCAS source Used for
Run status, mode, alarm and emergency state Status information function (cnc_statinfo) Availability, live status
Spindle load % Spindle load meter function, or diagnostic 410 Tool wear, overload alerts
Spindle speed Actual spindle speed function, or diagnostic 411 Utilisation
Servo axis load Servo load meter function Crash and wear detection
Active alarms with text Alarm message function Downtime reasons
Part count Parameters 6711 (count) and 6712 (total) Production count
Cycle time Cycle time parameters, or derived from status changes Performance
Program number and name Program functions Traceability
Feed rate and overrides Feed and PMC signal reads Process discipline
PMC signals (X, Y, G, F, R, D) PMC range read (pmc_rdpmcrng) Custom machine signals

In our own installations, a typical FANUC tag set reads spindle load from diagnostic 410, spindle speed from 411, spindle temperature from 403 where the drive supports it, servo loads for each axis, the running program name and the alarm list. That is enough for status, OEE (overall equipment effectiveness) inputs and basic condition monitoring.

FOCAS covers availability and performance. Quality still needs operator or gauge input. See our OEE improvement guide for how the numbers combine.

Which FANUC controls support FOCAS over Ethernet

Control FOCAS over Ethernet Notes
0i-F / 0i-F Plus Yes, embedded Ethernet Usually works out of the box
0i-D Yes, embedded Ethernet Check the embedded port is enabled
30i / 31i / 32i (A and B) Yes Embedded Ethernet or Ethernet board
0i-C / 0i Mate-C Varies May need an Ethernet card or option
16i / 18i / 21i Varies Needs an Ethernet board or option on many machines
Series 0-C and older Rarely Use hardwired signals or a PMC-level solution

A frequent field problem: the CNC has both an embedded Ethernet port and a PCMCIA Ethernet card slot, and the active device is set to the card. On the Ethernet settings screen, the device must be set to Embedded, and the change only applies after you select Execute and restart. We have lost hours to that one setting.

MTConnect on FANUC

There are two ways to get MTConnect from a FANUC:

  1. An MTConnect option on the CNC. Newer FANUC controls can run an MTConnect server function as a paid option.
  2. An adapter on a PC or gateway. The adapter reads the CNC through FOCAS and publishes MTConnect. Several open-source and commercial adapters do this.

MTConnect is useful if the plant has standardised on it, or if a third-party system only speaks MTConnect. But on FANUC it usually rides on FOCAS anyway, so FOCAS knowledge still matters.

OPC UA on FANUC

Newer FANUC controls offer an OPC UA server as an option. It gives secure, structured access and suits plants with an OPC UA-based MES. On most existing machines in SMB plants, it is not installed. Check the option list before you plan around it.

Choosing the right route

Situation Recommended route
0i-D, 0i-F, 30i-series with embedded Ethernet FOCAS2 over Ethernet, direct from the gateway
Plant standard is MTConnect FOCAS-based adapter, or the CNC MTConnect option
Plant standard is OPC UA, option available FANUC OPC UA server
Older control without Ethernet Hardwired signals: stack light, cycle start, M30 relay

How fast should you read a FANUC?

FOCAS calls are processed by the CNC alongside its real work, so polling speed matters. In our installations these rates work well:

  • Status and mode: every 200 ms to 1 s. Fast enough to catch short stops.
  • Spindle and servo load: every 1 s. Faster rates fill the database without improving tool-wear trends.
  • Alarm text: only when the status says an alarm is active.
  • Counters and program name: every 2 s, or on a status change.

Read many values in one call where the library allows it, rather than many small calls. A gateway that reads 20 machines this way stays well inside the CNC’s comfort zone.

Architecture in words

  1. FANUC CNCs connect from the embedded Ethernet port to a switch on an isolated machine network.
  2. An edge gateway on that network calls FOCAS on port 8193, reading status and counters every second or faster and alarms on change.
  3. The gateway publishes clean events (status changes, completed cycles, alarms, spindle load trends) to an MQTT broker on the plant LAN.
  4. A monitoring platform subscribes, stores history and shows live status, OEE and alarms.

FOCAS can also write data to the CNC. Configure the gateway as read-only, and never expose port 8193 beyond the machine network.

Common mistakes

  • Wrong Ethernet device selected. Embedded vs PCMCIA, as above. Remember to Execute.
  • Port changed or blocked. The FOCAS port is set on the CNC’s FOCAS2 settings page. It is not always 8193.
  • Too many connections. The CNC allows a limited number of simultaneous FOCAS connections. A second monitoring tool or a forgotten laptop can lock out the gateway.
  • Counting parts from M30. Parameter 6711 counts what the machine builder configured, not always finished parts. Confirm with the programmer.
  • Assuming every diagnostic exists. Spindle temperature and some load values depend on the drive and spindle type.

Conclusion

FOCAS is the backbone of FANUC data acquisition. On any control with working Ethernet it gives you status, spindle and servo load, alarms, part counts and program data. MTConnect and OPC UA are useful where a plant standard demands them, but on FANUC they usually sit on top of FOCAS or need paid options. Put an edge gateway between the CNCs and the network, keep it read-only, and publish to MQTT.

Next, follow the FANUC FOCAS and MTConnect to MQTT setup guide. For other brands, see Siemens SINUMERIK and S7 protocols, Haas MTConnect and Q-codes, Mitsubishi M70/M80 and MELSEC and Delta PLC Modbus.

Unsure what your FANUC controls will give you? Book a free assessment. We will review your control series and options and tell you what you can collect.

Know More About Our CNC Machine Monitoring Software

Related Blogs