News CNCnetPDM About us Support  
       
  

OPC UA DA SW 4.5 | SIEMENS

TOP

CNCnetPDM OPC UA for Siemens Sinumerik Operate version 4.5 enables you to monitor machine-, process- and quality-data from Sinumerik 840D SL & 828D controllers from a remote PC. It also allows to write and change a wide range of parameters on these devices.

DOWNLOAD SOFTWARE | CONTROLLER SETUP (REAL DEVICE) | CONTROLLER SETUP (SINUTRAIN) | SOFTWARE SETUP & USAGE (PC) | CNCnetPDM OPC UA CLIENT | CNCnetPDM OPC UA SIMPLE CLIENT | TROUBLESHOOTING

This document describes setup and configuration of OPC UA components on controllers with software Operate 4.5 SP3 and communication with a remote PC. Instructions on OPC UA setup and test with free SINUTRAIN versions are also included.

Note: For software Operate version 4.7 see Sinumerik 840D 828D OPC UA (SW 4.7).

Sinumerik Operate 4.5

FIG 1: Sinumerik Operate 4.5

DOWNLOAD SOFTWARE

CONTROLLER SETUP (REAL DEVICE)

Make sure that you have option "Access MyMachine /OPC UA 6FC5800-0AP67-0YB0" activated (Startup->Licenses).

Activate OPC UA License

FIG 2:    Activate License

Enable the OPC UA communication port (TCP port 4840) by clicking button [change] in area "Startup -> Network ->Company network". Add TCP port 4840 (1) and click [OK] (2).

Add TCP OPC UA Port

FIG 3:    Add TCP Port 4840

Important note: Please ensure that the date and time on your HMI is correct, otherwise certificate based OPC UA authentication does not work!

  • Important: The following instructions only apply to Sinumerik Operate versions with 'Miniweb' OPC UA Server (Build year <= 2020):

Startup the controller in service mode without HMI

To start the OPC UA components when the controller starts up you need to add an additional process to INI file systemconfiguration.ini. To do so, navigate to folder
…/siemens/sinumerik/hmi/template/cfg/.

Copy file MiniWeb_linemb_systemconfiguration.ini from this folder to directory
.../user/sinumerik/hmi/cfg/

If the target folder does NOT contain a file named systemconfiguration.ini you can simply rename MiniWeb_linemb_systemconfiguration.ini to systemconfiguration.ini.

If this file already exists you have to add the content of MiniWeb_linemb_systemconfiguration.ini to this file.

Open systemconfig.ini with a text editor and look for section [processes]. If it doesn’t exist you can copy the whole content of MiniWeb_linemb_systemconfiguration.ini, add it to the end of systemconfiguration.ini and save the file.

If section [processes] exists, copy the line that starts with PROC100= from MiniWeb_linemb_systemconfiguration.ini, add it to section [processes] in systemconfiguration.ini and save the file. You can also manually add the section to systemconfiguration.ini:

[processes]
PROC100= image:="/siemens/sinumerik/hmi/miniweb/release/miniweb.exe", process:=MiniWebServer, cmdline:="../System ../WWWRoot", startupTime:=afterServices, workingdir:="/siemens/sinumerik/hmi/miniweb/release"

Next, copy file OPC_UAApplication.xml from folder .../siemens/sinumerik/hmi/template/cfg/ to .../oem/sinumerik/hmi/miniweb/WebCfg/

Open OPC_UAApplication.xml with a text editor, exchange all occurrences of ‘localhost’ with the IPv4 Address of your controller e.g.:

< APPLICATIONDESCRIPTION ApplicationUri="urn:192.168.1.100:miniweb"
DNSNAME="192.168.1.100"/>
< ENDPOINTDESCRIPTION URL="opc.tcp://192.168.1.100:4840"/>

For NCU and PPU use the IP Address of -X130, for PCU 50 the address of ‘Local Area Connection 2’.

CONTROLLER SETUP (SINUTRAIN)

  • Important: The following instructions only apply to SinuTrain versions shipped with 'Miniweb' OPC UA Server (Build year <= 2020):

OPC UA setup on the free version of SinuTrain for SINUMERIK Operate V4.5 Ed.3 differs a bit from the procedure on a real controller but exactly works in the same way. You have to register a free account to be able to download the program.

Download and install SinuTrain for SINUMERIK Operate V4.5 Ed.3 - Basic. If you accept all default settings you are able to use the paths mentioned below.

Start SinuTrain and create one new machine f.i. ‘Lathe with driven tool’, it is recommended NOT to use the ‘DEMO-Lathe’ device.

Click [MENU SELECT] - [Setup] - ‘>’ [Licenses] - [All Options] - [Search], enter OPC, activate the license and click [OK].

Shut down the machine.

Copy file OPC_UAApplication.xml from folder C:\Siemens\SinuTrain\SINUMERIK CNC-SW 840D sl 4.5 SP6 HF3\hmi\siemens\sinumerik\hmi\template\cfg\
to folder C:\Siemens\SinuTrain\SINUMERIK CNC-SW 840D sl 4.5 SP6 HF3\hmi\oem\sinumerik\hmi\miniweb\WebCfg\

Replace all ‘localhost’ entries in this file with the IPv4 address of your PC.

Start SinuTrain, minimize it.

Edit file C:\Siemens\SinuTrain\SINUMERIK CNC-SW 840D sl 4.5 SP6 HF3\hmi\user\sinumerik\hmi\cfg\systemconfiguration.ini and add:

[processes]
PROC100= image:="C:\Siemens\SinuTrain\SINUMERIK CNC-SW 840D sl 4.5 SP6 HF3\hmi\siemens\sinumerik\hmi\miniweb\release\miniweb.exe", process:=MiniWebServer, cmdline:="..\System ..\WWWRoot", startupTime:=afterServices, workingdir:="C:\Siemens\SinuTrain\SINUMERIK CNC-SW 840D sl 4.5 SP6 HF3\hmi\siemens\sinumerik\hmi\miniweb\release"

Restart the machine from the SinuTrain Workbench and make sure that systemconfiguration.ini contains the additional process.

  • Note: If your PC gets it's IPv4 address from a DHCP server you have to make sure that file UAApplication.xml contains the correct IPv4 address. after startup of SinuTrain. If the IPv4 address changes SinuTrain reverts it to the previous value! Open UAApplication.xml with a text editor while SinuTrain is running, correct the entries, save the file and restart the machine (menu on top Machine -> Restart).

If configured correctly on startup of the machine now an additional command line window opens that shows details about the activities of miniweb.exe. Do NOT close this window!

SOFTWARE SETUP & USAGE (PC)

  • Note: For testing please use our CNCnetPDM Standard OPC UA Client as it comes with enhanced certificate handling and supports calling methods as well as all OPC UA security modes and policies used by recent Siemens Sinumerik controllers!

Download Sinumerik_840D_828D_OPC_UA.zip and extract all files to a folder on your PC.

Make sure that TCP Port 4840 is opened in your Firewall. You can use our tool Device Port Scanner to check if your controller is reachable via this port.

Note: Both programs require .NET Framework 4 components and run on newer Microsoft Windows x86 and x64 OSes (>= Windows 7).

For OPC UA it is required that your PC trusts the Siemens certificate issued by your controller. Therefore it is necessary that it is installed in the certificate store of your PC. As this is a self-signed certificate it is NOT automatically installed. To install the certificate right click CNCnetPDM.OpcUA.Client.exe or CNCnetPDM.OpcUA.SimpleClient.exe, select ‘Run as Administrator’ and connect to your controller. This only has to be done once.

CNCnetPDM OPC UA CLIENT

The CNCnetPDM OPC UA Client enables you to connect to your controller via OPC UA, browse items, see details of items and add or remove them from a subscription.

Start CNCnetPDM.OpcUA.Client.exe and enter the IP Address of your controller into textbox Node (1).

Connect CNCnetPDM OPC UA Client

FIG 4:    Connect CNCnetPDM.OpcUA.Client

Click on the arrow in textbox Endpoints (2), you should see 2 entries, select
Sinumerik OPC UA OEM [None, None] [opc.tcp://IP-Address:4840] (3).

Click Connect.

You are now connected to your controller via OPC UA.

In the upper left pane expand Objects->Sinumerik->/Bag->/Bag/State (1).

Click on /Bag/State/opMode (=Current operation mode of your controller).

CNCnetPDM OPC UA Client

FIG 5:    CNCnetPDM.OpcUA.Client

Now you can see details of the selected object in the upper right pane (2).

By dragging the item from the upper left pane to the empty area at the bottom of the dialog you can add it to a subscription (3). If you now change the operation mode of your controller to AUTO, MANUAL or MDI you can immediately see the results under ‘Value’. If you right click the item you can change the sampling interval or remove it from the subscription.

You can add additional items to your subscription.

If you’re done, disconnect from your controller.

CNCnetPDM OPC UA SIMPLE CLIENT

This program enables you to connect to your controller via OPC UA, select a specific namespace of the OPC server, monitor, read and write items.

Start CNCnetPDM.OpcUA.SimpleClient.exe, enter the IP Address of your controller into the textbox right to [Connect]  e.g.: 192.165.1.212 (1) change port (2) only if you use a port different from 4840.

Connect CNCnetPDM OPC UA Simple Client

FIG 6:    Connect CNCnetPDM.OpcUA.SimpleClient

Click [Connect] you now should be connected to the OPC UA server on your controller.

CNCnetPDM OPC UA Simple Client

FIG 7:    CNCnetPDM.OpcUA.SimpleClient

Initially one item is queried, by changing ‘Active Items’ to a different value you can activate up to 15 items.

The 15 predefined values under ‘ItemID’ are known to work well on most controllers. Of course you can change them according to your requirements. The last two items are 2 writable R Parameters (user variables) that are visible at the controller: [MENU SELECT] - [Parameter] - [User Variable].

If you click on button Read (3) the values of all active items are queried from the controller and shown in the dialog.

For the last two variables R1 and R2 you see their current values as set at the controller.

By entering different values for these two writable items and clicking on [Write] (4) you can change their values at the controller.

Clicking on [Monitor] (2) adds all active variables to a subscription and shows their current value.

If you’re done, click on [Disconnect].

TROUBLESHOOTING

  • In case of errors the program outputs an error log file that can be found in the directory where the program is located. This file contains detailed information about any errors.

  • On connect CNCnetPDM OPC UA Client shows no connections in textbox Endpoints or CNCnetPDM OPC UA Simple Client opens popup ‘Connect failed: Could not open UA TCP request channel’:
    Make sure that the controller is reachable via the network and port 4840 is opened at the controller and your firewall. Use our tool Device Port Scanner to check if communication works.
    Verify that process miniweb.exe is started at the controller. On a SinuTrain setup check that an additional command line window exists and one of the last lines contains ‘OPC UA Server started successfully on Port 4840’.

  • If no additional command line window opens at all check that the required entries in section [processes] of systemconfiguration.ini exist. If not, add them and restart the controller.

  • If the window is opened but there’s no line with ‘OPC UA Server started successfully on Port 4840’ check file OPC_UAApplication.xml.

  • If you see multiple lines in this window with text ‘BAILED OUT’ and error messages related to files not found check that the additional entry for miniweb.exe in systemconfiguration.ini points to the directory that contains miniweb.exe (search for it). You can also use the full path to miniweb.exe instead of the relative path. If this does not help, navigate to the folder that contains miniweb.exe, open subfolder \System and open file WebCfg.xml with a text editor. Verify that uncommented lines with long path entries point to directories that contain the specific .xml files.

  • If you see error message ‘Connect failed Error: cannot add self-signed certificate to certificate store’ on startup run the program one time as Administrator.

  • If you see error ‘Connect failed BadIdentityTokenRejected’ on SW 4.5 make sure that you didn’t check SW 4.7 in the dialog.

Privacy notice

This website uses cookies. By continuing to use it you agree to our privacy policy. 

https://www.inventcom.net/support/siemens/opc-ua-da-sw-45

Support | Siemens | Overview

CNCnetPDM enables to acquire machine, process, quality, event and alarm data from machines equipped with Siemens Sinumerik controllers and integrate it seamlessly with your... [read more]
Support | Siemens | Overview

Support | Siemens | Release Notes

(2/21/2024) We released a new IIoT Adapter device driver for Sinumerik 840D with HMI-Advanced or HMI-Embedded that runs... [read more]
Support | Siemens | Release Notes

Support | Siemens | DDE Device Driver

This highly configurable CNCnetPDM device driver for machines with Siemens Sinumerik 840D controllers enables to add OPC UA Server, MTConnect and SQL Database output... [read more]
Support | Siemens | DDE Device Driver

Support | Siemens | OPC Classic DA

CNCnetPDM OPC DA for Siemens Sinumerik 840D controllers enables you acquisition and monitoring of machine-, process- and quality-data from machines with Sinumerik controllers... [read more]
Support | Siemens | OPC Classic DA

Support | Siemens | OPC Classic DA Device Driver

This highly configurable CNCnetPDM device driver for Siemens Sinumerik 840D controllers with OPC classic enables you to monitor and output machine-, process- and quality data... [read more]
Support | Siemens | OPC Classic DA Device Driver

Support | Siemens | OPC Classic A&E

CNCnetPDM OPC Classic Alarm & Events (A&E) for Siemens Sinumerik 840D controllers enables you to monitor active and acknowledged alarms and events from your machines by a... [read more]
Support | Siemens | OPC Classic A&E

Support | Siemens | OPC Classic A&E Device Driver

This highly configurable CNCnetPDM Alarm & Events (A&E) device driver for Siemens Sinumerik 840D controllers with OPC Classic A&E Interface enables constant... [read more]
Support | Siemens | OPC Classic A&E Device Driver

Support | Siemens | OPC UA

CNCnetPDM OPC UA for Siemens Sinumerik Operate enables you to monitor machine-, process- and quality-data from Sinumerik 840D SL & 828D controllers from a remote PC. It also... [read more]
Support | Siemens | OPC UA

Support | Siemens | OPC UA Device Driver

The CNCnetPDM OPC UA device driver allows reading, writing and monitoring of machine-, process- and quality data from Siemens Sinumerik 840D & 828D controllers that run HMI... [read more]
Support | Siemens | OPC UA Device Driver
Modified: 2024-03-06