OPC UA
The OPC UA integration runs in process inside cms-api (the node-opcua library, pure
JavaScript) — no native SDK and no separate microservice, unlike SAP.
Connection
Register an OPC UA server under External Connections: endpoint, security policy and credentials. Test the connection before configuring the collection.
Collection — OPC_UA_TRIGGER
CMS watches a trigger tag and fires when its value changes. It is event-driven: there is no scheduled polling.
Typical use: the PLC writes 1 to an “order ready” tag; CMS detects it, reads the associated data
tags and forwards the message to the ERP.
Browsing tags on the server
Typing the NodeId by hand is where most mistakes happen — and the error only shows up later, when the Collection comes up “connected” and never receives anything. That is why the tag fields have the Browse tags on the OPC UA server popup, which reads the address space of the External Connection’s own server:
| Where | How it opens | What it does |
|---|---|---|
| Collection: Read Tags | Browse server button, next to Add tag | Tick several tags and add them at once |
| Delivery: Write Tags | Browse server button | Same |
| Collection: Trigger NodeId | Magnifying glass next to the field | Single choice: one click on the tag fills the field |
| Delivery: Trigger NodeId (Permission), of the gate | Magnifying glass next to the field | Single choice |
Browsing starts at Objects and goes down one folder at a time, with the path at the top to go back. At
each level the server’s folders and tags appear first and, last, the nodes of the OPC UA standard itself
(Server and the like). Each tag shows its DataType (Double, Int32, Boolean…), which helps
check whether the trigger value or the value to write matches it.
- The alias of each added tag is suggested from the display name, already in a format that works in
{{alias}}and in JSON. Adjust it afterwards, in the list itself. - A tag that is already in the list shows as already in list and is not added twice.
- A level with more than 1,000 items is cut off, with a warning: use Filter this level.
The popup only appears for those with access to the External Connections screen, and only when the Application has an OPC UA External Connection. Browsing runs in the engine (the worker), the same process that keeps the trigger subscription: it reaches what the Collection will reach — the plant network and the OPC UA server of the Simulators. Each level opens a short session and closes it right after; nothing is left hanging on the server.
Delivery — OPC_UA_WRITE
Writes values to OPC UA server tags from the message data — the path from the ERP back to the shop floor.
Writing changes the state of real equipment. Delivery goes through the write permission gate — keep it enabled in production. With the gate configured and its connection down, the write is refused, not released.
Testing without a PLC
The Simulators screen ships a built-in OPC UA server, with named tag profiles (one per simulated PLC). You can validate triggers and writes end to end before having access to the equipment.
A dropped connection raises the CONEXAO_OPCUA_PERDIDA alert.