GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

CNC data collection

Fanuc machine tools data acquisition: what the control will and will not give you

A working engineer's guide to pulling data out of Fanuc controls without stopping production. Two software paths, the wiring each one needs, what they can read, and where the practical limits sit.

FOCAS 1 and 2Ethernet plus RS-232MTConnect and OPC UAEdge buffering
Fanuc machine tools data acquisition feeding an industrial edge application
How it works

How Fanuc machine tools data acquisition actually works

Every Fanuc control keeps a live image of itself in memory. Tool offsets, active program number, spindle load, axis position, alarm state, override values, cycle time counters. That image updates many times per second, but only a small part of it is exposed to outside software.

The control exposes that subset through two channels. The first is FOCAS, a Fanuc library that speaks directly to the CNC over Ethernet or HSSB. The second is a protocol translator, usually MTConnect or OPC UA, that sits on a gateway and repackages FOCAS calls into something your historian already understands.

Neither channel reads the servo loop itself. You get the control's own view of position and load, sampled at the polling rate you choose. If your process needs microsecond-level waveform capture, that is a different instrument entirely.

This is why sampling rate matters more than people expect. Poll at 100 ms and a 6-second tool change looks like a clean block. Poll at 1 s and the same tool change disappears into an average.

  • 1
    FOCAS reads control stateOffsets, programs, alarms, counters, override, spindle and axis load.
  • 2
    Gateways translate, not inventMTConnect and OPC UA carry the same FOCAS data in a standard shape.
  • 3
    Polling rate sets resolution100 ms to 1 s covers most shop-floor reporting needs.
Connection paths

Ethernet, RS-232 and the wiring each path needs

Most Fanuc controls built after the mid-2000s have an Ethernet port on the main board or an option card. That port supports FOCAS 1 and FOCAS 2 over TCP/IP. FOCAS 1 is the older, lighter call set. FOCAS 2 adds more handles, faster bulk reads and better alarm detail.

Older controls, and some compact models, only offer RS-232 or a serial-style loader port. Serial works, but it is slow and one machine per port. A serial-to-Ethernet converter gets you onto the network, yet the effective poll rate drops to roughly one full data sweep per second at best.

Before you write any code, confirm three things on the machine: the ladder or parameter page that enables the Ethernet function, the port number, and whether the control allows more than one simultaneous client. Some builds lock you to a single connection.

Cable routing deserves a mention. Keep the data cable away from spindle drive conduit. We have seen 100 ms polling turn into 400 ms jitter purely from induced noise on a poorly routed drop.

  • 1
    Ethernet plus FOCAS 2The default choice for anything built this century.
  • 2
    RS-232 plus converterWorkable for legacy cells, one machine per port.
  • 3
    Check client limitsSome controls accept only one open data connection.
Data quality

What you can and cannot read from the control

The control knows what it commands. It does not always know what the metal did. Axis position comes from the command side, so thermal growth and backlash show up as error between commanded and actual, not as a raw measurement.

Spindle load is a percentage of rated torque, scaled by the drive. It is useful for detecting a dull tool or a chatter event, but the number is not a force reading. Do not calibrate a process window on it without a cutting test.

Alarm and message text is the most underused dataset. Every alarm carries a number, a timestamp and often the block that triggered it. Pulling that into a database turns a folder of maintenance notes into a queryable failure history.

Tool life counters and program run times are reliable because the control maintains them itself. Part counters are less reliable. Operators reset them by hand, and a mid-shift reset silently corrupts your OEE math.

  • 1
    Commanded, not measuredPosition and load come from the control's own model.
  • 2
    Alarms are goldNumber, timestamp and triggering block, all queryable.
  • 3
    Watch manual resetsPart counters and tool life can be zeroed at the panel.
Architecture

Edge buffering, gateways and where to put the collector

Put the collector close to the machine. A small industrial PC on the cell network can poll 20 to 40 controls at 500 ms without strain. When the plant network drops, it keeps writing to local storage and backfills later.

A gateway product does the protocol translation for you. It holds the FOCAS library, exposes MTConnect or OPC UA on the north side, and handles reconnects. That saves months of library wrangling, at the cost of a per-machine license.

Rolling your own collector makes sense when you need a custom tag set, unusual math at the edge, or a data shape no gateway supports. Budget for the FOCAS library, a Windows or Linux host, and time spent on reconnect logic.

One rule holds either way: never let the data path share a switch with servo or drive traffic. Keep the cell VLAN clean. Data collection should never be the reason a machine faults.

  • 1
    Collect at the edgeLocal buffering survives network outages.
  • 2
    Gateway versus customLicensed speed versus full control of tags.
  • 3
    Separate the VLANData traffic must not touch motion traffic.
Boundaries

When Fanuc machine tools data acquisition is the wrong tool

If the goal is to catch a chatter event inside one cut, a control data feed will not help. You need an accelerometer or a spindle-mounted sensor running at kilohertz rates. FOCAS polls at 100 ms at best, which is two orders of magnitude too slow.

If the machine has no network option and no spare serial port, the honest answer is a retrofit card or an external power meter. Clamping a current transformer on the spindle drive line gives you run and idle state for far less money than a control upgrade.

If the shop runs ten machines and one process engineer, a full historian is overkill. A daily CSV pull and a spreadsheet will answer most questions. Build the pipeline when the questions outgrow the spreadsheet.

The engineering meaning is simple. Control data tells you what the machine was told to do and what state it was in. It does not tell you what the part measured. Pair it with inspection data if you want the full picture.

  • 1
    Too slow for vibrationUse a dedicated sensor for chatter and tool breakage.
  • 2
    No port, no feedRetrofit or power sensing instead.
  • 3
    Start smallA CSV pull beats an unused historian.
Method comparison

Choosing a data path for Fanuc machine tools data acquisition

Pick the row that matches the control generation and the reporting need.

MethodTypical poll rateBest fitMain limit
FOCAS 2 over Ethernet100–500 msControls from mid-2000s onwardNeeds library plus custom code
FOCAS 1 over Ethernet500 ms–1 sOlder Ethernet-capable controlsFewer handles, slower bulk reads
RS-232 with converter1–5 sLegacy cells with no network portOne machine per serial port
MTConnect gateway250 ms–1 sMixed-brand shops needing one schemaPer-machine license cost
OPC UA gateway250 ms–1 sPlants already running an OPC UA stackMapping work per tag group
Manual panel exportPer shiftAudits and spot checksNo automation, human error

Which path to take

For Ethernet-ready controls and a mixed-brand shop, buy a gateway and standardize on MTConnect. For a single-brand cell where you control the tag list, write a direct FOCAS 2 collector and skip the license. For legacy machines with no port, measure power at the drive, not data at the control.

FAQs

Questions engineers ask before wiring it up

Does reading data from the control slow the machine down?

In practice, no. FOCAS calls read a memory image rather than interrupting the servo loop. The risk is network contention, not compute.

Keep the data VLAN separate from the motion network and poll no faster than the reporting need. A 100 ms poll on 30 machines is a very light load.

Can one collector handle controls from different Fanuc generations?

Yes, if it holds both FOCAS 1 and FOCAS 2 libraries and you map each machine to the right call set. Older controls may also need a firmware option enabled.

Expect per-machine mapping work. The tag names are not identical across generations even when the underlying value is the same.

What sampling rate is enough for OEE reporting?

One second is usually plenty. OEE is built from run, idle, down and part-count states, and those states last seconds to minutes.

Go to 100 ms only when you want to separate short stops from tool-change time. Faster than that adds storage cost with no reporting benefit.

Is control data enough to prove a part was made to tolerance?

No. The control reports commanded position and its own compensation state, not the finished dimension.

Tie the control feed to inspection records by part serial or time window if you need traceability. Without that link you have process data, not quality data.

What happens to data when the plant network drops?

Nothing, if the collector buffers locally. Store to disk at the edge and forward when the link returns.

Without buffering, a 20-minute outage leaves a 20-minute hole in the timeline. That hole will land in the one shift you need to explain.

Send us the drawing, get a quote in 12 hours

Upload a part file and our engineers return a quotation plus a free DFM analysis within 12 hours. Production can start within 24 hours, and every shipment carries 100% inspection records on request.

12-hour quote100% inspectionNDA on request

Follow

More from the shop floor

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC