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.
| Lessons | 9 |
|---|---|
| Time | about 66 minutes |
| Prerequisites | A2 |
| Cost | Free: 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
Read more than the Value attribute8 min
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
-
2
Take a DataValue apart8 min
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
-
3
Read the status code instead of ignoring it7 min
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
-
4
Choose which timestamp you trust7 min
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
-
5
Write a value without a type mismatch7 min
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
-
6
Respect AccessLevel before you write6 min
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
-
7
Read and write arrays and array ranges7 min
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
-
8
Call a method8 min
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
-
9
Batch operations without hitting a limit8 min
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
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 →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.