Ai-OPs
ai-ops.com
Docs
/
Tags
/

Creating an OPC-UA Tag

Creating an OPC-UA Tag

After creating a tag on an OPC-UA device, you need to tell Koios which node in the OPC-UA server this tag represents. You can configure these fields during creation or afterwards on the tag's Configuration tab.

Protocol Fields

Namespace

The namespace URI published by the server for the part of its address space the node belongs to. Not an index.

  • Example (standard OPC-UA namespace): http://opcfoundation.org/UA/
  • Example (a server's own application namespace): urn:MyPLC:Server or http://examples.freeopcua.github.io

The value must match one of the URIs in the server's namespace array exactly. Koios looks the string up in that array when it reads the tag, so a value the server does not publish fails with "Namespace not found on the OPC-UA server".

The node browser fills this in automatically, which is the safest way to get it right.

Identifier

The node's identifier within its namespace. This is the specific address of the data point you want to read or write.

  • The format depends on the Identifier Type. It could be a number, a string path, a GUID, or a byte string
  • Example (numeric): 1001
  • Example (string): Boiler.Temperature.PV

Identifier Type

The format of the node's identifier.

TypeDescriptionExample
NumericAn integer node ID, most common for device data points1001
StringA human-readable string path, common in simulation servers and some PLCsBoiler.Temperature.PV
GUIDA globally unique identifier72962B91-FA75-4AE6-8D28-B404DC7DAF63
ByteStringA raw byte string identifier, rare in practice
  • Default: String

Data Type

The expected data type of the node's value. Koios uses this to correctly interpret the raw bytes returned by the server.

Data TypeDescription
BooleanTrue/false
Int16 / UInt1616-bit signed/unsigned integer
Int32 / UInt3232-bit signed/unsigned integer
Int64 / UInt6464-bit signed/unsigned integer
Float32-bit floating point
Double64-bit floating point
StringText value
DateTimeTimestamp

These are the types you will use for almost every data point. The dropdown on the Configuration tab offers the full set of OPC-UA variant types — including Null, SByte, Byte, GUID, ByteString, XmlElement, NodeId, ExpandedNodeId and StatusCode — for nodes that need them. The create form offers a shorter list still — everything in the table above except Int64 and UInt64, which are only available on the Configuration tab.

Using the Node Browser

The OPC-UA node browser connects to the server in real time and lets you navigate the address space visually.

  1. Open the tag's Configuration tab and click Browse
  2. The browser displays the server's node tree as expandable folders
  3. Navigate to the node you want and select it
  4. The Namespace, Identifier, Identifier Type, and Data Type are all populated automatically
  5. Click Apply to save the selection

Timestamp Source

By default, Koios records each reading with the time the data collector read the value. Some OPC-UA servers also publish a source timestamp (the time the value was actually produced or sampled), which can be earlier than when Koios reads it. This matters for backdated signals such as lab results that are reported hours after the sample was taken.

OptionTimestamp recorded
Collector TimeWhen Koios read the value. The default, and the behavior of every existing tag.
Source TimestampThe value's OPC-UA source timestamp, its true production or sample time.

With Source Timestamp, a value that arrives late but carries an older source time is stored in history at that original time instead of the moment it was read. This keeps late-arriving lab or batch results aligned with the process data they describe. This setting appears only on OPC-UA tags, and if the server does not provide a valid source timestamp for a value, Koios records the collector time for that reading instead.

When a reading on such a tag fails, Koios keeps the time of the last reading the tag took rather than recording the time of the failed attempt. A tag on Source Timestamp therefore stays on the server's clock whether it is reading or failing, and a tag that has stopped reading never appears more recently updated than one that is working. A tag that has not yet read successfully has no earlier time to keep, so its first failure is recorded at the collector time.

Read Status and Quality

Every OPC-UA reading arrives with a status saying how far the server vouches for the value. Koios applies one rule to every OPC-UA tag, with no per-tag setting:

Server statusTagWhat the tag reports
GoodRunningThe reading, with the status name as its quality
UncertainRunningThe reading, plus a warning naming the status and any low or high limit the value has reached
Bad, reporting the data itself bad: a sensor or device failure, a point out of service, a value out of range, lost communication between the server and its data source, or a configuration problem on the server or its data sourceFailedError code 107, with the status name, limit, and code in the error detail
Bad, for any other reason, such as a node that does not exist or a read the server does not permitFailedError code 106, with the status name and code in the error detail
Good or Uncertain, but no value sentFailedError code 105

A bad status fails the tag even when the server sends a value with it, because a bad status carries no usable value; the error detail quotes the value that was sent. Test on the Configuration tab applies the same rule, so an uncertain reading passes and names its status. See Bad, Missing, or Frozen Tag Values for what each code means and how to fix it.

After Configuration

  1. Save the tag configuration
  2. Test the tag: click
    Test
    to verify Koios can read a value from this node (see Testing a Tag)
  3. Enable the tag: flip the enable switch to start collecting data