NEXT HMIDocs
Data / Connecting to data

Connecting to data

A datasource is a named connection with a tree of variables under it. Connect to a PLC over OPC-UA with the guided wizard, or use a static datasource to mock values while you design. Then browse the address space into a tree your pages can bind to.

The datasource browser: every folder and tag under a connection, with per-variable enable checkboxes, data types and access.
The datasource browser: every folder and tag under a connection, with per-variable enable checkboxes, data types and access.

Connect to a PLC with the OPC-UA wizard

The connection wizard walks three steps — Connection, Sign-in, Sync — and can discover a server's endpoints for you.

  1. Enter the server address — On the Connection step, type the endpoint — opc.tcp://192.168.1.10:4840 (or just host:port). Give the datasource a name like LinePLC; that name becomes the prefix in every binding (LinePLC:…).
  2. Discover endpoints (optional) — Click Discover endpoints instead and then Discover. NEXT HMI queries the server and lists each endpoint with its security policy, mode, and accepted user tokens. Pick one — the most secure is preselected — and its security settings fill in for you.
  3. Choose how to sign in — On Sign-in, pick Anonymous or Username & password. The wizard offers only what the chosen endpoint actually accepts.
  4. Test, then create — On Sync, hit Test connection — a green Connected — <server name> confirms it. Create the datasource; it starts connecting immediately, and you can jump straight to Browse variables.

Under the hood an asyncua client pool handles the session. For encrypted endpoints, certificates are configured afterwards in the datasource's Security settings.

Design offline with a static datasource

No PLC handy? Add a static datasource and define variables by hand. Pick a simple type for each and NEXT HMI stores a representative OPC-UA type behind it, so your bindings behave exactly as they will against a live server — then swap the source later without touching a single widget.

Browse the address space into a tree

Open the datasource and browse. Each variable is recorded with its real OPC-UA data type, whether it's writable, and (for arrays) its length. Variables live in a tree of four bindable shapes plus organising folders:

Node What it is Binds as
Scalar A single value. one number / string / bool…
Array A scalar repeated N times. the whole array, or one element by index
Struct A folder that holds variables — a named group. the whole object, or a member by path
Struct array A struct repeated N times. the array of objects, or one struct
Folder Pure organisation (only folders inside). not bindable

OPC-UA's many numeric types collapse to five simple ones at the HMI boundary — every Int16/UInt32/… becomes Integer, every Float/Double becomes Float — so a widget field never sees a wire type. Next: bind and subscribe →