How to establish OPC UA communication between HMI Designer(Client) and iC9200 Controller(Server)
| Version Number | Description |
|---|---|
| 1.0 | First draft |
|
|
|
This application note explains how to set up OPC UA communication between HMI designer (client) and iC9200 controller (server) .
1. Supported Components
| Component Name | Version |
|---|---|
| iC9200 series | ≥ 2024.3.1 |
| iCube Engineer | ≥ 2024.3 |
| HMI Designer | ≥ Version: 4.5.2 build: 272 |
2. Supported Libraries
All libraries are supported.
3. Solution details
3.1 Introduction
This note describes the steps to create a project in HMI Designer (OPC UA Client) and establish OPC UA communication with the iC9200 (OPC UA Server).
3.2 Setting up the OPC UA Server (iC9200).
- Go to the OPC UA tab under the project tree and change the Basic Settings in the Server Settings tab.
- Set the Security settings in the server settings
- Create variables and enable OPC to share the variables on the OPC UA Server
- Save the project and then write and start the project.
3.3 Create a new user in iCube and download the Self-signed certificate
Creating a new user is not mandatory, but it is recommended that access be limited to HMI or external users. This is recommended for safety reasons, as the HMI should not have administrator rights to the controller.
- Login to the iC9200
Controller
WBM as admin.
- To create a new user, go to Security → User Authentication → Add User
-
Edit the user with the following roles:
- Certificate Manager
- Service
- Data Viewer
- Data Changer
-
After creating a new user, log out as admin from the WBM and log in as the new user.
-
Download the OPC UA self-signed certificate from the identity store.
This certificate is required in the HMI designer to connect to the OPC UA server of the iC9200 Controller.
Note:
It is recommended to create a new user account. Using the admin login may cause issues with establishing communication with the OPC UA Client. While it is possible to import tags in the HMI designer, there may be problems with tag communication.
3.4 HMI designer project and importing tags from the OPC UA server
- Create a new project in HMI Designer.
- Select the Protocols tab under Configuration in the project tree.
And add a new protocol for OPC UA Client as shown below.
- After adding the OPC UA client add the OPC UA server information.
Use the IP address to connect to the server.
- After completing the OPC UA client information, go to the Tags tab and select Import Dictionary.
This dictionary will save the tags imported from the OPC UA Server.
-
After clicking the "Import Dictionary" button, a pop-up will open to select the type of tag importer.
Select "Hierarchical" type to import tags, then click the "OK" button.
- Select the Security settings and provide Authentication settings.
Ensure that you upload the certificate downloaded from the controller to the "Client Certificate" field.
Note: Browsing for tags may need to be attempted twice. If the first attempt results in an error, close the error and attempt to browse for tags again.
- When browsing the tags from the server, the request to accept the Server trust certificate is received. The server certificate can be accepted temporarily or permanently according to user requirements.
Note:
Clicking "Accept permanently" will not prompt you with acceptance options for any new or different certificates added to the project.
-
- After accepting the certificate, all the tags can be imported from the server.
Select the tags required to be added to the dictionary and click OK
Note: Selecting all checkboxes will import many variables. Avoid selecting checkboxes you do not need for your HMI project.
- Select/click the tags you would like to use in the HMI project.
- Import tags using the Import tags button. The tags become dark in color when the import is successful. The ones that are not imported remain grey.
3.5 Project example: Create a new Page and add the imported tags in HMI Designer.
- Create a Page under the Pages tab in the Project tree.
- Add a button and label from the Widgets library and link the tags imported from the server.
- Press F12 or go to the Run tab and run the HMI simulator.
- After starting the HMI Simulator, go to simulator settings and uncheck the 'Use Simulation' Mode, this will update the tag values to the values shared by the OPCUA Server.
- After unchecking the 'Use Simulation' mode, the tag values are updated in the HMI Simulator.