OPC UA
There is no server to add. Nothing is configured, no node is created in the project tree, and no port is chosen. The server is part of the runtime, and what decides whether it runs, and what is in it, is written in your PLC code.
An attribute on the variable, and nothing else
Section titled “An attribute on the variable, and nothing else”A variable is published by carrying an attribute:
{attribute 'OPC.UA.DA' := '1'}gSpindleSpeed : REAL;Three keys mean the same thing, and any of them will do:
OPC.UA.DA | the one to reach for |
OPC.UA.EXPORT | accepted |
OPC.UA.ENABLED | accepted |
The key is read without regard to case, and the value is true when it is 1, true, yes
or on. Anything else is false.
Marking nothing does not give you an empty server. It gives you no server
Section titled “Marking nothing does not give you an empty server. It gives you no server”This is the part that surprises people who have come from a system where the server runs and you choose what to put in it. Here the marking is what starts it.
On start, the runtime reads the symbols your build produced and asks one question: does
anything in here carry an OPC.UA. property at all? If nothing does, the server is not
started, and the log says so:
OPC-UA server disabled: no OPC.UA metadata in <symbols file>So a machine whose logic carries no attribute has no OPC UA endpoint to connect to. That is not a fault to chase on the network.
There is a second way to reach the same state. If your code carries the flags but every one
of them is false, the server is off. A '0' is not “publish it as read-only”; it is “do not
publish anything on my account”, and if it is the only flag in the project, the server does
not come up.
What a client connects to
Section titled “What a client connects to”The endpoint is the runtime’s own, on port 4840 unless the installation was given another.
The address space is the PLC: your symbols, under one node, alongside the rest of what the
control publishes.
Where to go next
Section titled “Where to go next”- PLC: where the attribute is written.
- Building & Deploying a Project: what the build produces, and how the symbols reach the target.