OPC UA Client
In Client mode inSCADA connects to OPC UA servers (a PLC, a DCS, a gateway, another SCADA and so on) to read and write node values.
Step 1: creating the connection
Section titled “Step 1: creating the connection”| Parameter | Example | Description |
|---|---|---|
| Protocol | OPC UA | The protocol |
| IP Address | 192.168.1.100 | The OPC UA server’s IP address |
| Port | 4840 | The OPC UA port (default: 4840) |
| Server Name | (empty) | The server’s discovery name (optional) |
| Timeout | 5000 ms | The request timeout |
| Security Mode | SignAndEncrypt | None, Sign or SignAndEncrypt |
| Security Policy | Basic256Sha256 | None, Basic128Rsa15, Basic256, Basic256Sha256, Aes128_Sha256_RsaOaep |
| Anonymous Auth | false | Authenticate anonymously |
| Username/Password Auth | true | Authenticate with a user name and password |
| Username | operator | The user name |
| Password | •••• | The password |
| Encoding Type | Binary | Binary, Xml or Json |
| HTTPS Enabled | false | Use the HTTPS transport |
| HTTPS Port | 443 | The HTTPS port (when HTTPS is on) |
Certificates
Section titled “Certificates”When the security mode is Sign or SignAndEncrypt, inSCADA generates a client certificate by itself. On the first connection the OPC UA server may reject it — the certificate has to be trusted on the server side.
The certificate files are kept in <user_home>/opc-ua/client/security/.
Step 2: creating the device
Section titled “Step 2: creating the device”| Parameter | Example | Description |
|---|---|---|
| Base Path | PLC_1 | The base path in the node tree (for grouping) |
| Scan Time | 1000 ms | The polling interval |
| Scan Type | PERIODIC | PERIODIC or FIXED_DELAY |
Step 3: creating frames
Section titled “Step 3: creating frames”| Parameter | Example | Description |
|---|---|---|
| Path | Channel1.Device1 | The frame’s path in the node tree |
A frame represents a branch point in the OPC UA address space. It is used to group related nodes.
Step 4: creating variables
Section titled “Step 4: creating variables”| Parameter | Example | Description |
|---|---|---|
| Namespace Index | 2 | The node’s namespace index |
| Identifier Type | String | Numeric or String |
| Identifier | PLC1.Temperature | The node identifier |
| Type | Float | The data type |
| Is Array | false | Whether the variable is an array |
| First Dimension Index | 0 | The array’s first dimension index |
| Second Dimension Index | 0 | The array’s second dimension index |
Example node IDs
Section titled “Example node IDs”| What it is | Namespace | Identifier type | Identifier | Node ID |
|---|---|---|---|---|
| Temperature | 2 | String | PLC1.Temp | ns=2; s="PLC1.Temp" |
| Pressure | 2 | Numeric | 1001 | ns=2; i=1001 |
| Status | 3 | String | Sensor1.Status | ns=3; s="Sensor1.Status" |
Array variables
Section titled “Array variables”If a node on the OPC UA server holds an array, mark Is Array = true and fill in the dimension indexes. This is used above all for multi-dimensional structures such as historical data blocks and parameter sets.
Step 5: starting the connection
Section titled “Step 5: starting the connection”Start the connection from the Runtime Control Panel. inSCADA will:
- Discover the OPC UA endpoint
- Pick the endpoint matching the security settings
- Validate the certificate
- Create the session
- Begin reading periodically
The connection status will show “Connected”.
Browsing
Section titled “Browsing”inSCADA can browse the OPC UA server’s address space to discover the nodes available. That makes finding the right node IDs easier while you are defining variables.