TIA OPC-UA

Configuring OPC-UA server in TIA Portal

To activate an OPC UA server:
  • Go to Device configuration from Project tree from left side.

  • Set the view to Device view

  • Click on the PLC image and open Properties

  • Go to OPC UA -> Server -> General

  • Under Accessibility of the server, check the option Activate OPC UA server to activate it.

  • In case a security pop-up appears, accept it (click OK).

  • Find Runtime licenses in the same window (Properties)

  • Under Type of purchased license, select SIMATIC OPC UA S7…

  • Go back to OPC UA -> Server -> General

  • Copy the server address.

Note

Write down (and copy it) the complete server address of the PLC. Please DO NOT forget opc.tcp and port number!

This information will be needed later when a client (for example UA Expert, Prosys OPC UA Browser or Siemens NX MCD ) tries to communicate to the PLC over OPC UA.

Note

The OPC-UA server will not work if license is not set properly.

../../_images/OPCUA_r.PNG

Fig. 53 Activating OPC UA server

Warning

FOR THIS MODULE, PLEASE DO NOT CHANGE ANY MORE SETTINGS.

Danger

Be careful in setting security for the OPC-UA server when working on REAL PROJECTS.

Here, you are not working on hazardous equipment, hence No Security option under Properties -> OPC UA -> Server -> Security is enabled. Learn more in user manual before changing these settings.

Creating OPC-UA Server Interface

To add a server interface, perform the following steps:
  1. Select the PLC name from the Project tree.

  2. Expand the and select OPC UA communication

  3. Select Server interfaces and expand it

  4. Click on Add new server interface and rename the interface created

  5. From the Add new server interface pop-up, select Server interface and click OK

  6. Add the tags required to be monitored or to be modified using OPC Client. You will have to drag the tags from OPC UA elements to server interface

  7. Upload the changes to the PLC

../../_images/opc_server_interface.png

Fig. 54 OPC-UA Server Interface

Note

Keep the PLC connected with LAN cable.

  • When uploading any hardware changes, keep the PLC in STOP mode and in offline mode. i.e., Online -> Stop CPU & Online -> Go offline

  • When uploading only software changes, you can keep PLC in Online mode.

Danger

Be cautious in setting access of variable. You should not provide open access to all variables (tags).

Set the access in Default Tag Table

../../_images/opc_tag_access_specifiers.png

Fig. 55 Default Tag Table