Skip to main content
Skip table of contents

Siemens PCS 7 Process Historian

.NET AGENT

Overview

The OPC-UA connector enables Seeq to access data from Siemens PCS7 Process Historian. Note that the OPC-UA connector provides connectivity to a variety of historical data via the OPC Foundation's standard Unified Architecture protocol.

Prerequisites

Server certificates

OPC-UA uses TLS for security - both a client (the connector) and a server (the historian) have certificates that must be trusted by the other for the connector to function.

When the connector attempts to open a communication channel with a historian, it sends its certificate to the historian, which then checks if it trusts the connector’s certificate. Similarly, the historian will send the connector its certificate, and the connector will check if it trusts the historian’s certificates. Each program checks the received certificate against those it trusts, and refuses the connection if it doesn’t find a match. This process is known as a handshake.

A simple way to accomplish this trust between the connector and the historian is to place the historian’s certificate into the connector’s trusted certificates folder, and place the connector’s certificate into the historian’s trusted certificates folder.

Connector certificate

The OPC-UA connector is configured to store certificates within the Seeq data folder at keys/opc-ua. There, you’ll find three subfolders (client, trusted, rejected) which are generated the first time the connector starts up. The connector’s certificate can be found at keys/opc-ua/client/certs. The historian’s certificate can be placed in keys/opc-ua/trusted (and may show up in keys/opc-ua/rejected if an attempt to connect was made).

Siemens PCS 7 Process Historian certificate

This historian keeps its certificates at C:\Program Files (x86)\SIEMENS\ProcessHistorian\bin\PKI\CA. There, you’ll find three subfolders (private, certs, rejected). The connector’s certificate can be placed in the C:\Program Files (x86)\SIEMENS\ProcessHistorian\bin\PKI\CA\certs folder (and may show up in C:\Program Files (x86)\SIEMENS\ProcessHistorian\bin\PKI\CA\rejected\certs if an attempt to connect was made previously). The historian’s own certificate can be found in C:\Program Files (x86)\SIEMENS\ProcessHistorian\bin\PKI\CA\certs with a name of the form Siemens OPC UA Server for Process Historian [XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX].der.

Configuration

This is an example configuration template that is displayed in the Additional Configuration box that appears when you click Configure for an existing datasource (or if a new datasource is being created, in the Create new datasource connection modal that appears after clicking Add Datasource) on the Datasources administration page.

CODE
{
    "URL": "opc.tcp://localhost:4852",
    "Username": null,
    "Password": null,
}
Siemens PCS7 Process Historian Additional Configuration

Property Name

Default Value

Data Type

Description

URL

opc.tcp://localhost:4852

String

The server URL field must be of the format opc.tcp://HOSTNAME:PORT where HOSTNAME is the hostname of the computer running the historian, and PORT is the TCP port number of the historian's OPC-UA server. If the connector is run on the same computer as the historian, than the HOSTNAME is "localhost".

The default port number for Siemens PCS 7 Process Historian OPC-UA Server is 4852, but may differ at your site.

Username

null

String

This is the user name of a user that has access to the database.

Note that the OPC-UA connector can connect to a server using (in order of precedence) a username and password or as an anonymous user.

Password

null

String/SecretFile

This is the password of a user that has access to the database. It is recommended to leverage a Secrets File to store this information.

Note that the OPC-UA connector can connect to a server using (in order of precedence) a username and password or as an anonymous user.

Known Issues

There are no known issues for the Siemens PCS7 Process Historian connector. Please report any issues you find to our support portal.

Troubleshooting

Verify with an external client

Use an external OPC-UA client (such as this free OPC-UA Client from Integration Objects) to connect to the historian server and confirm that it is running properly.

Known OPC-UA Errors

If the connector fails to pull in data from a signal with the error “Unexpected Error Processing Response”, try setting the configuration field MaxResultsPerRequest to a lower number. OPC-UA applications typically limit the size of messages sent between client and server.

If the connector tries to pull in data from multiple signals concurrently and fails with the error “BadInternalError”, try setting the configuration field MaxConcurrentRequests to 1.

If the connector fails to connect to a server with a “BadIdentityTokenInvalid” or “BadUserAccessDenied” error, make sure the username and password set in the configuration file match a user identity on the OPC-UA server. Alternatively, try setting the Username and Password fields in the configuration file to equal null, which can enable the connector to try a different authentication method.

Siemens PCS 7 Process Historian

The logs for the historian’s OPC-UA server are located at:

C:\Program Files (x86)\SIEMENS\ProcessHistorian\bin

If you are running into other issues with connecting to or access data from Siemens PCS7 Process Historian, view our guide for troubleshooting datasource issues.

Performance considerations

In testing, it was found that the Process Historian OPC-UA Server can encounter internal errors when executing concurrent, long-running requests for historical data. Because of this, we recommend setting MaxConcurrentRequests to 1.

Since this connector communicates with Siemens PCS7 Process Historian using OPC-UA’s secure TCP, communication over the internet is allowed (meaning that the net-link agent running the connector does not necessarily need to be on the same computer as the historian). However, it will likely be faster and simpler to to have the agent on the same machine as the historian depending on the network connection speed and network security at a site.

Additionally, view our guide on optimizing datasource performance for general guidance.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.