Course A3 · Foundations

Read, write, call

The three verbs that do most of the work, and the DataValue they all revolve around. This course covers attributes, Variant typing, reading the status code you got back rather than ignoring it, writing without provoking a type mismatch, and calling methods.

Lessons9
Timeabout 66 minutes
PrerequisitesA2
CostFree: written lessons open, video and labs need a free account

What you will be able to do

  • You can read any attribute of any node, not just its Value.
  • You can explain what a DataValue carries besides the number.
  • You can write a value without triggering a type or access-level failure.
  • You can call a server method and handle its output arguments.

Syllabus

  1. 1
    Read more than the Value attribute

    DataType, ValueRank, AccessLevel, EURange, EngineeringUnits. The attributes that tell you how to treat the value you are about to read.

    Asset A full attribute dump of one analogue variable from a real server

    8 min
  2. 2
    Take a DataValue apart

    Value, StatusCode, SourceTimestamp, ServerTimestamp. Four fields, and three of them routinely thrown away by client code that then cannot explain its own data.

    Asset Raw DataValue output showing all four fields, including one with a non-Good status

    8 min
  3. 3
    Read the status code instead of ignoring it

    Good, Uncertain and Bad are a contract. What to do with UncertainLastUsableValue before it silently poisons an average.

    Asset A read returning UncertainLastUsableValue, and the wrong average it produces if ignored

    7 min
  4. 4
    Choose which timestamp you trust

    SourceTimestamp versus ServerTimestamp, TimestampsToReturn, and what to do when a PLC only populates one of them.

    Asset The same subscription with both timestamps recorded, showing the drift between them

    7 min
  5. 5
    Write a value without a type mismatch

    Int16 is not Int32, a scalar is not a one-element array, and ValueRank matters. Why most first writes fail and how to make the second one work.

    Asset Four failed writes with the exact status code each produced, then the corrected calls

    7 min
  6. 6
    Respect AccessLevel before you write

    Read-only nodes, write-only nodes, and servers that accept a write and discard it, which the umati sample server does deliberately.

    Asset A write to the umati server that returns Good and changes nothing, with the read-back proving it

    6 min
  7. 7
    Read and write arrays and array ranges

    IndexRange, partial array writes, and the off-by-one that makes an index range look like a server bug.

    Asset An array read with three different IndexRange expressions and their results

    7 min
  8. 8
    Call a method

    Input and output arguments, the Executable attribute, and how a method failure differs from a call failure.

    Asset A method call against the Milo demo server with its input and output arguments printed

    8 min
  9. 9
    Batch operations without hitting a limit

    Reads and writes take arrays. Server limits on operations per call, and why one big request beats a thousand small ones right up until it does not.

    Asset A batched read of 500 nodes versus 500 single reads, with both timings and the server's limit

    8 min

Lab

Free account required

Start a local server with one command, write a value to it, read it back, and then deliberately provoke a type mismatch and a not-writable failure so you recognise both.

Unlock the lab →
Specification background

Last verified 7 September 2026 against OPC UA 1.05.07. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.

Free download
OPC UA Server Acceptance Test Pack
A 40-check acceptance test you run against a vendor's server before commissioning sign-off. Weighted scoring, three hard gates, and a one-page verdict for the supplier meeting.
Get the free test pack →
Free, no course, no login