In case PCU is connected to NCK and PLC via MPI interface, and the S7 TCP protocol is unavailable, the SINUMERIK S7 ONLINX OPC UA server can be used. It is installed directly on the PCU’s operating system and utilizes the s7onlinx interface to communicate through MPI interface.

To make this possible, we provide a variety of builds for this OPC UA server that are compatible with different versions of Windows, including Windows XP, Windows 2000, and Windows NT4, which are commonly used on SINUMERIK 840D PCUs.

This OPC UA server has been tested and proven to work well on the SINUMERIK 840 Dpl series, as well as on other models of Siemens SINUMERIK.

Read more about s7onlinx for PROFIBUS/MPI communication.

Download

v3.0.0 / Nov 14, 2024

Download 32-bit - 1.7 MB

Target PCU operating systems: Windows XP, Windows 2000, Windows NT 4. SINUMERIK S7 ONLINX OPC UA server is compatible with newer platforms like Windows 7 and 10. Crucially, the PCU must maintain MPI communication with NCK and PLC for proper functionality of the server.

When to use

The following scenarios typically indicate that the S7 ONLINX OPC UA server should be used:

  • The PCU is connected to the NCU via MPI interface.
  • The PCU has only one Ethernet adapter for enterprise network connectivity.
  • The PCU runs on legacy operating systems such as Windows XP, Windows 2000, or Windows NT4.
  • The PCU runs HMI Advanced software.

Installation

Install the OPC UA server directly on the PCU’s operating system.

1) Boot the SINUMERIK machine in Service Mode without launching the HMI by pressing key <3> during boot up.

MAZAK MAZATROL MATRIX 2

2) Log in with your credentials:
Username: auduser (or your assigned username)
Password: sunrise (or your assigned password)
3) Select “Service Desktop” from the available options.
4) Open a command prompt.
5) Navigate to the installer’s directory.
6) Run the installer’s executable file.

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

dpa.ua.s7onck.exe
dpa.ua.s7onck.ctrl.exe

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

The Windows service DPAOPCUA.S7ONLINX is automatically registered by the installer and started at the end of the installation process.

Note that the installer uses default parameters for MPI address, NCK and PLC TSAP numbers. This is suitable for most SINUMERIK configurations. However, if non-default parameters are required, the service should be manually re-registered with the necessary parameters. See the description below for instructions on how to do this.

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.9.0.0, 32-bit
os 5.1.2600.5512 => crt "xpsp3"
Destination: C:\Program Files\X-tensive\DPA.UA\s7onck\
Copying "dpa.ua.s7onck.ctrl.exe"... ok
Copying "dpa.ua.s7onck.exe"... ok
Generating default certificate... ok
Registering service "DPAOPCUA.S7ONLINX"... ok
Will configure firewall...
  exception for "dpa.ua.s7onck.exe"... ok
Will start services...
  service "DPAOPCUA.S7ONLINX"... ok
installation SUCCEEDED!

Update of running service

In case when a previous version was already installed and the OPC UA server instance is up and running as a Windows service, the installer will perform the update correctly. First, the running service of the OPC UA server is shutdown gracefully. Old binaries are replaced with a new version. Finally, previously running instance is 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

/dev:S7ONLINE

This is a mandatory parameter. It must always be set to the value “S7ONLINE”.

/mpi:<address>

Optional. Set this parameter only when a non-standard MPI address should be used. The default MPI address is 0x0D.

/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. The default TSAP number for NCK is “0x0D”.

/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. The default TSAP number for PLC is “0x02”.

/nocert

Do not use certificates. Indicates that OPC UA server should not expose secured endpoints. Can optionally be applied only to OPC UA servers running interactively. Can not be applied to OPC UA servers running as Windows Services.

/port:<num>

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

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

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.opcua.s7onck.exe /dev:S7ONLINE /nck /plc

Ctrl+C gracefully shuts down the server.

Running as Windows Service

The installer performs all tasks automatically, including registering and starting the Windows service. In most cases, no manual changes are necessary. However, if non-default parameters for MPI address, NCK or PLC TSAP numbers are required, manual re-registration of the Windows service may be needed.

To achieve this, follow these steps:
1) Stop the running instance of the service.

net stop DPAOPCUA.S7ONLINX

2) Unregister the service.

dpa.ua.s7onck.ctrl /uninstall

Take into account, the service is not stopped automatically when unregistering. It must be stopped with “net stop” command before.
3) Register the service with the new valid parameters. For instance:

dpa.ua.s7onck.ctrl /install /dev:S7ONLINE /mpi:2 /nck:8 /plc:2

4) Start the service.

net start DPAOPCUA.S7ONLINX

To list information about the installed instance:

dpa.ua.s7onck.ctrl.exe /list

Typical output:

DPAOPCUA.S7ONLINX
  instance: (default)
  port: 4840
  dev: S7ONLINE
  mpi: (default)
  nck: (default)
  plc: (default)
  start type: auto
  status: running

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 MPI communication

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

Objects/NCK/link/scheduler/s7/onlinx
Objects/NCK/link/scheduler/s7
Objects/NCK/link/scheduler
Objects/PLC/link/scheduler/s7/onlinx
Objects/PLC/link/scheduler/s7
Objects/PLC/link/scheduler

They provides 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.