FANUC FOCAS Nodes
FANUC FOCAS is FANUC's official API for reading and writing data on FANUC CNC controllers (0i, 16i/18i/21i, 30i/31i/32i families). MaestroHub connects to a FOCAS adapter gateway on the plant network — which links FANUC's fwlib32 library and reaches the control on TCP 8193 — and exposes read, write, and machine-status operations as pipeline nodes.
These nodes use a FANUC FOCAS connection profile. To start a pipeline when CNC values change, use the FANUC Trigger node instead.
Configuration Quick Reference
| Field | What you choose | Details |
|---|---|---|
| Parameters | Connection, Function, Function Parameters, Timeout Override | Select the FANUC FOCAS connection profile, the function to run, its parameters (with expression support), and optionally override the timeout. |
| Settings | Description, Timeout (seconds), Retry on Timeout, Retry on Fail, On Error | Node description, maximum execution time, retry behavior on timeout or failure, and error handling strategy. All execution settings default to pipeline-level values. |
All function parameters support expression syntax — {{ expression }} — to pull dynamic values from the pipeline context (for example {{ $trigger.result.values[0].value }} or {{ $node["Read"].result.values[0].value }}). Values resolved this way are then substituted into any function field marked as templatable (((paramName))) in the connection's function definition.
FANUC Read Node
Node type: connected.fanuc.read
Batch-read one or more FOCAS addresses (status, axis positions, spindle, feed, macros, PMC, alarms, and more) from a FANUC CNC. Per-item error isolation means one bad address returns an error for that item only — it never fails the batch or drops the connection.
Supported Function Types:
| Function Name | Purpose | Common Use Cases |
|---|---|---|
FANUC Read (fanuc.read) | Fetch current values for a list of FOCAS addresses | Snapshot run state and axis positions, sample a panel of macro variables, read PMC signals on demand |
Node Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
| Connection | Selection | Yes | FANUC FOCAS connection profile to use |
| Function | Selection | Yes | Read function from the selected connection |
| Function Parameters | Dynamic | Varies | Auto-populated from the function schema. See your FANUC connection functions for full parameter details. |
| Timeout Override | Number (seconds) | No | Override the default function timeout |
Function parameters for Read:
| Parameter | Type | Required | Description |
|---|---|---|---|
addresses | Array of strings | Yes | FOCAS addresses to read, e.g. axis.1.pos.abs, spindle.1.speed, macro.500, pmc.D.100.word |
Output Structure
{
"result": {
"values": [
{ "address": "status.run", "value": "EXECUTING", "ts": "2026-07-09T10:00:00Z" },
{ "address": "axis.1.pos.abs", "value": 123.456, "ts": "2026-07-09T10:00:00Z" },
{ "address": "spindle.1.speed", "value": 2000, "ts": "2026-07-09T10:00:00Z" },
{ "address": "axis.9.pos.abs", "error": { "code": "INVALID_ADDRESS", "message": "no such axis" } }
]
},
"_metadata": { "success": true, "functionId": "<function-id>", "durationMs": 42, "timestamp": "2026-07-09T10:00:00Z" }
}
| Field | Type | Description |
|---|---|---|
_metadata.success | boolean | true when the function executed without a connection-level error |
_metadata.functionId | string | ID of the executed function |
result.values | array | One entry per requested address |
result.values[].address | string | The requested FOCAS address |
result.values[].value | any | The read value (type depends on the address — number, string enum, or boolean). Present when the item succeeded. May be null for a vacant macro. |
result.values[].ts | string | Adapter timestamp for the value (present on success) |
result.values[].error | object | { code, message } — present instead of value when that item failed |
_metadata.durationMs | number | Execution time in milliseconds |
_metadata.timestamp | string | ISO 8601 / RFC 3339 UTC timestamp |
value and error are mutually exclusive per item. A single invalid or unsupported address returns an error object for that entry only; every other address in the batch still returns its value.
Access a value downstream with, e.g., $node["Read"].result.values[0].value.
FANUC Write Node
Node type: connected.fanuc.write
Write values to writable FOCAS addresses — macro variables (macro.<n>) and PMC memory (pmc.<area>.<addr>[.<type>]) in V1. Writes execute sequentially in request order with per-item success/error results; a write to a read-only address is rejected for that item only, without affecting the others.
Supported Function Types:
| Function Name | Purpose | Common Use Cases |
|---|---|---|
FANUC Write (fanuc.write) | Write macro variables and PMC memory | Set a macro used by the part program, toggle a PMC bit or write a PMC word, bulk-update a group of macros |
Node Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
| Connection | Selection | Yes | FANUC FOCAS connection profile to use |
| Function | Selection | Yes | Write function from the selected connection |
| Function Parameters | Dynamic | Varies | Auto-populated from the function schema. See your FANUC connection functions for full parameter details. |
| Timeout Override | Number (seconds) | No | Override the default function timeout |
Function parameters for Write:
| Parameter | Type | Required | Description |
|---|---|---|---|
data | Array of objects | Yes | List of { address, value } items to write |
data[].address | String | Yes | Writable FOCAS address (macro.* or pmc.*) |
data[].value | Number / Boolean | Yes | Value to write. May be a literal or a ((template)) that resolves from pipeline input at execution time. |
A write value can be dynamic. In the function definition set the value to ((setpoint)), then pass setpoint from the pipeline — e.g. bind it to {{ $trigger.result.values[0].value }}. Templated numeric values (like 34.34) and booleans (true / false) are coerced to the correct JSON type before they reach the adapter.
Output Structure
{
"result": {
"results": [
{ "address": "macro.500", "success": true },
{ "address": "pmc.R.10.bit2", "success": true }
],
"successCount": 2,
"failureCount": 0
},
"_metadata": { "success": true, "functionId": "<function-id>", "durationMs": 18, "timestamp": "2026-07-09T10:00:00Z" }
}
| Field | Type | Description |
|---|---|---|
_metadata.success | boolean | true only when at least one item was written and no item failed |
_metadata.functionId | string | ID of the executed function |
result.results | array | Per-item write results |
result.results[].address | string | The written FOCAS address |
result.results[].success | boolean | Whether this item was written successfully |
result.results[].error | object | { code, message } — present only when this item failed (e.g. READ_ONLY_ADDRESS) |
result.successCount | number | Number of items written successfully |
result.failureCount | number | Number of items that failed |
_metadata.durationMs | number | Execution time in milliseconds |
_metadata.timestamp | string | ISO 8601 / RFC 3339 UTC timestamp |
You are writing directly to machine control memory. Validate values before writing — add condition nodes to verify a value is within a safe range, and prefer writing to macros the part program reads rather than PMC signals that drive motion, unless you fully understand the ladder logic.
Browsing the catalog
There is no FANUC Browse node. The FOCAS data-point catalog is a discovery aid for building functions, not a pipeline step: open a FANUC Read, Write or Subscribe function form and use the Browse Catalog panel, which lists the catalog as a tree specialised to the connected controller (axis and spindle folders reflect its real counts). Leaf nodes are the addresses Read, Write and Subscribe take.
FANUC Status Node
Node type: connected.fanuc.status
Fetch a single MTConnect-shaped machine snapshot — run state, mode, motion, e-stop, alarm flag, spindle and feed actuals, and controller identity — in one call, so a dashboard gets a ready status object instead of composing a dozen reads.
Supported Function Types:
| Function Name | Purpose | Common Use Cases |
|---|---|---|
FANUC Status (fanuc.status) | One-call machine-status snapshot | Feed a machine-status tile, check run/mode/alarm state, drive an availability/OEE pipeline |
Node Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
| Connection | Selection | Yes | FANUC FOCAS connection profile to use |
| Function | Selection | Yes | Status function from the selected connection |
| Timeout Override | Number (seconds) | No | Override the default function timeout |
The Status function takes no parameters.
Output Structure
{
"result": {
"connected": true,
"cncHost": "192.168.1.50",
"cnc": { "series": "30i", "version": "G05.1", "cncType": "M", "axisCount": 3, "spindleCount": 1, "maxAxis": 32, "path": 1 },
"snapshot": {
"run": "EXECUTING", "mode": "MEM", "motion": true, "estop": false, "alarm": false,
"spindle": { "speed": 2500 }, "feed": { "actual": 1200 }
},
"stats": { "pollOverruns": 0, "focasCalls": 42, "avgCallMs": 12.4, "queueDepth": 0 }
},
"_metadata": { "success": true, "functionId": "<function-id>", "durationMs": 25, "timestamp": "2026-07-09T10:00:00Z" }
}
| Field | Type | Description |
|---|---|---|
_metadata.success | boolean | true when the snapshot was fetched |
_metadata.functionId | string | ID of the executed function |
result.connected | boolean | Whether the adapter is currently bound to the CNC. false mid-reconnect (then snapshot is omitted). |
result.cncHost | string | IP of the CNC the snapshot came from |
result.cnc | object | Controller identity — series, version, cncType (M/T), axisCount, spindleCount, maxAxis, path |
result.snapshot | object | Live machine state — run, mode, motion, estop, alarm, spindle.speed, feed.actual |
result.stats | object | Connection telemetry — pollOverruns, focasCalls, avgCallMs, queueDepth |
_metadata.durationMs | number | Execution time in milliseconds |
_metadata.timestamp | string | ISO 8601 / RFC 3339 UTC timestamp |
Run-state (run) values are STOPPED, HOLD, EXECUTING, MSTR, or UNAVAILABLE; mode values are MDI, MEM, EDIT, HANDLE, JOG, TEACH, DNC, REMOTE, or UNAVAILABLE.
Address Syntax
Read and write addresses use a dotted, case-insensitive syntax with no whitespace. <n> is a 1-based index (axis, spindle, macro number). The Browse Catalog panel in the connection's function forms exposes the full catalog as a tree with the controller's real axis/spindle counts filled in, so you rarely need to type addresses by hand.
| Pattern | Access | Example |
|---|---|---|
status.run · .mode · .motion · .estop · .alarm | read | status.run |
axis.<n>.pos.abs · .mach · .rel · .dtg | read | axis.1.pos.abs |
axis.<n>.load | read | axis.2.load |
spindle.<n>.speed · .load | read | spindle.1.speed |
feed.actual · override.feed · .spindle · .rapid | read | feed.actual |
macro.<n> | read / write | macro.500 |
pmc.<area>.<addr>[.<type>] | read / write | pmc.D.100.word, pmc.R.10.bit2 |
PMC areas: G F X Y A R T K C D E · PMC types: bit0–bit7, byte (default), word, dword, float. See the connector guide for the full catalog.
Settings Tab
All FANUC FOCAS node types share the same Settings tab:
| Setting | Type | Default | Description |
|---|---|---|---|
| Description | Text | — | Optional description displayed on the node |
| Timeout (seconds) | Number | Pipeline default | Maximum time the node may run before timing out |
| Retry on Timeout | Toggle | Pipeline default | Automatically retry the node if it times out |
| Retry on Fail | Toggle | Pipeline default | Automatically retry the node if it fails |
| On Error | Selection | Pipeline default | Error strategy: Pipeline Default (the pipeline's Error Handling setting), Stop Pipeline or Continue Execution |
When left at their defaults, these settings inherit from the pipeline-level execution configuration.
Reads and status calls are safe to retry. Be deliberate about retrying writes — a retried write repeats the value on the control. Prefer idempotent writes (setting an absolute value, not incrementing), and keep Retry on Fail disabled for writes whose repetition would be unsafe.