ThingConnect

FOCAS: FANUC's CNC data interface

What FOCAS is, how it works, what it can read from a FANUC control, and how ThingConnect uses it to monitor FANUC machines.

What FOCAS is

FOCAS(FANUC Open CNC API Specifications) is FANUC's own interface for reading data out of its CNC controls over the network. A FANUC control with FOCAS answers requests on a network port (8193 by default), and software asks it for things like run status, the running program, part count and alarms. The answer comes straight from the control, not from a sensor guessing at what the machine is doing.

  • Made by

    In one line
    FANUC, for its own CNC controls
  • Connection

    In one line
    Ethernet (TCP/IP), or HSSB, FANUC's fibre-optic link to a PC card, on older set-ups
  • Default port

    In one line
    TCP 8193; can be set between 5001 and 65535 on the control
  • Read or write

    In one line
    The library can do both. Monitoring only reads.
  • Clients at once

    In one line
    A few. FANUC's 0i-D manual allows up to five FOCAS2 clients on the built-in Ethernet port

Looking to monitor FANUC machines rather than learn the protocol? See FANUC machine monitoring.

How FOCAS works

FOCAS is a request-and-answer interface. FANUC supplies a software library; a program on a PC or gateway uses it to open a connection to the control, ask for a piece of data, and get the control's answer back.

  1. 1The client opens a connection to the control's IP address on the FOCAS port (8193 by default).
  2. 2It sends a request, such as "what is the machine doing" or "which alarms are active".
  3. 3The control answers from its own memory: the same values its screens show.
  4. 4The client repeats the requests it needs and closes the connection when done.

Key features of FOCAS

  • Native to FANUC

    What it means
    Built by FANUC for its own controls; no translation box between the software and the control
  • Deep data

    What it means
    Status, program and line, counters, alarms, overrides, spindle and axis load, timers, macro variables, program text
  • Ethernet or HSSB

    What it means
    Newer controls use the built-in Ethernet port; older set-ups may use HSSB to a PC card
  • No extra hardware on newer controls

    What it means
    Controls with a built-in Ethernet port need only a network cable
  • Read and write

    What it means
    The library can also write. Monitoring uses read requests only
  • FANUC only

    What it means
    FOCAS does not work with other brands. Mixed fleets use OPC UA, MTConnect, FTP or digital I/O for the rest

FOCAS1 and FOCAS2, and which controls support them

FOCAS1Older controls

The original library, for older FANUC controls and for connections over HSSB, FANUC's fibre-optic link between the control and a PC card.

FOCAS2Current

The current library, used over Ethernet with today's controls such as the 0i-D, 0i-F and the 30i/31i/32i family.

For a plant, the difference rarely matters. What matters is whether a machine has Ethernet and FOCAS switched on, which varies machine to machine. Published sources don't agree on exactly which older series fall under which library, so we confirm it per control in the site survey.

  • 0i

    Examples
    0i-F, 0i-D
    Usual connection
    FOCAS2 over the built-in Ethernet port
  • 30i / 31i / 32i

    Examples
    30i-B, 31i-B
    Usual connection
    FOCAS2 over the built-in Ethernet port
  • 16i / 18i / 21i

    Examples
    16i-MB, 18i-TB, 21i-MB
    Usual connection
    Ethernet board or HSSB; checked per machine
  • Older series

    Examples
    Series 0, 15, 16, 18, 21; Power Mate
    Usual connection
    FOCAS1, often over HSSB or an Ethernet board; checked per machine

What FOCAS reads from a FANUC control

Everything below is what ThingConnect reads today. Exactly what a control returns depends on its generation and options, which is why we check each machine before quoting a rollout.

  • Machine state

    Examples
    Running, stopped, feed hold, mode (auto, MDI, edit, jog), emergency stop, alarm
    What it gives you
    Live status and every downtime event, timed by the control
  • Program

    Examples
    Running program number and name, main program, the line (N number) being executed
    What it gives you
    Every stop and every part tied to the job and the line it stopped on
  • Production

    Examples
    Part count and target (the control's own counters, or a counter your program keeps), operating and cutting time
    What it gives you
    Parts against plan, and cutting time against powered-on time
  • Alarms and messages

    Examples
    Active alarms with number, type and message; operator messages
    What it gives you
    Downtime that names its own cause
  • Cutting

    Examples
    Feedrate, spindle speed, feed, rapid and spindle override, active tool number, active G-codes
    What it gives you
    Overrides left turned down and slow running, made visible
  • Load

    Examples
    Spindle load and axis (servo) load
    What it gives you
    Abnormal cutting and tool wear show up early
  • Programs on the control

    Examples
    A copy of the program text
    What it gives you
    A record of which version of a program made which parts
  • Tool life

    Examples
    The macro variables your tool-life program keeps
    What it gives you
    Remaining life per tool
  • Controller

    Examples
    Control type, series, software version, axis names
    What it gives you
    Fleet records

Practical example: a FANUC 0i-F machining centre

What a monitoring screen built on FOCAS shows for one machine, at one moment. The values below are an example, not a customer's data.

  • Status

    Example value
    Running, AUTO mode
    Read from
    The control's status
  • Program

    Example value
    O1234, line N220
    Read from
    The program being executed
  • Part count

    Example value
    152 of 400
    Read from
    The control's part counter and target
  • Spindle

    Example value
    6,000 rpm, 38% load
    Read from
    Spindle speed and load
  • Feed override

    Example value
    80%
    Read from
    The override switch on the operator panel
  • Alarm

    Example value
    None active
    Read from
    The control's alarm list

When the machine stops on an alarm, the same screen shows the alarm number and text, and the stop is recorded against program O1234 without anyone typing it.

FOCAS compared with other ways to connect a FANUC

  • FOCAS, direct

    What it is
    Software reads the control through FANUC's library over Ethernet
    Good for
    The deepest data, with nothing added to the control
  • FANUC MTConnect Server

    What it is
    A FANUC option that publishes control data as MTConnect; listed for 0i-D, 0i-F and 30i/31i/32i-A/B
    Good for
    Plants standardising on MTConnect across brands
  • FANUC MT-LINKi

    What it is
    FANUC's own collection software, running on a PC server
    Good for
    FANUC-centred monitoring set up through FANUC
  • Digital I/O

    What it is
    Signals wired from the machine (running, part done)
    Good for
    Older FANUC controls without Ethernet

Across brands, FOCAS sits beside OPC UA, MTConnect and FTP. Each machine is connected the deepest way it supports, and all land on one dashboard.

How ThingConnect uses FOCAS

  1. Your plant

    FANUC control

    FOCAS · TCP port 8193

    ThingConnect gateway

    reads every FANUC control in the plant

  2. ThingConnect cloud
  3. Live dashboardOEE reportsDowntime reports
  1. 1The control's Ethernet port is cabled to the plant network, and FOCAS answers on its port.
  2. 2The ThingConnect gateway in your plant connects to each FANUC control and reads its data.
  3. 3The gateway sends the data to the ThingConnect cloud over one secure outbound connection.
  4. 4You see live status, OEE and downtime on any screen, and reports by shift and day.

Is FOCAS safe on a production machine?

Yes. Monitoring doesn't change programs, settings or how the machine runs.

  • Will it change my machine?

    What actually happens
    No. Monitoring only reads.
  • Will it slow the control down?

    What actually happens
    No. The machine runs exactly as before.
  • Will the machine be on the internet?

    What actually happens
    No. The control talks only to the gateway inside your plant. The gateway connects out to the cloud; nothing connects in.
  • Do I need FANUC software or a PC at the machine?

    What actually happens
    No MT-LINKi server and no PC per machine.

Setup and checks: what your maintenance team does

  • 1. Network

    What to do
    Cable the control's Ethernet port to the plant network and give it a fixed IP address.
  • 2. FOCAS port

    What to do
    On a 0i-F: SYSTEM, then the + soft key, EMBED PORT, then FOCAS2. Check the TCP port (8193 by default) and set the UDP port to 0. Power the control off and on after a change.
  • 3. Quick check

    What to do
    From a laptop on the same network, ping the control's IP address. If it answers, the network side is ready.
  • 4. Hand over

    What to do
    Our team connects the gateway and checks the live data against the control's own screens.

Menu names differ slightly between control series. Nothing is installed on the control, and no machine is stopped for the setup.

Common FOCAS problems, and what we do about them

  • The machine is on, but the connection is refused

    What's happening
    FOCAS or the Ethernet function is off on the control, or it's on a different port.
    What we do
    Our alert says "port closed", so maintenance knows to check the control's Ethernet settings, not the network.
  • The machine is reachable, but data stops

    What's happening
    A FANUC control accepts only a few FOCAS connections at once, and other software may be using them.
    What we do
    The alert says "FOCAS failing" rather than "offline", so the cause is clear.
  • The part count never goes up

    What's happening
    Some machines don't update the control's own part counter. The program counts parts in a macro variable instead.
    What we do
    We read that macro variable as the part count.
  • The machine shows running during a pallet change

    What's happening
    While the control waits on an M-code (such as a pallet change), it still reports itself as running.
    What we do
    We mark those waits as idle, with the reason shown.
  • Some data is missing on one control but not another

    What's happening
    Not every control supports every FOCAS request.
    What we do
    That machine shows everything its control does support.

No FOCAS on a machine? Older machines, or controls without Ethernet, join the same dashboard through digital I/O. Newer equipment can also connect over OPC UA or MTConnect.

Frequently asked questions

FOCAS (FANUC Open CNC API Specifications) is FANUC's own interface for reading data out of its CNC controls over the network. Software that uses it can read machine status, the running program, part count, alarms, overrides, spindle load and more, directly from the control.

TCP port 8193 by default. It can be changed on the control (FANUC allows 5001 to 65535), so we confirm it machine by machine during installation.

FOCAS1 is the original library for older FANUC controls, including connections over HSSB, FANUC's fibre-optic link to a PC card. FOCAS2 is the current library, used over Ethernet with the 0i-D, 0i-F and 30i/31i/32i families. Which one a control uses is confirmed per machine in the site survey.

ThingConnect needs no MT-LINKi server and no PC at the machine. What a control needs is Ethernet and the FOCAS function switched on, which varies machine to machine, so we check each one in the site survey.

The FOCAS library can write as well as read. Monitoring with ThingConnect doesn't change programs, settings or how the machine runs.

Older controls, or controls without Ethernet, may not support it. Those machines join the same dashboard through a digital I/O connection, which gives running status and part count.

See it live

See live FOCAS data from a FANUC control like yours, in the demo, not after the contract.