Skip to Content

OPC UA

OPC UA (Open Platform Communications Unified Architecture) is the modern standard for industrial communication. Most modern PLCs have an OPC UA server built in, for example Siemens S7-1200/1500, Beckhoff and B&R. If your machine has an OPC UA server, this is usually the best way to get data out of it: it is secure, structured and needs no changes to the PLC program.

OPC UA

Basics

An OPC UA server organizes its data in nodes. A node can be a folder, a machine part or a value. Every value you want to read, for example the speed of the line, is a node.

Each node has a Node ID, consisting of:

  • A namespace: a number that groups nodes, for example all nodes of the PLC program.
  • An identifier: the name or number of the node itself. This can be a text ("Line1".Speed), a number, a Guid or a Base64 value.

You don’t have to know the Node IDs by heart: UpBlue can browse the server and show you all available nodes.

💡

The OPC UA server must be enabled on the PLC. On a Siemens PLC for example, this is a checkbox in the TIA Portal project. Ask your machine builder or system integrator if you are not sure.

Create a Connection with OPC UA

Name connection

A connection is created within an organisation. Go to the UpBlue Management Environment to open an organisation.  Go to the connection page to create a connection. You can also create a connection from the collector page. This will automatically attach the connection to the collector. You can always detach the connection after and attach it to a different collector.

Click in the connection or collector page on:

Choose the Local source and select the OPC UA connection type. Give the connection a name. This name is only for identification and can be changed later.

Click on:

Labels

Labels tell UpBlue where the data of this connection comes from. The Enterprise and Site labels are prefilled. Fill in the location as far as it makes sense: Area, Cell, Unit. Labels are optional and can be overridden per rule. Read more about labels.

⚠️

Think carefully about the labels you choose! Changing them later will have effect on your dashboards! Read more about this here.

Create Connection

Click on: to create the connection. The connection will open.

Connection details

Fields

Connection name

This is the name given earlier when creating the connection. This is only for identification in the UpBlue Management Environment.

Address

The address of the OPC UA server, usually the IP address of the PLC with port 4840. For example: 192.168.0.10:4840.

No need to add opc.tcp:// or another prefix. The right prefix will be used automatically.

⚠️

If you use a prefix, the connection will not work.

⚠️

Don’t forward any ports in your router! The collector runs locally and the connection will run and test locally on the Collector. Use a local IP address or hostname.

Don’t know the address? Click next to the Address field. The Collector checks the standard OPC UA ports on its own machine and on the hosts it has already talked to, and lists each server with its name, address and strongest security setting. It also tells you how a server was found: on the Collector itself, as a known host, or announced over mDNS. Click Use on a row to fill in the address, then save the connection. The icon works once the connection is attached to a Collector that is online.

💡

The Collector does not scan the network: a PLC it has never talked to may be missing. You can always type its address yourself.

Auth method

How UpBlue logs in to the server:

  • Anonymous (default): no login. Many PLCs allow this within the local network.
  • Username: log in with a username and password configured on the server.

Security policy and Security mode

OPC UA can sign and encrypt all traffic. The policy (the encryption standard) and mode must match what the server allows.

Leave both on Auto (default). UpBlue will negotiate the best security the server supports. Only set a specific policy (None, Basic128Rsa15, Basic256, Basic256Sha256) and mode (None, Sign, Sign and Encrypt) if the server requires it.

Not sure what the server supports? Click next to Security policy. The collector asks the server which security settings it offers and shows them in a list: the policy, the mode, the server’s own security level (higher is stronger) and the login methods it accepts. Recommended marks the setting UpBlue uses when both fields are on Auto. Click Use on a row to fill in the fields, then save the connection. The list also shows the server’s name and its certificate with the expiry date. The icon works once the connection is attached to a collector that is online and the address is filled in.

💡

The list shows what the server offers, not whether the server trusts the collector. Use Test connection to check that.

When the server requires certificates, a certificate and private key can be uploaded on the connection.

💡

Connection refused with security errors? Many OPC UA servers must first trust the client certificate. Check the trust list on the server or PLC and accept the UpBlue Collector certificate there.

Test connection

When all fields are set, click on: to test the connection. A new window will open that will display the result. If the connection is ok, proceed by making a rule.
💡

If the button is gray, first attach a collector. If there are no collectors available, first install a collector. For more details, see the collector installation page.

Browse the server

The easiest way to create rules is to browse the server.

Click on:

UpBlue asks the OPC UA server for all its nodes and shows them as a tree, live from your factory. Navigate to the value you want to collect and create a rule from it. The namespace and identifier are filled in automatically.

Rules

A rule reads one node (one value) from the OPC UA server and turns it into a tag.

Fields

Name

The name is only used for identification in the UpBlue Platform.

Tag

The tag name, for example speed or temperature. Read more about tags.

Namespace

The namespace number of the node.

Type and Identifier

The identifier of the node and its type: Integer, String, Guid or Base64. When the rule is created via Browse Server, these are filled in automatically.

Poll rate

The time between measurements, in seconds.

Transform values

Transformations clean and convert the values of this rule before they are stored: deduplication, counters, timers and more. Read all about transformations here.

Labels

You can override or add labels per rule. Read more about this here.

Test rule

By clicking on this button: the rule will be tested.

A new window will open with the test results, read live from the server.