Connecting a PLC using OPC UA Connector¶
Use OPC UA Connector to connect a PLC to your Industrial Edge environment.
To connect Industrial Edge to your environment, you need three main components:
- The OPC UA Connector to read data from your PLC and translate it to MQTT.
- The Databus App to run on your IE Device, act as a central data broker, and store data configurations for your individual applications.
- The IIH Essentials App to implement a digital representation of your machine and make the data accessible via a REST API for further processing.
Two additional apps are used during the process for convenience:
- The Databus Configurator App in the IEM instance.
- The Common Configurator App to provide a user interface for IIH Essentials and to add data sources to OPC UA Connector.
The figure below highlights the roles of the different applications and components.

Prerequisites for connecting a PLC using OPC UA Connector¶
Software requirements
- You have completely set up your Industrial Edge environment.
- You have installed the required IE Apps on your IE Device, including the OPC UA Connector app.
- You have installed Databus Configurator in IEM.
- You know the communication path of your PLC.
- You have installed TIA Portal.
Hardware requirements
- A PLC device that supports data transfer via OPC UA.
- An RJ45 Ethernet cable when using VMware and a virtual IE Device.
Enabling the OPC UA server in TIA Portal¶
TIA Portal is Siemens engineering software for programming and managing automation devices. Activate the OPC UA server in TIA Portal to use the OPC UA Connector app on the PLC.
- Open TIA Portal.
- In the "Device" column, click the PLC you wish to enable. Click "Device Configuration".
- Click "OPC UA" > "Server" > "General".
-
Under "Accessibility of the Server", select "Activate OPC UA server".

-
Click "OPC UA" > "Server" > "Security".
-
Under "Security policies available on the server for the secure channel", select "No security".

NOTICE
Using "No Security" for OPC UA Connector is not recommended for production. Use certificates for cybersecurity best practices.
Configuring the network interfaces for IE Devices to connect to OPC UA Connector¶
The network interfaces for physical IE Devices are configured as part of the onboarding process. Additional steps are required to allow connections between the PLC and a virtual IE Device.
If you are using a physical IE Device, proceed to Adding your PLC as an OPC UA data source.
To configure a virtual IE Device, follow the matching conditional steps.
Conditional steps
Create a virtual adapter in Hyper-V. Bridge the virtual adapter to the physical adapter on your machine to establish communication between the PLC and the virtual IE Device.
Next, apply the virtual adapter to your virtual IE Device.
Creating and mapping a virtual network adapter
-
Open Hyper-V. The library contains a virtual machine for the virtual IE Device.

-
In the right sidebar, click "Virtual Switch Manager". The "Virtual Switch Manager" window opens.

-
In the left sidebar, select "New Virtual Network Switch".
- Choose type "External".
- Click "Create Virtual Switch".
-
Click "OK".

-
Choose a name for your virtual switch.
- Select "External network". A drop-down menu appears.
- Select the network adapter you want to use.
- Select "Allow management operating system to share this network adapter".
- Click "Apply".
-
Click "OK".

-
Read the warning message shown in the figure below. Click "Yes".

Applying the virtual network adapter to the virtual machine
- Select the VM named "IndustrialEdgeVirtualDevice".
-
In the right sidebar, click "Settings". A drop-down menu appears.

-
Select the newly created switch.
- Click "Apply".
-
Click "OK".

Hyper-V displays the virtual network adapters when the connection is successful.

Proceed to Setting up the network connection for the virtual IE Device and OPC UA Connector.
Bridging the physical network adapter to the virtual machine
Use an Ethernet cable to bridge the physical network adapter directly to the virtual machine with VMware.
Proceed as follows:
- Connect the PLC to your laptop using an RJ45 Ethernet cable.
- Open VMware Workstation.
- In the Virtual Machine window, click the Player button in the top-left corner.
-
Navigate to "Manage" > "Virtual Machine Settings". The Virtual Machine Settings dialog opens.

-
Select "Network Adapter 2".
- Change the network connection setting from "NAT" to "Bridged".
-
Select "Replicate physical network connection state".

-
Click "Configure Adapters". The "Automatic Bridging Settings" dialog appears.
- Select "Intel® Ethernet Connection (10) 12L9-LM". Clear all other options.
-
Click "OK" to confirm the changes.
NOTICE
The virtual machine default network adapter is Network Address Translation (NAT), which does not allow external devices to communicate with Industrial Edge Management. Change the adapter type to "Bridged" to allow external devices to communicate with Industrial Edge Management.
Proceed to Setting up the network connection for the virtual IE Device and OPC UA Connector.
Create and configure the virtual network adapter based on your specific infrastructure and communication requirements with ESXi.
- In the left navigation pane, select the newly created IEVD VM, and then click "Edit". The "Edit Settings" popup appears.

-
Click "Add network adapter".

-
For the "New Network Adaptor" field, select the adapter to the network that contains the PLC you want to connect to the IEVD.

-
Check the "Connect" checkbox so the adapter is ready after VM startup.

-
Review the adapter settings, then click "SAVE". ESXi saves the configuration.
Setting up the network connection for the virtual IE Device and OPC UA Connector¶
- Open the web browser on your local computer.
- Enter the IP address of the IE Device with HTTPS, for example
https://<ip address>. The screen displays the IE Device UI login screen. - Log in to the device UI.
- Click "Settings" from the left navigation pane. The "Settings" page opens.
- Click "Connectivity".
-
Click "LAN Network".

-
Click the pencil icon next to the network adapter
ens32to modify its network settings.
-
Uncheck the "DHCP" checkbox.
-
Enter a static IP address and netmask for the interface. The static IP address should be in the same subnet as the PLC.

For a PLC with the IP address
192.168.236.127, enter the following values to ensure connectivity between the virtual IE Device and the PLC:- IPv4 (Static IP for the virtual IE Device):
192.168.236.129 - Netmask:
255.255.255.0 - Gateway:
192.168.236.1(if applicable)
- IPv4 (Static IP for the virtual IE Device):
-
Click "Update" to save the changes.
Adding your PLC as an OPC UA data source¶
Use the Common Configurator App to configure an OPC UA data source and set up the OPC UA communication channel to the PLC for data acquisition.
- In the device UI, click "Apps" from the left navigation pane. The "Apps" page opens.
-
Click the "Common Configurator" tile. The "Common Configurator" UI opens.

-
Click "Get Data" from the left navigation pane. A list of configuration apps appears.
- Click "Connector Configuration". The "Get Data" page opens.
-
Under "Installed Connectors", click "OPC UA Connector".

-
Click "Add". The "Add Data Source" page opens.

NOTICE
The OPC UA Connector is the interface between the PLC and the IE Device. It must be configured with the PLC IP address and other PLC data. Once configured, the connector can browse the PLC data points.
-
Define the following information:
- Communication Protocol: OPC UA (OPC Server)
- Communication Protocol: Select "Add manually"
- Name: Can be freely chosen
- OPC UA Server URL:
opc.tcp://<ip address of PLC> - IP port number:
4840 - Message Security Mode: None
- Security Policy: None
- Authentication mode: Anonymous

NOTICE
This tutorial does not select security policies or authentication because it focuses on testing. Using "No Security" for OPC UA Connector is not recommended for production. Use certificates for cybersecurity best practices.
NOTICE
More information about the settings is available in the OPC UA Connector documentation.
-
Click "Save". OPC UA Connector activates the configuration.
- Click the "Log Messages" tab. The OPC UA Configurator logs open.
-
Check the logs for the message "Connection established to [connector name]." to ensure the connection is established.
![Check the logs for the message "Connection established to [connector name]." to ensure the connection is properly established.](assets/06_get_started_connectors/opc_ua_add_data_source_log_message.png)
Configuring OPC UA Connector data source tags¶
Tags are data points that you wish to fetch from the IE Device. Once the OPC UA Connector data source is created, add and configure the IE Device tags to complete the connector configuration process.
Adding tags for OPC UA Connector¶
- In the OPC UA Connector page of the device UI, click the "Tags" tab. The "Tags" page opens.
-
Click "Browse tags".

-
Click "Start browse". OPC UA Connector lists all available tags.

-
Select the checkboxes for the tags you want to import from the IE Device via OPC UA Connector.
-
Click "Add to Data Source". OPC UA Connector adds the tags.

-
To return to the "Tags" tab, click "Back".
Configuring tags for OPC UA Connector¶
- In the OPC UA Connector page of the device UI, click the "Tags" tab. The "Tags" page opens.
-
Click the pencil icon in the "Actions" column for a tag. The tag becomes editable.

-
Under "Acquisition cycle", select the preferred acquisition cycle. Siemens recommends an acquisition cycle of 1 second.

Publish to the Databus
OPC UA Connector always publishes to Databus. Therefore, you do not need to select this option like with other connectors.
-
Click the green tick icon to confirm.

-
Repeat steps 2-4 to configure more tags.
Bulk edit
Use the "Bulk edit" button to apply the same settings to multiple tags at once.

-
Click "Deploy". OPC UA Connector activates the configuration with the selected tags.
OPC UA Connector displays the pop-up "Deployment was successful" to indicate that the tags were configured successfully.

Validating the outcome¶
Review the log messages for any errors.
You have now connected Industrial Edge to your environment.
What's next?¶
Proceed to Creating an asset model.