FANUC · FOCAS

How to Set Up FANUC FOCAS, Test It, and Connect It to Spall

Turn on FOCAS, prove the connection with three tests, and connect a FANUC control to Spall over Ethernet. Read-only, no sensors, no program changes.

~20 min · Last reviewed August 12, 2026

FOCAS (FANUC Open CNC API Specification) is the data interface FANUC builds into its controls. With FOCAS switched on and the machine on your network, Spall reads run state, alarms, the active program, spindle and feed, and part count directly from the control over Ethernet on port 8193. Nothing is written back. This guide covers the setup on the control, a proper connection test before you trust it, and the handoff to Spall.

Before you start Your control needs the FOCAS Ethernet option equipped. It’s common on FANUC controls roughly 10 to 15 years old and newer: the 0i-D / 0i-F, 16i / 18i-B, and 30i / 31i / 32i series. If you aren’t sure, your machine tool builder or FANUC can confirm it. You’ll also need an Ethernet drop at the machine, a fixed IP from whoever runs your network, and the Spall gateway on the same network. The gateway reads only. It never writes to the control.

1. Set the machine’s IP address

Get a static IP, subnet mask, and gateway from your network person first. The address you set here has to sit in the same range as the Spall gateway so the two can see each other.

On the control, press SYSTEM, then press the continue soft key (the rightmost arrow) until you see EMBED PORT (older models may label it ETHPRM, EMBDD, or ETHER-BOARD). Open it and select the COMMON screen.

SETTING (EMBEDDED ETHERNET) FANUC • SYSTEM ▸ COMMON FOCAS2 DNS/DHCP MAC ADDRESS00:E0:E4:1B:2C:9A IP ADDRESS 192.168.1.20 SUBNET MASK 255.255.255.0 ROUTER IP ADDRESS 192.168.1.1 DHCP CLIENT 0 (DISABLE) AVAILABLE DEVICEEMBEDDED COMMON FOCAS2 DNS/DHCP (OPRT) From your IT / network 0 = static IP Must read EMBEDDED
SYSTEM > EMBED PORT > COMMON. Type each value and press INPUT. Leave DHCP CLIENT at 0 for a fixed address.
  1. Enter the IP ADDRESS, SUBNET MASK, and ROUTER IP ADDRESS (your gateway), typing each and pressing INPUT.
  2. Leave DHCP CLIENT at 0 so the machine keeps a fixed address.
  3. Confirm AVAILABLE DEVICE reads EMBEDDED. If it doesn’t, press (OPRT), then EMB/PCMCIA, then EXECUTE.

2. Turn on FOCAS2

Press the FOCAS2 soft key (on some controls, PAGE DOWN until you see FOCAS SETTINGS). This is where the control opens its data port.

SETTING (FOCAS2 / ETHERNET) FANUC • SYSTEM COMMON ▸ FOCAS2 PORT NUMBER (TCP) 8193 PORT NUMBER (UDP)0 TIME INTERVAL0 If it reads 0, set it to 8193 Leave UDP and interval alone COMMON FOCAS2 (OPRT)
The FOCAS2 screen. Set PORT NUMBER (TCP) to 8193. That's the port Spall connects to.
  • If PORT NUMBER (TCP) shows 0, change it to 8193. If it already has a number, leave it and write that number down, that’s the one Spall will use.
  • Leave PORT NUMBER (UDP) and TIME INTERVAL as they are.

3. Restart the control

FANUC applies Ethernet and FOCAS changes on power-up, not live. Power the control off and back on so the new settings take. Skip this and your tests in the next step will fail for no obvious reason.

4. The FOCAS test

Before you hand anything to Spall, prove FOCAS is actually answering. There’s no single button on the machine that says “FOCAS OK,” so you test it from a PC on the same network, in three quick steps that each rule out a different problem.

Test 1: can you reach the machine?

Ping the machine’s IP. A reply means it’s on the network and the addressing is right.

# from any PC on the shop network
ping 192.168.1.20

Test 2: is the FOCAS port open?

A ping only proves the machine is on the network, not that FOCAS is listening. Check that port 8193 actually answers.

# Windows PowerShell
Test-NetConnection 192.168.1.20 -Port 8193
   -> TcpTestSucceeded : True

# Mac or Linux
nc -vz 192.168.1.20 8193
   -> Connection to 192.168.1.20 port 8193 succeeded!

Test 3: does FOCAS return data?

The real test is opening a FOCAS connection and reading something back. FOCAS opens a session with a handle (the cnc_allclibhndl3 call), then asks the control for live values. If the handle opens and the control returns its program and run state, FOCAS is fully working. Spall’s setup wizard runs this test for you as part of adding the machine, or you can use any FOCAS test utility first to check for yourself.

FOCAS test, 192.168.1.20:8193 $ focas-test 192.168.1.20 8193 cnc_allclibhndl3 ......... handle opened (h=3) cnc_sysinfo .............. 30i-B / Series 30i cnc_rdexecprog ........... O1234 (BRACKET-OP20) cnc_statinfo ............. RUN = STARTED cnc_rdparam 6711 ......... PARTS COUNT = 842 cnc_freelibhndl .......... closed RESULT: FOCAS OK, control is responding.
A passing FOCAS test. The handle opens, the control returns its model, active program, run state, and part count, exactly the data Spall collects.

If a test fails Ping fails: recheck the IP, subnet, and cabling in Step 1, and make sure you power-cycled the control. Ping works but port 8193 is closed: FOCAS2 wasn’t set or the FOCAS option isn’t equipped, recheck Step 2 or confirm the option with your builder. A firewall between the machine network and the gateway can also block 8193, ask IT to allow it.

5. Connect it to Spall

In Spall, add the machine, choose FANUC FOCAS as the source, and enter the machine’s address and port:

192.168.1.20:8193

Assign the Spall gateway on that network and save. Run state, program, spindle, and part count start flowing within seconds. Run a cycle and watch the state change and the part count move.

FANUC FOCAS :8193 reads Spall Gateway read-only DIN-rail, on-site MQTT / TLS outbound only Spall Cloud dashboards & loss board No inbound ports. No VPN. No public IP. The gateway never writes to the control.
The data path. The gateway reads FOCAS on your network and pushes outbound to Spall. Nothing reaches back into the machine.

What Spall does with this data

Availability. Spall splits every hour into running, idle, and down straight from the FOCAS run state. No clipboards, no operator guesswork, just true availability.

Downtime and reasons. FOCAS alarms and state changes catch each stop as it happens. Operators tag the reason, and Spall ranks them into a Pareto so you attack the biggest loss first.

Production. Spall reads PARTS COUNT directly over FOCAS for target-vs-actual by shift and job. See the multiple part counts guide for multi-part cycles.

Quality and OEE. Availability, performance, and quality roll into one OEE view, each loss ranked in dollars so the number points at an action instead of a score, the same capacity the hidden factory guide describes as capacity a shop already owns and isn’t using.

One thing worth repeating FOCAS can read almost everything inside the control, and Spall uses that to read, never to write. The gateway pulls FOCAS data on your network and sends it outbound over encrypted MQTT. There’s no inbound port opened on your firewall for machine data, no VPN, and no changes to your programs or PMC. Worst case if it can’t reach the machine is a gap in the chart. The spindle keeps running.

Quick recap

  • Set IP under EMBED PORT > COMMON
  • FOCAS2 port = 8193
  • Power-cycle the control
  • Test: ping, then port 8193, then a FOCAS handle
  • Add the machine in Spall

Once the FOCAS test passes, connecting Spall is the easy part. Repeat per machine, or hand us the addresses and we’ll bring them on together.

Related guides

From the Help Center

$200/machine/mo · pilots from $4,500 · hardware included

See full pricing →

Bring your machine list. We'll tell you exactly what plugs in.

30 days, hardware included, line pilot $4,500 or plant pilot $8,500, fully credited when you expand.