SINUMERIK S7 TCP OPC UA server enables the connection of Siemens SINUMERIK CNCs, including the 840 Dsl and 828 Dsl models, and other models through Ethernet, utilizing the S7 TCP protocol. This allows for remote communication with the CNCs.

However, in situations where external communication via S7 TCP is not possible, the OPC UA server can be installed directly on the PCU’s operating system. This allows the server to communicate with NCK and PLC via S7 TCP protocol through internal Ethernet network instead of relying on external communication protocols.

Download

v3.9.0 / May 28, 2025

Download 64-bit - 1.08 MB

Download 32-bit - 2.21 MB

Docker image

Installation

Installation process is very simple and straight forward. Installer copies the following files to “%PROGRAMFILES%\X-tensive\DPA.UA\s7nck\“ directory:

dpa.ua.s7nck.exe
dpa.ua.s7nck.ctrl.exe

Firewall exception is added for dpa.ua.s7nck.exe executable.

If there is no certificate or private key for OPC UA server default instance, a self-signed certificate as well as private key are generated and placed to “instances\default\“ subfolder.

Installer is a simple console application that requires no user interaction or parameters. All output is sent to stdout and stderr. It is fine to run installer under SSH session. Here is a typical output:

dpa installer 2.1.0.0, 64-bit
Destination: C:\Program Files\X-tensive\DPA.UA\s7nck\
Copying "dpa.ua.s7nck.ctrl.exe"... ok
Copying "dpa.ua.s7nck.exe"... ok
Generating default certificate... ok
Will configure firewall...
  exception for "dpa.ua.s7nck.exe"... ok
installation SUCCEEDED!

Update of running services

In case when a previous version was already installed and the OPC UA server instances are up and running as Windows services, the installer will perform the update correctly. First, all running services of the OPC UA server are shutdown gracefully. Old binaries are replaced with a new version. Finally, all previously running instances are started again.

Update of interactively running processes

In case when the OPC UA server runs as an interactive console process, installer terminates this process before installation to release any locks on old binaries, otherwise installation and updating of the binaries would fail. The installer does not attempt to restart interactive processes after the binaries update.

Command line arguments

/instance:<instanceName>

Optional. Specifies instance name for non-default instance. Instances are explained here.

/port:<port>

Optional. Specifies TCP port for OPC UA server. Default is 4840.

/nocert

Optional. Indicates that OPC UA server should not use x509 certificate and private key. Only unsecured OPC UA server endpoint is hosted. Avoid to use it in production environments.

/dev:<deviceHost>[:<devicePort>]

Specifies SINUMERIK device host and port. Host can be a network name or IP address. Port is optional, default is 102.

/nck[:<tsap>]

Optional. Indicates that NCK address space should be initialized. TSAP number is optional, define it only for non-standard NCK device TSAP number.

/plc[:<tsap>]

Optional. Indicates that PLC address space should be initialized. TSAP number is optional, define it only for non-standard PLC device TSAP number.

Both NCK and PLC TSAP numbers can be defined as decimal or hexadecimal numbers. Use “0x” prefix for hexadecimal, for instance, “/nck:0x307”

Here is an example of connecting SINUMERIK device with IP address 192.168.0.1 and default TCP port 102, both NCK and PLC adress spaces are initialized:

dpa.ua.s7nck.exe /dev:192.168.0.1 /nck /plc

Running in Console mode

The OPC UA server can run interactively in console mode. For instance, to initialize both NCK and PLC adress spaces:

dpa.ua.s7nck.exe /dev:192.168.0.1 /nck /plc

Ctrl+C gracefully shuts down the server.

Running as Windows Service

The installer does not register any windows services automatically. To register a new windows service instance do the following:

dpa.ua.s7nck.ctrl.exe /install /dev:192.168.0.1 /nck /plc

To list all installed instances:

dpa.ua.s7nck.ctrl.exe /list

Typical output:

DPAOPCUA.S7TCP
  instance: (default)
  port: (default)
  dev: 192.168.0.1
  nck: (default)
  plc: (default)
  start type: auto
  status: running
DPAOPCUA.S7TCP.M027
  instance: M027
  port: 4841
  dev: 192.168.0.2
  nck: (default)
  plc: (default)
  start type: auto
  status: stopped

To start default instance:

net start DPAOPCUA.S7TCP

Troubleshooting

Windows Service fails to start

In case OPC UA server fails to start as Windows Service, run it in Console mode with exactly the same command line arguments to check console output. Normally, all diagnostic messages are sent to stdout and stderr. For instance, when OPC UA server fails to read the certificate or the private key:

[2023-10-18 11:07:13.019 (UTC+0300)] fatal/server       Could not load certificate storage.

In that case ensure that .cert and .key files exist and are located according to Instances directory structure.

An invalid or corrupted alias.json file may cause service to fail to start:

[2023-10-18 11:08:54.418 (UTC+0300)] fatal/server       Could not load alias json.

In that case ensure that alias.json is valid and its content respects the demands described here. Take into account that empty alias.json file is considered as invalid. If aliases are not used, just remove alias.json.

License

If the license is not installed or if the license is not valid, for example, an expired TRIAL license, then the OPC UA server will function for 1 hour after starting the process. After the hour has elapsed, the OPC UA server will return a BADLICENSENOTAVAILABLE or BADLICENSEEXPIRED error on requests to read and write data, except for system objects and system variables of OPC UA server.

The variable “Objects/Server/Instance/LicenseKey” allows to read the loaded license and its status. Next, the license status can be checked with the command line utility dpa.opcua.rs:

dpa.opcua.rs.exe target <OpcServerIp>

S7 TCP communication

To troubleshoot any S7 TCP communication issues, please, refer to the following variables:

Objects/NCK/link/scheduler/s7/cotp/clnp/tcp
Objects/NCK/link/scheduler/s7/cotp/clnp
Objects/NCK/link/scheduler/s7/cotp
Objects/NCK/link/scheduler/s7
Objects/NCK/link/scheduler
Objects/PLC/link/scheduler/s7/cotp/clnp/tcp
Objects/PLC/link/scheduler/s7/cotp/clnp
Objects/PLC/link/scheduler/s7/cotp
Objects/PLC/link/scheduler/s7
Objects/PLC/link/scheduler

They provide detailed information about the status of S7 communication stack as well as any errors detected, including the rich set of counters for various types of errors.