How to configure an iCube Controller as an OPC UA client
| Version Number | Description |
|---|---|
| 1.0 | Basic description of steps to configure an iCube controller as an OPC UA client |
1. Supported Components
| Component Name | Version |
|---|---|
| iC9200 series | ≥ 2024.3.1 |
| iCube Engineer | ≥ 2024.3 |
2. Supported Libraries
All libraries
3. Solution details
In this app note, we are using two iC9200 controllers, one as an OPC UA client and the other as an OPC UA Server.
Initial steps on OPC UA Server Device
The following steps explain the OPC server settings required to be set:- Open the Web Based Management (WBM) site by browsing to the IP address of the PLC.
- Select the System Services item from the Configuration menu.
- Activate the OPC UA Serverservice if it is not enabled already.
- Press the Apply and reboot button if necessary.
- Open iCube Engineer.
- Create a new project with the iC9226 controller.
- Set the IP address of the controller in the project.
- Open OPC UA à Server Settingsand set the following settings:
- Change the DNS name/ IP address to the server IP address. This information will be included in the OPC UA Server security certificate.
- Set visibility of variables to Marked.
- Uncheck the function to use the trust store for client authentication. This is required for initial setup and can be changed later if required
Create variables and download a self-signed certificate from the Server device
-
Mark the OPC tag in the variables list that the OPC UA server will expose
- After finishing the OPC Server setting open the WBM site for the server controller again.
- Go to Certificate Authentication under the Security menu.
- Open the Identity Store and download the OPC UA self-signed Certificate.
Settings on theOPC UA Client Device
Please follow the below steps to set up the client device:
- Open the Web Based Management (WBM) site by browsing to the IP address of the PLC.
- Select the System Services item from the Configuration menu.
- Activate the OPC UA Client serviceif it is not enabled already.
- Press the Apply and reboot button if necessary.
- When the reboot is complete, log back into the WBM site and select the Certificate Authentication item from the Security menu.
- Select the Identity Stores tab.
- Download the Certificate from the OPC UA Client self-signed Identity Store. The Key Pair does not need to be downloaded.
Exchange certificates between Server and Client device
- Upload the
server certificate
in the trust store of the client WBM. This certificate must be uploaded in the
OPC UA Client
section of the trust store.
2. Upload the
self-signed certificate downloaded from the client
into the
OPCUA configurable
section of the server.
3. Reboot both the controllers.
Variable Mapping in Client project
- First, add the server’s name and IP address as shown in the below image.
-
- Then add the subscribe variable group to read the variable from the server.
- To take the value of the remote variable identifier, we must use the UA expert.
- With UA expert establish the communication with the OPC UA server.
- Copy the Node ID from the UA expert and paste it into a remote variable identifier. Also, make sure that the Remote Variable namespace selected is the "*/iCubeControl.com*
- For example, the node ID can be seen when you click on the variable name and go to the attributes
- Write the project to the client controller and the Mapped variables should be updated by the server variable values.