timohei.net / Opintojaksot / Opintojaksot / Automaatiojärjestelmien perusteet / Valmet DNA (MetsoDNA) How-to / OPC UA: Valmet DNA (Client), Siemens PLC (Server) /
This HTML version contains the same information as before, presented using only basic HTML tags.
Prerequisites
On Siemens S7-1200
- CPU firmware V4.4 or newer supports OPC UA server functionality.
Modeling the S7-1200 OPC UA Server interface in TIA Portal - OPC UA runtime license must be assigned in TIA Portal.
Enabling the OPC UA server on S7-1200 PLC - CPU time must be correct for certificate validity.
Enabling the OPC UA server on S7-1200 PLC
On Valmet DNA
- DNA OPC UA Client installed with valid licenses.
- TIF Interconnect configured correctly.
- Tag configuration file created (for example DUxx.txt).
- Certificate handling configured (strong security off for first connection).
Configure Siemens S7-1200 as OPC UA Server
Steps in TIA Portal:
- Select the CPU in your project.
- Open Properties → OPC UA → Server.
- Enable the OPC UA server by checking the activation box.
- Assign the OPC UA runtime license under Runtime Licenses.
Enabling the OPC UA server on S7-1200 PLC - Set the endpoint address (typically opc.tcp://<IP>:4840). Siemens uses port 4840 by default.
- Configure security mode and authentication according to your requirements.
- Model the OPC UA namespace: select which PLC tags to expose to OPC UA clients.
- Download the project to the PLC to start the OPC UA server.
Enabling the OPC UA server on S7-1200 PLC
Test Siemens OPC UA Server
You can connect with UaExpert to opc.tcp://<PLC-IP>:4840, accept the PLC certificate, and verify tag visibility. This approach follows the testing principles also described in Valmet DNA’s OPC UA documentation.
Configure Valmet DNA as OPC UA Client
DNA OPC UA Client Configuration
Use the DNA System Configurator to configure the client. Key settings include:
- Server IP: Siemens PLC IP address.
- Server port: 4840.
- Security mode: Must match the Siemens server setting.
- User credentials: Required if Siemens server authentication is enabled.
- Server certificate file name: Leave empty for first connection so DNA fetches it automatically.
- Strong security: Set to false for first connection, then true afterwards.
Tag Configuration File (DUxx.txt)
Maps Siemens OPC UA nodes to Valmet DNA ports. Basic syntax:
<OPC_UA_NodeID> <OPC_UA_Type> <DNA_Tag> <DNA_Type>
Mandatory watchdog line:
ns=0;i=2258 UtcTime ua:DUxx-STATUS.TIME binev
Example: Siemens tag "MyDB.Temperature" mapped to DNA:
ns=3;s=MyDB.Temperature Float pr:MYTEMP ana
Watchdog Loop
Valmet DNA requires a loop that monitors the OPC UA server by observing the OPC UA time variable configured above. If the value stops updating, the connection is marked as failed.
Starting DNA OPC UA Client
Start TIF Interconnect, then start the OPC UA Client. Use DNA's diagnostics tools to verify proper operation.
Certificate Handling
First connection:
- Set DNA client strong security to false so Siemens certificate is automatically trusted.
After successful trust:
- Enable strong security and restart the DNA OPC UA Client.
If Siemens requires DNA client certificates: Import DNA’s client certificate from the PKI directory into Siemens trust list.
Firewall Requirements
- Open TCP port 4840 (Siemens OPC UA server default).
- Ensure routing between DNA OPC UA Client and PLC network is possible.
Validation
- Watchdog updates regularly.
- DNA tags successfully read/write S7-1200 variables.
- No certificate alarms appear.
- DNA diagnostics show active session and subscriptions.
Summary
- Activate and configure Siemens OPC UA server.
- Model the tags you want to expose in TIA Portal.
- Test using UaExpert.
- Configure DNA OPC UA Client with matching security settings.
- Map Siemens NodeIDs to DNA ports in DUxx.txt.
- Start DNA OPC UA Client and confirm communication.
