Tutorial: Connect a Device
Connect an OPC-UA server, model a piece of equipment as tags, and verify live values.
You will need: a running QUBIQ with a super-admin or editor login, and an OPC-UA server you can reach. Time: ~20 minutes.
Step 1 — Discover the endpoint
Rather than guessing the security combination the server supports, ask it.
Connections → New connection → OPC-UA → Discover, and enter the base URL
(opc.tcp://192.168.1.10:4840).
The response lists every endpoint the server advertises, with its security mode, policy and certificate. Pick one — the form fills itself in.
Servers usually advertise a different endpoint URL per security level. This is why "works with
None, fails with SignAndEncrypt" is so common, and why discovery is the reliable route.
Step 2 — Create the connection
| Field | Value |
|---|---|
| Name | PLC1 |
| Endpoint | From discovery |
| Security mode | None for now |
| Security policy | None for now |
| Username / Password | If the server requires them |
Click Test. Green means QUBIQ reached the endpoint and authenticated. Save.
We will tighten security in step 6 — prove reachability first, so a later failure has one obvious cause.
Step 3 — Browse the address space
Open the connection and choose Browse. QUBIQ walks the server's address space and shows the node tree with data types.
Find the equipment you want to model and note its NodeIds. Browse results carry the data type, which
means QUBIQ can pre-fill your tags correctly instead of you guessing between int32 and float.
Step 4 — Build the namespace
Namespace → New → Folder. Build the structure as the plant is laid out, not as the network is:
Site1/
Line1/
Filler/
Motor1/
Then create tags inside Motor1:
| Name | Data type | Unit | Description |
|---|---|---|---|
Speed | float | RPM | Motor 1 shaft speed |
Current | float | A | Motor 1 stator current |
Running | boolean | Motor 1 running feedback | |
Fault | boolean | Motor 1 fault |
Write the descriptions. They appear in pickers, tooltips and the AI assistant's context, and they are the difference between a model someone else can use and one only you understand.
Step 5 — Bind the tags
For each tag: Binding → Add binding.
| Field | Value |
|---|---|
| Connection | PLC1 |
| Address | The NodeId from browse — or pick it from the tree |
| Polling mode | subscribe |
| Sampling rate | 1000 ms |
| Deadband | 0 for now |
Save, and confirm Enabled is on.
Within a second or two the namespace shows live values with Good quality.
If quality is not Good
| Quality | Meaning | Check |
|---|---|---|
NotFound | The address does not exist | Typo, or the PLC program changed. Browse to confirm. |
Bad | Read failed | Data-type mismatch, or insufficient rights on the node |
Uncertain | Suspect | The server is reporting a degraded source |
Step 6 — Turn on security
Now that data flows, secure the link.
- Discover again and pick a
SignAndEncrypt/Basic256Sha256endpoint. - Trust the server certificate — discovery returns it; trusting records its thumbprint, and a substituted certificate will then fail rather than silently connect.
- Get QUBIQ trusted by the server. Most servers reject an unknown client on the first attempt and place its certificate in a rejected list. Move it to the trusted store on the server and retry. This is normal and happens once.
- Test, and confirm tags return to
Good.
Step 7 — Tune
Now make it efficient.
Deadbands. Set 0.5–1% of span on the analogue tags. This removes sensor noise from the network, the historian and every screen at once.
Speed eng 0–3000 RPM → deadband 5 RPM
Current eng 0–50 A → deadband 0.1 A
Sampling rates. Match the value's real dynamics, not the maximum possible:
Speed 1000 ms changes continuously
Current 1000 ms changes continuously
Running subscribe changes rarely; push is free
Fault subscribe changes rarely; latency matters
Stale-after. For subscription tags, set stale-after to a few times the expected update interval. A value that never changes is otherwise indistinguishable from a dead link.
Scaling. If the server sends raw counts rather than engineering units, configure raw/eng ranges on the tag — once, here, instead of in every widget.
Step 8 — Verify
- All four tags show
Goodquality - Values change as the equipment runs
- The connection is healthy in the Connections list
- Security is
SignAndEncryptand still working - Deadbands and sampling rates are set deliberately
- Descriptions and units are filled in
What comes next
| Next | Why |
|---|---|
| Build a dashboard | Put these tags on a screen |
| Alarm on a tag | React when Fault goes true |
| User-defined types | Do the next nineteen motors in minutes |
| Log data to SQL | Get this data into a report |
You have just defined the shape of "a motor". Turn it into a UDT now and the rest of the plant is parameters, not clicks. → User-defined types