ThingConnect

OPC UA for CNC machine monitoring

What OPC UA is, how it works on a CNC control, which machines have it, and how ThingConnect uses it, without changing anything on the machine.

What OPC UA is

OPC UA (Open Platform Communications Unified Architecture) is an open standard that lets industrial equipment share its data with software. The machine runs an OPC UA server that publishes its data as a tree of named items. Software, such as a monitoring gateway, connects as a client and reads those items. It is maintained by the OPC Foundation, works the same way across brands, and has security built in.

  • Who uses it

    In one line
    CNC controls, PLCs, robots, and plant equipment such as washers, compressors and gauges
  • Default port

    In one line
    4840, with the address written as opc.tcp://<machine-ip>:4840
  • For monitoring

    In one line
    The client reads the machine's data. Monitoring doesn't change programs, settings or how the machine runs.
  • What it replaces

    In one line
    Classic OPC (OPC DA), which only ran on Windows, and older brand-specific interfaces that each needed their own software

How OPC UA works

OPC UA client

ThingConnect gateway

↓ opc.tcp://<machine-ip>:4840 ↑

OPC UA server · machine control

  • Machine
  • Status
  • Program
  • PartCount
  • Alarms
  • Spindle, Feed, Overrides
  1. 1The client connects to the machine's address, opc.tcp://<machine-ip>:4840, and asks which security settings the server accepts.
  2. 2Both sides agree on security and the client logs in: anonymously, with a user name and password, or with a certificate.
  3. 3The client opens a session and browses the address space: the machine's tree of named items.
  4. 4From then on, the client reads the items it needs. It can either ask for them on a schedule (reading) or ask the server to send changes (subscribing).

Every item in the tree has a Node ID, its unique address on that server, plus a name, a data type and a current value. A client that knows the Node IDs it needs can read them directly, without browsing the whole tree each time.

Key features of OPC UA

  • Platform-independent

    What it means
    Runs on Windows, Linux and embedded controllers. No dependence on one operating system, unlike classic OPC.
  • Security built in

    What it means
    Message signing, encryption, certificates and user login are part of the standard.
  • Information modelling

    What it means
    Data is published as structured objects with types and relationships, not loose numbers.
  • Interoperability

    What it means
    Any OPC UA client can talk to any OPC UA server, whatever the brand.
  • Read and write

    What it means
    Clients can read values and, where the server allows it, write them.
  • Subscriptions

    What it means
    A client can ask the server to report only the values that change.
  • Alarms and events

    What it means
    Servers can publish alarms and events with their own timestamps.
  • Scalable

    What it means
    The same standard runs on a small sensor, a CNC control or a plant-wide server.

Two ways to connect: client-server and PubSub

Client-serverMost CNCs

A client connects to one server, opens a session, and reads, browses or subscribes to its items. This is how CNC controls and most monitoring connections work today.

PubSubPart 14

Publishers send data out to any number of subscribers, without a session to each one. It runs over UDP on the local network or through a message broker such as MQTT. Defined in Part 14 of the OPC UA specification, and mostly used for fast machine-to-machine and machine-to-cloud data.

OPC UA connection settings

  • Default port

    Typical value
    4840 (registered for OPC UA). 4843 is registered for OPC UA over TLS.
  • Transport

    Typical value
    TCP (opc.tcp). HTTPS and WebSockets are also defined.
  • Address format

    Typical value
    opc.tcp://<ip-address>:4840, for example opc.tcp://192.168.1.100:4840
  • Encoding

    Typical value
    UA Binary on opc.tcp; JSON and XML are also defined
  • Security mode

    Typical value
    None, Sign, or Sign & Encrypt
  • Login

    Typical value
    Anonymous, user name and password, or certificate
  • Data address

    Typical value
    Node ID: a namespace number plus an identifier, for example ns=3;s=…

The exact address, port and security settings depend on how the server is set up on the machine. The control's network settings show them.

OPC UA security, in plain terms

OPC UA is one of the few industrial protocols designed with security from the start. Three settings decide how a connection is protected:

  • Security mode

    Options
    None · Sign · Sign & Encrypt
    What it means
    None sends messages as they are. Sign proves each message wasn't changed. Sign & Encrypt also hides the content from anyone on the network.
  • Security policy

    Options
    For example Basic256Sha256
    What it means
    The strength of the cryptography used for signing and encryption. Newer policies are stronger; both sides must support the same one.
  • Login

    Options
    Anonymous · User name and password · Certificate
    What it means
    Who the client is. Many controls switch from anonymous to user name and password as soon as a password is set on the control.

With signing or encryption on, the client and the server each present a certificate, and each side must trust the other's. On a closed plant network, many controls run with security mode None. We match whatever the control and your IT policy require.

“Has OPC UA” is not the same as “useful data”

OPC UA standardizes how data is shared. Whata machine publishes depends on its builder. That is why two machines that both “have OPC UA” can be very different to monitor.

Standard machine-tool modelsumati

The OPC Foundation publishes companion specifications that fix what a machine tool should publish: OPC 40501 Machine Tools (the basis of umati) and OPC 40502 CNC Systems. A machine built to them reports state, program, overrides and counts in the same shape whatever the brand.

Maker-specific layoutsOwn model

Many controls publish their own tree instead. Brother's D00, for example, publishes its data under its own names, and the meaning of each field has to be mapped once. We do that mapping, so it looks the same on the dashboard as any other machine.

A practical example: what a CNC publishes over OPC UA

A machining centre with an OPC UA server might publish items like these. Names and layout vary by builder; the values are for illustration.

  • Machine state

    Example value
    Running
    What it tells you
    Whether the machine is cutting, idle or in alarm
  • Mode

    Example value
    Automatic
    What it tells you
    Automatic, manual (jog) or edit
  • Active program

    Example value
    O1234
    What it tells you
    Which job is running
  • Part count

    Example value
    152
    What it tells you
    Parts made since the counter was last reset
  • Spindle speed

    Example value
    8000 rpm
    What it tells you
    Actual spindle speed
  • Feed override

    Example value
    100%
    What it tells you
    Whether the operator has slowed the feed
  • Tool in spindle

    Example value
    T05
    What it tells you
    Which tool is cutting
  • Active alarm

    Example value
    None
    What it tells you
    Alarm number and message when one is raised

A monitoring client reads these items and turns them into live status, downtime, part counts and OEE.

OPC UA compared with Modbus TCP, MTConnect, FOCAS and MQTT

  • How it talks

    OPC UA
    Client-server and PubSub
    Modbus TCP
    Client-server
  • Security

    OPC UA
    Built in: signing, encryption, certificates, login
    Modbus TCP
    None in the protocol itself
  • Data

    OPC UA
    Named, typed, structured items
    Modbus TCP
    Numbered registers and coils
  • Alarms and events

    OPC UA
    Supported
    Modbus TCP
    Not part of the protocol
  • Default port

    OPC UA
    4840
    Modbus TCP
    502
  • Best for

    OPC UA
    Machines and equipment with rich data
    Modbus TCP
    Simple devices: meters, drives, sensors
  • OPC UA

    What it is
    Open standard, client reads a server on the machine
    Where you meet it
    Newer CNC controls, PLCs, plant equipment
    For monitoring
    Rich and secure; depth depends on what the builder publishes
  • MTConnect

    What it is
    Open, read-only standard made for machine tools
    Where you meet it
    Haas NGC, Okuma (App Store adapter), Mazak SmartBox
    For monitoring
    Same vocabulary across brands; read-only by design
  • FOCAS

    What it is
    FANUC's own data interface
    Where you meet it
    FANUC controls
    For monitoring
    The deepest data on FANUC; FANUC only
  • MQTT

    What it is
    Lightweight publish-subscribe messaging
    Where you meet it
    Sensors, edge devices, IoT converters
    For monitoring
    Moves data well but says nothing about what the data means

Which CNC controls have OPC UA

  • Brother CNC-D00

    OPC UA on the control
    Built in; switched on in the control's Ethernet settings. Running in production with ThingConnect.
  • Brother CNC-C00

    OPC UA on the control
    No OPC UA. Connected over FTP instead.
  • Siemens SINUMERIK ONE, 840D sl, 828D

    OPC UA on the control
    Siemens' own OPC UA server (Access MyMachine / OPC UA)
  • Heidenhain TNC 640-class

    OPC UA on the control
    OPC UA NC Server option, umati-aligned. Not on older TNC controls.
  • Okuma OSP-P (newer)

    OPC UA on the control
    Factory OPC UA server on newer OSP-P500M / P700A machines
  • Mazak SmartBox 2.0

    OPC UA on the control
    OPC UA through Mazak's SmartBox 2.0, alongside MTConnect
  • Older controls

    OPC UA on the control
    Usually none. They connect through FOCAS, MTConnect, FTP or digital I/O.

Even on a control that offers OPC UA, the server may need a licence or option switched on. We check it on every machine in the site survey.

Free tools to test an OPC UA server

Before an installation, a maintenance engineer can check a machine's OPC UA server from a laptop on the same network:

  • UaExpert (Unified Automation)

    What it does
    Connects to an OPC UA server, browses its tree and shows live values. Free download.
  • Prosys OPC UA Browser

    What it does
    A free client for browsing servers and reading values, on Windows, Linux and macOS.

If you can connect, browse the machine's items and see values change while it runs, the server is ready for monitoring.

How ThingConnect uses OPC UA

  • Where the client runs

    How it works
    On the ThingConnect gateway inside your plant. Machines never connect to the internet.
  • What it reads

    How it works
    Machine state, program, part count, alarms, spindle, feed and overrides: whatever the control publishes
  • Effect on the machine

    How it works
    Monitoring doesn't change programs, settings or how the machine runs.
  • Security

    How it works
    Matches what the control accepts: security mode, and anonymous or user name and password login
  • If the connection drops

    How it works
    The gateway reconnects on its own. On controls that keep their own history, such as Brother D00, the gap is filled from the machine's record.
  • To the cloud

    How it works
    One secure outbound connection from the gateway; nothing connects into your plant

Setup checklist for an OPC UA machine

  1. 1Switch on the OPC UA server on the control (and its licence or option, if the builder needs one).
  2. 2Give the control a fixed IP address on the plant network.
  3. 3Allow the gateway to reach the control on port 4840 (or the port the control shows).
  4. 4Choose the security mode and login the plant's IT policy needs; we match it on the gateway.

Common OPC UA errors, and what they mean

  • BadIdentityTokenInvalid (“Endpoint does not support the user identity type provided”)

    What it usually means
    The client tried anonymous login, but the control now only accepts a user name and password. We hit this on a Brother D00 after an FTP password was set on it.
    Fix
    Log in with the user name and password set on the control.
  • BadCertificateUntrusted / BadSecurityChecksFailed

    What it usually means
    Signing or encryption is on, and one side doesn't trust the other's certificate yet.
    Fix
    Trust the gateway's certificate on the control, and the control's on the gateway.
  • Connection times out

    What it usually means
    The OPC UA server is switched off, or port 4840 is blocked between the gateway and the machine.
    Fix
    Switch the server on in the control's settings; open the port on the network switch or firewall.
  • BadTooManySessions

    What it usually means
    The control allows only a few clients at once, and another program is already connected.
    Fix
    Close the unused session, or let the gateway be the one client that shares the data.

A mixed fleet is normal. OPC UA machines sit next to FANUC on FOCAS, Brother C00 on FTP, and older machines on digital I/O. All of them land on the same dashboard.

Frequently asked questions

OPC UA (Open Platform Communications Unified Architecture) is an open standard for industrial equipment to share data with software. The machine runs an OPC UA server that publishes its data as a tree of named items; software such as a monitoring gateway connects as a client and reads them.

4840 is the standard port, registered for OPC UA, and the connection address looks like opc.tcp://192.168.1.30:4840. Some machine builders use a different port, which the control's network settings will show.

Newer controls increasingly do: Brother's CNC-D00, Siemens SINUMERIK, Heidenhain TNC 640-class controls with the OPC UA option, and newer Okuma OSP-P machines, for example. Older controls usually don't, and connect through FOCAS, MTConnect, FTP or digital I/O instead.

Yes. OPC UA can sign and encrypt every message, uses certificates so each side knows who it is talking to, and supports a user name and password per connection. Monitoring doesn't change programs, settings or how the machine runs.

Not always. OPC UA defines how data is shared, not what is shared. Two machines can both 'have OPC UA' and publish very different data. Machines built to the standard machine-tool data models (umati, OPC 40501 and OPC 40502) publish a predictable set; others publish the maker's own layout, which needs mapping.

OPC DA is the older 'classic' OPC, tied to Windows and its COM/DCOM technology. OPC UA replaced it with one platform-independent standard that runs on any operating system, works over ordinary TCP networks, and has security built in.

Connect to it from a laptop on the same network with a free OPC UA client such as UaExpert or Prosys OPC UA Browser. If you can browse the machine's items and see values change while it runs, the server is working.

See it live

See live OPC UA data from a machine like yours, in the demo, not after the contract.