FANUC FOCAS to OPC UA
Give every FANUC CNC an OPC UA address space: PLCGateway reads the control over FOCAS Ethernet and serves status, spindle, alarm and program data from its own OPC UA server.
- FANUC FOCAS
focas- OPC UA
Most MES, SCADA and historian products expect OPC UA, while FANUC controls offer FOCAS. PLCGateway bridges the two: the FOCAS driver reads the control directly on port 8193, and each value becomes a variable in the gateway's OPC UA server that clients browse, read and subscribe to.
This also works for controls without FANUC's own OPC UA server option, such as Series 0i-D or 16i/18i/21i with an Ethernet board, and all machines of the shop appear under one endpoint with the same structure.
- Source
- FANUC FOCAS
focas - Connection
- FOCAS Ethernet · TCP 8193
- Target
- OPC UA
- Writing
- yes
Set it up in five steps
Enable the embedded Ethernet port of the CNC and FOCAS (port 8193) in the Ethernet settings of the control.
Add a FOCAS device with the IP address of the CNC.
Create the tags (status, positions, spindle, alarms, macros) or let an AI assistant create a standard machine set.
Open Gateway → OPC UA and choose the security modes and whether clients sign in anonymously or with user name and password.
Connect your OPC UA client (UaExpert, an MES, a SCADA) to opc.tcp://<gateway>:4840 and browse Objects → PLCGateway.
Example: node ids in the OPC UA server
A device with the id cnc1 and these tags appears in the address space as shown below. Names and values are examples.
| Tag | Address | Example value |
|---|---|---|
Running | status.running | true |
SpindleSpeed | spindle.speed | 8000 rpm |
SpindleLoad | spindle.load | 42 % |
Program | prog.main | 1234 |
AlarmActive | alarm.has | false |
OPC UA node ids
opc.tcp://<gateway>:4840
Objects / PLCGateway / cnc1
ns=1;s=cnc1.Running = true
ns=1;s=cnc1.SpindleSpeed = 8000
ns=1;s=cnc1.SpindleLoad = 42
ns=1;s=cnc1.Program = 1234
ns=1;s=cnc1.AlarmActive = false
Every tag is a variable under Objects / PLCGateway / device in namespace 1; clients read it, write it and subscribe to its changes.
The OPC UA server in PLCGateway
Every tag becomes a variable in PLCGateway's built-in OPC UA server, so MES, ERP, SCADA and historians use one standard endpoint instead of each controller's own protocol. Clients browse the devices and tags, read, write and subscribe to value changes.
The server offers the security modes None, Sign and SignAndEncrypt with automatically generated certificates; clients sign in anonymously or with user name and password.
- One endpoint (opc.tcp, port 4840) for all devices and protocols
- A folder per device and a variable per tag, with description and unit
- Subscriptions with data-change notifications; writing only where the tag allows it
- Client certificates are approved in the web interface
Controllers and devices
Equipment that is typically connected with this driver.
Questions and answers
Does the CNC need the FANUC OPC UA server option?
No. PLCGateway reads the control over FOCAS and provides the OPC UA server itself. Controls that do have the option can be connected with the OPC UA client driver instead.
What do the nodes look like?
Each CNC is a folder under Objects / PLCGateway and each tag a variable with the node id ns=1;s=<device>.<tag>, for example ns=1;s=cnc1.SpindleLoad, with its description and unit.
Can OPC UA clients write to the CNC?
Macro variables can be written when writing is allowed in the OPC UA server settings; all other FOCAS values are read only.
Connect your machines
Tell us which controllers you run; we show you PLCGateway with your own addresses.
Product and model names are trademarks of their owners. They are named only to show which equipment the drivers communicate with; PLCGateway is not affiliated with these companies.
