Fanuc Focas 2 〈INSTANT · 2025〉
Technically, FOCAS 2 is a library of C-functions. It operates typically over Ethernet, allowing for high-speed communication between the Windows-based environment (or Linux/Android) and the FANUC CNC kernel.
The API grants developers access to three distinct layers of data:
using Fwlib; // Reference to FOCAS DLL// Connect to CNC at 192.168.1.100 short ret = Focas1.cnc_allclibhndl3("192.168.1.100", 8193, 1, out ushort h);
if (ret == 0) // Success ODBSYS sysinfo; ret = Focas1.cnc_rdcncinfo(h, out sysinfo); Console.WriteLine($"Connected to: sysinfo.cnc_type");
// Read Current Status (Running, Stopped, Alarm) ODBST status; ret = Focas1.cnc_rdstatus(h, out status); Console.WriteLine($"Machine State: status.status"); Focas1.cnc_freelibhndl(h); // Close connection
| Feature | FOCAS 2 | MTConnect | OPC-UA (on FANUC) | |---------|---------|-----------|--------------------| | Data model | Flat functions | Hierarchical XML/JSON | Object-oriented | | Push capability | No (polling) | No (polling) | Yes (Pub/Sub optional) | | Security | None (use IP allowlist) | Basic (HTTP auth) | Certificate + encryption | | Setup complexity | Low (library + port) | Medium (agent config) | High (certificates + models) | | Real-time position | Yes (≤50ms) | Limited by HTTP overhead | Yes |
In the modern manufacturing landscape, data is as valuable as the raw materials being cut or shaped. For shops running FANUC-controlled CNC machines (which constitute a significant majority of the global market), accessing that data has traditionally required a proprietary key. That key is FANUC FOCAS 2.
What is FOCAS 2?
FOCAS stands for FANUC Open CNC API Specification. Version 2 is the most widely adopted iteration of FANUC's official software library that allows external devices (computers, tablets, edge devices) to communicate directly with a FANUC CNC over an Ethernet network.
In essence, FOCAS 2 is a set of functions (APIs) that act as a universal translator. It converts the internal, complex memory structures of a FANUC controller into clean, usable data packets that external software can understand and manipulate.
How Does It Work?
FOCAS 2 operates on a client-server model using standard TCP/IP Ethernet:
Key Capabilities: What Can You Read and Control? fanuc focas 2
FOCAS 2 provides both passive monitoring and active control functions.
Data Retrieval (Monitoring):
Control Functions (Write Actions):
The Critical Distinction: FOCAS 1 vs. FOCAS 2
While often mentioned together, they serve different eras:
Why is FOCAS 2 a Big Deal for Industry 4.0?
FOCAS 2 is the foundational technology for virtually every Manufacturing Execution System (MES), IIoT platform, and predictive maintenance tool in a FANUC-based shop.
Implementation Challenges to Know
Despite its power, FOCAS 2 has quirks:
The Future: FOCAS 2 and MTConnect
FOCAS 2 is a low-level API. Higher-level standards like MTConnect (an XML-based manufacturing communication standard) often use FOCAS 2 underneath. An MTConnect agent running on an edge PC will use FOCAS 2 to pull data from the CNC, then republish it as standardized MTConnect streams for enterprise systems like SAP, Splunk, or Tableau.
Conclusion
FANUC FOCAS 2 is not a flashy consumer technology—it is a robust, industrial workhorse. For any manufacturer serious about digital transformation, FOCAS 2 is the essential bridge between the physical cutting action on the shop floor and the digital intelligence of the cloud. It turns a standard FANUC CNC from a "dumb" cutting machine into a smart, connected asset that can report its own health, productivity, and needs. Without FOCAS 2, a FANUC machine is blindfolded; with it, it becomes the most transparent piece of equipment on the floor. Technically, FOCAS 2 is a library of C-functions
FANUC FOCAS 2 (Fanuc Open CNC API Specifications) is a powerful application programming interface (API) that allows computer software to communicate directly with FANUC CNC controllers. It acts as a bridge, enabling real-time data collection and remote machine management by exposing the controller's internal data to external Windows-based applications. Core Capabilities of FOCAS 2
FOCAS 2 provides a library of functions for reading and writing machine data, which is essential for Industry 4.0 and IIoT (Industrial Internet of Things) implementations.
Axis and Spindle Data: Read absolute, relative, and machine positions, as well as actual feed rates and spindle loads.
Program Management: Remotely upload, download, search, and verify part programs or manage DNC (Direct Numerical Control) operations.
Maintenance & Diagnostics: Access alarm histories, operation logs, and diagnostic data to predict failures and minimize downtime.
Tool Management: Monitor and modify tool life data, tool offsets, and workpiece reference points.
PMC Interfacing: Read and write to the Programmable Machine Control (PMC) addresses, allowing software to interact with the machine’s ladder logic. Key Differences: FOCAS 1 vs. FOCAS 2
While both libraries serve similar purposes, they represent different generations of connectivity. Primary Connection HSSB (High-Speed Serial Bus) Ethernet (TCP/IP) and HSSB PC Hardware Requires a dedicated PCI/PCIe HSSB card No special hardware; works over standard LAN Network Support Point-to-point (proprietary cable) Fully routable via switches, routers, and VPNs OS Compatibility Legacy (up to Windows 7) Modern (Windows 8, 10, and 11) Controller Series Older 0i, 16i, 18i, 21i Newer 0i-F/MF and 30i/31i/32i families FANUC.FOCAS Tutorial Episode 1 What is FOCAS?
FANUC FOCAS 2 (Fanuc Open CNC API Specifications 2) is a specialized communication protocol and a set of library functions that enable high-level data exchange between a host computer (typically a PC) and FANUC CNC controllers. It serves as a bridge for industrial automation, allowing developers to create custom applications for real-time monitoring, data collection, and machine control. Architecture and Connectivity
FOCAS 2 is primarily composed of a set of Dynamic-Link Library (DLL) files that applications use to interact with the CNC. Communication is typically established through two main methods:
Ethernet (TCP/IP): The most common method, utilizing an embedded Ethernet port on the controller for standard network integration.
High-Speed Serial Bus (HSSB): A proprietary hardware-based connection that offers higher speeds and stability than standard Ethernet, often requiring a dedicated interface card. Core Functionality
The library allows for reading and writing a vast range of data, turning raw machine information into actionable insights. Key capabilities include: | Feature | FOCAS 2 | MTConnect |
Status Monitoring: Accessing real-time machine states such as running, idle, or alarm conditions.
Program Management: Uploading, downloading, and searching for CNC programs, as well as modifying macro programs.
Operational Data: Retrieving positional data (absolute, relative, machine), actual feed rates, and spindle speeds.
Tooling and Maintenance: Reading and writing tool life management data, tool offsets, and workpiece reference points.
Diagnostic Information: Collecting alarm history, operator messages, and waveform diagnosis data for maintenance. FOCAS 1 vs. FOCAS 2
While both libraries share similar functions, they are distinguished by their compatibility with specific CNC hardware and modern operating systems:
FOCAS 1: Targeted at legacy controls and older Windows environments (e.g., Windows 95 through XP).
FOCAS 2: Supports newer high-end controllers like the FS30i/31i/32i/35i series and modern 64-bit operating systems including Windows 10 and 11. How to Use Fanuc FOCAS to Collect Machine Data
In the noisy, chip-laden environment of a modern machine shop, the most critical evolution isn't happening at the cutting tool—it’s happening inside the control cabinet. As the manufacturing world races toward Industry 4.0, the bridge between the CNC machine and the digital enterprise relies on a singular, robust protocol: FANUC FOCAS 2.
FANUC FOCAS 2 (Factory Open Communication Adaptor System 2) is the official, industry-standard Application Programming Interface (API) and library set developed by FANUC Corporation. It enables external software applications to read from, write to, and monitor FANUC CNC (Computer Numerical Control) controllers over an Ethernet network. Essentially, FOCAS 2 turns a FANUC control into a data server, allowing seamless integration into Manufacturing Execution Systems (MES), IIoT platforms, predictive maintenance systems, and production monitoring dashboards.
While powerful, FOCAS 2 is not without friction.
The client writes tool wear offsets automatically based on measured part dimensions from an external gauge. It also reads tool life counters to trigger a tool change request.

Leave a Reply