Write a client and a server
The same twelve tasks, implemented four times: Python with asyncua, Node with node-opcua, C# with the OPC Foundation reference stack, and C with open62541. Learning the shape once means you can read any OPC UA SDK afterwards.
| Lessons | 10 |
|---|---|
| Time | about 80 minutes |
| Prerequisites | A4, and one of Python, JavaScript, C# or C |
| Cost | Free: written lessons open, video and labs need a free account |
What you will be able to do
- You can write a working client in at least one of four languages.
- You can write a minimal server that exposes a typed variable and a method.
- You can map an unfamiliar SDK onto the twelve tasks you already know.
- You can choose a stack for a project and defend the choice on real constraints.
Syllabus
-
1
Choose a stack on real constraints8 min
Licence, language, embedded target, PubSub support, certifiability and who supports it commercially. Not on which one has the nicest README.
Asset A comparison table of the four stacks with pinned versions, licences and real limitations
-
2
Connect and browse in four languages9 min
The same operation four times, so the pattern separates from the syntax.
Asset Four runnable programs producing the same browse output against the same server
-
3
Read and write in four languages8 min
Where each SDK puts typing, and how each surfaces a status code.
Asset Four programs writing the same value, with each SDK's error on a deliberate type mismatch
-
4
Subscribe in four languages9 min
Callback shapes, async models, and where each SDK exposes the parameters that matter.
Asset Four subscription programs with their delivered output side by side
-
5
Handle certificates in four languages8 min
Each stack's PKI directory conventions and helper APIs: the part of every SDK that is documented worst.
Asset The PKI setup code and folder layout for each of the four stacks
-
6
Reconnect properly8 min
Backoff, subscription transfer, and the state a client must keep to recover without losing data.
Asset A client surviving three server restarts, with its reconnect log
-
7
Write a minimal server9 min
Expose one typed variable, one method and one event. Enough to test a client against.
Asset A working minimal server in each of the four stacks, with a client reading from it
-
8
Add a type to your server8 min
Registering an ObjectType and instantiating it, so your server is browsable rather than flat.
Asset A server exposing a custom type with two instances, browsed in UaExpert
-
9
Instrument and log usefully7 min
What to log at each layer so that a support ticket contains the answer. Most OPC UA logs are useless.
Asset A log format with real lines from a failed and a successful connection
-
10
Test without a PLC6 min
Simulation servers, containers, and how to build a repeatable test rig for OPC UA code in CI.
Asset A docker-compose rig with a simulated server and a test suite that runs against it
Lab
Free account required
Implement the same subscription in two of the four languages, point both at the same server, and confirm they deliver identical values with identical timestamps.
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.