# FANUC FOCAS

> Monitor FANUC Series 0i, 30i, 31i, 32i and 16i/18i/21i CNC machines over Ethernet: machine status, positions, spindle, alarms, macro variables and PMC signals.

FOCAS is FANUC's interface for reading data from CNC controls. PLCGateway speaks the FOCAS Ethernet protocol on port 8193 directly, so no Fwlib DLL and no Windows PC is required; it runs on Linux and on small ARM devices next to the machine as well.

Status, positions, spindle speed and load, feed, alarms, program numbers, macro variables, parameters, diagnosis and PMC areas are read, requests that use the same function are combined in one scan. Together with the production model this gives machine availability, cycle counts and OEE for a CNC shop.

- **Driver id:** `focas`
- **Connection:** FOCAS Ethernet · TCP 8193
- **Address browsing:** addresses are typed or imported
- **Writing:** yes
- **Included in:** PLCGateway Connect, PLCGateway SCADA, PLCGateway Embedded

## What PLCGateway reads and writes

- Machine status: run, mode, motion, emergency stop, alarm
- Absolute, relative, machine and distance-to-go positions per axis
- Spindle speed and load, actual feed
- Alarm state and alarm types
- Main and running program number, sequence number
- Macro variables (writable), parameters, diagnosis and PMC areas G, F, X, Y, R, D and others

## Address examples

| Address | Meaning |
|---|---|
| `status.run · status.mode` | Operating state and mode |
| `pos.abs.X · pos.rel.2` | Absolute X position / relative position of axis 2 |
| `spindle.speed · spindle.load` | Spindle speed and load |
| `alarm.has · alarm.types` | Alarm present / alarm types |
| `macro.500` | Macro variable #500 (readable and writable) |
| `pmc.D.2204.word · pmc.R.100.3` | PMC data word / PMC bit |

## Controllers and devices

- [FANUC CNC](https://plcgateway.com/controllers/fanuc.md)

## Connect in a few steps

1. Enable the embedded Ethernet port of the CNC and FOCAS (port 8193) in the Ethernet settings of the control.
2. Add a FOCAS device with the IP address of the CNC.
3. Create the tags (status, positions, spindle, alarms, macros) or let an AI assistant create a standard machine set.
4. Define the machine in the production model to get availability, cycle counts and OEE.

## Questions and answers

### Do I need the FANUC Fwlib library or a Windows PC?

No. PLCGateway implements the FOCAS Ethernet protocol itself and runs on Windows, Linux and ARM devices.

### Which FANUC controls work?

Controls with FOCAS over Ethernet: Series 0i-D, 0i-F, 0i-F Plus, 30i/31i/32i/35i-B and Plus, and 16i/18i/21i with an Ethernet board.

### Can it write to the CNC?

Only macro variables are writable, for example to pass a work order number or a counter. Parameters, programs and PMC areas are read only for safety.

## Related protocols

- [Haas machine data collection](https://plcgateway.com/protocols/haas.md)
- [MTConnect](https://plcgateway.com/protocols/mtconnect.md)
- [OPC UA client](https://plcgateway.com/protocols/opc-ua.md)
- [All protocols](https://plcgateway.com/protocols.md)

_Product and model names are trademarks of their owners. They are named only to show which equipment the drivers communicate with; PLCGateway is not affiliated with these companies._

---
Source: https://plcgateway.com/protocols/fanuc-focas
