Download as pdf or txt
Download as pdf or txt
You are on page 1of 43

SIMOCODE pro V PN –

Info dashboard with


Node-RED

SIMOCODE pro V PN
Node-RED
Dashboard
https://support.industry.siemens.com/cs/ww/de/view/109816582

Siemens
Industry
Online
Support
Legal Notice

Legal Notice
Use of application examples
In the application examples, the solution for various automation tasks using multiple interacting
components is explained in text, graphics and/or software modules. The application examples are
a free-of-charge service of Siemens AG and/or a subsidiary of Siemens AG ("Siemens"). They are
not binding and do not purport to be complete and functional in respect of the configuration and
equipment. Further, this application examples are not specific customer solutions, but are only
intended to provide support for typical applications. You are yourself responsible for proper and
safe operation of the products under the valid regulations and, to achieve this, you must check the
function of the application example and adapt it individually to your system.
You will receive from Siemens the non-exclusive, non-sublicensable and non-transferable right to
use of the application examples by technically trained personnel. Any change made to the
application examples is made on your own responsibility. Transmission to third parties or
reproduction of the application examples or excerpts thereof is only permitted in combination with
your own products. The application examples are not necessarily subjected to the usual tests and
quality checks of a charged-for product and can have functional and performance defects and
contain errors. You are obligated to use them in such a way that any malfunctions do not result in
damage to property or injury to persons.

Disclaimer of liability
Siemens excludes its liability for any legal reasons whatsoever, in particular for the usability,
availability, completeness and freedom from defects of the application examples, and the
associated notes, configuration and performance data and damage caused by these. This does not
apply if Siemens is necessarily liable, for example, under product liability legislation, in cases of
malice, gross negligence, due to negligently caused personal injury, death or impaired health,
failure to comply with the warranty given, due to willful concealment of a defect or due to culpable
breach of material contractual obligations. The claim for damages based on breach of material
contractual obligations shall, however, be limited to foreseeable damages typically covered by a
 Siemens AG 2022 All rights reserved

contract unless liability is due to malice or gross negligence or due to personal injury, death or
impaired health. The provisions stated above do not imply a change in the burden of proof to your
detriment. You exempt Siemens from claims of third parties that exist or are made in relation to this,
unless Siemens is necessarily liable by law.
By using these application examples, you agree that Siemens cannot be held liable for possible
damage beyond the liability clause described.

Further information
Siemens reserves the right to make changes to the application examples at any time without prior
announcement. Where the recommendations in the application examples differ from other Siemens
publications, e.g. Catalogs, the contents of the other documentation take precedence. The Siemens
conditions of use apply in addition (https://support.industry.siemens.com).

Security information
Siemens provides products and solutions with industrial security functions that support the secure
operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary to
implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.
Siemens' products and solutions constitute one element of such a concept. Customers are
responsible for preventing unauthorized access to their plants, systems, machines, and networks.
Such systems, machines and components should only be connected to an enterprise network or
the Internet if and to the extent such a connection is necessary and only when appropriate security
measures (e.g. firewalls and/or network segmentation) are in place. For additional information on
industrial security measures that may be implemented, please visit:
https://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they are available and
that the latest product versions are used. Use of versions that are no longer supported, and failure
to apply the latest updates may increase your exposure to cyber threats. To stay informed about
product updates, subscribe to the Siemens Industrial Security RSS Feed under:
https://www.siemens.com/industrialsecurity.

SIMOCODE pro V PN – Info dashboard with Node-RED


Entry ID 109816582, 01/2023 2
Table of contents

Table of contents
Legal Notice.............................................................................................................. 2
1 Introduction and task definition..................................................................... 4
1.1 Introduction ....................................................................................... 4
1.2 Task description ................................................................................ 4
1.3 Components used ............................................................................. 5
2 Engineering .................................................................................................... 7
2.1 Hardware configuration ...................................................................... 7
2.2 Setting up Windows PC for Node-RED .............................................. 8
2.3 Preparing SIMOCODE with the SIMOCODE ES TIA Portal V17 ....... 12
2.4 Installing Node-RED node packages ................................................ 17
2.5 Import Node-RED application example ............................................ 21
2.6 SIMOCODE application in detail ...................................................... 24
2.6.1 Tab „SIMOCODE Control“ ............................................................... 24
2.6.2 Tab „SIMOCODE ON OFF“ ............................................................. 28
2.6.3 Tab „SIMOCODE Status“................................................................. 30
2.6.4 Tab „SIMOCODE Measured value“ .................................................. 33
2.6.5 SIMOCODE Dashboard ................................................................... 34
 Siemens AG 2022 All rights reserved

3 Worth knowing ............................................................................................. 38


3.1 OPC UA Communication ................................................................. 38
3.1.1 Activating OPC UA Server for SIMOCODE in the TIA Portal ............ 38
3.1.2 Supported security features ............................................................. 40
4 Appendix....................................................................................................... 41
4.1 Service and Support ........................................................................ 41
4.2 Industry Mall .................................................................................... 42
4.3 Links und literatur ............................................................................ 42
4.4 Change documentation .................................................................... 42
4.5 Tables ............................................................................................. 42
4.6 Figures ............................................................................................ 43

SIMOCODE pro V PN – Info dashboard with Node-RED


Entry ID 109816582, 01/2023 3
1 Introduction and task

1 Introduction and task definition


1.1 Introduction
The SIMOCODE motor management system has been setting standards in the field
of motor protection and control functions for many years. SIMOCODE performs
motor protection and control functions in the chemical, paper, oil and gas industries
as well as in water and wastewater technology. These also include the protection
and control of motors in potentially explosive atmospheres for different types of
protection in accordance with the ATEX Directive 2014/34/EU.
SIMOCODE provides the applications with information such as current, voltage,
power and status and alarm data. This data can contribute to increasing plant
availability for an analysis of the respective application.
In addition to the PROFINET IO device communication function, SIMOCODE pro V
PN also provides the data via the OPC UA server function.
The open, Ethernet-based communication standard OPC UA (Open Platform
Communications Unified Architecture) offers optimal conditions for a digitization
solution. OPC UA is ideal for horizontal communication between machine and
controller as well as vertical communication up to the cloud. Proven mechanisms
such as authentication, authorization and encryption ensure security.

1.2 Task description


 Siemens AG 2022 All rights reserved

From the amount of available data, it is often the task of an edge or cloud solution to
bundle the required data as needed and to display them at a glance. In most cases,
this data is displayed graphically in the form of a dashboard. For example, the user
can recognize key figures and performance indicators and derive process-related
measures. The following application example is intended to show how a connection
can be made using Node-RED and how a graphical display of relevant SIMOCODE
data can take place.

Node-RED makes it possible to implement tasks from the most diverse areas of
digitization for the "Internet of Things" in a simple, graphical way and according to
the modular principle. Ready-defined nodes ("nodes") are connected and
parameterized in a suitable manner. A large number of the nodes are provided free
of charge by developers worldwide on the basis of the open-source principle.

Node-RED can be used on many different platforms and system environments. For
example, a local installation on a PC system under Linux or Windows is conceivable.
However, implementations on platforms such as Raspberry PI (private applications)
or SIMATIC IOT2050 (industrial applications) have proven their worth, not least due
to the requirement of 24/7 operation of digital applications.

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 4
1 Introduction and task

Please also note the device-specific operating instructions (Manual Collection) and
the system manual SIMOCODE pro motor management
https://support.industry.siemens.com/cs/de/de/view/109743957

This application is demonstrated using an installed Node-RED base on a Windows


PC. The setup of such a solution is shown below.

See the following websites:

Download | Node.js (nodejs.org)


Node-RED (nodered.org)

For applications in "24/7" operation, solutions based on a SIMATIC IOT2050 are


recommended.

The installation of the engineering tool SIMOCODE ES TIA Portal V17 is required.

1.3 Components used


This use case was created and tested with the following hardware:
 Siemens AG 2022 All rights reserved

Table 1-1 – Hardware components

Component Number Article Hint


Windows-PC 1 - Windows 10
SIMATIC IOT 2050 1 6ES7647-0BA00- Optional
0YA2
SIMOCODE pro V PN 1 3UF7011-1AB00-0 -

Fehlersicheres 1 3UF7320-1AB00-0 Optional


Digitalmodul DM-F local
Connecting cable 1 3UF7930-0AA00-0 Optional
Current/Voltage 1 3UF7110-1AA01-0 Optional
Measuring Module V2
Connecting cable 1 3UF7934-0AA00-0 Optional
Operating Panel 1 3UF7210-1AA01-0 Optional
Circuit breaker 1 3RV2311-0AC10 Optional
Contactor 2 3RT2015-1BB42 Optional

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 5
1 Introduction and task

This application example was created with the following software components:

Table 1-2 – Software components

Component License System Hint


SIMOCODE ES V17 (TIA 3ZS1322-6CE15-0YB5
PORTAL)
Node.js v18.12.1 free Download | Node.js
(nodejs.org)

Node-Red v2.2.2 free Node-RED


(nodered.org)

This application example consists of this manual, a SIMOCODE ES TIA portal


project and a Node-RED flow for operating and displaying selected SIMOCODE
data.

Table 1-3 – Files of the application example

Component Filename Hint


 Siemens AG 2022 All rights reserved

Documentation 109816582_SIMOCODE -
pro V PN – Info dashboard
with Node-RED.pdf
SIMOCODE ES TIA Portal 109816582_SIMOCODE Project data TIA V17
V17 pro V PN – Info Dashboard
with Node-RED.zap17
Node-RED 109816582_SIMOCODE Contains all flows for Node-
pro V PN – Info Dashboard RED SIMOCODE
with Node-RED.json application

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 6
2 Engineering

2 Engineering
2.1 Hardware configuration

The hardware configuration consists of a Windows PC and a SIMOCODE pro V PN,


which are connected to each other via an Ethernet network. Communication
between the Windows PC and the SIMOCODE pro V PN takes place via OPC UA,
whereby SIMOCODE works as OPC UA server.

As an alternative to a Windows PC, other systems can also be used, such as a


SIMATIC IOT2050 Gateway or a Raspberry PI etc. However, this will not be
considered further here.
A SIMATIC IOT2050 or similar is recommended if an application is planned 24/7, as
these devices can usually be permanently energized.
However, the principle shown here with a Windows PC is also transferable to other
systems.

The following hardware setup also shows an overall configuration of a SIMOCODE


application with additional emergency stop triggering.
 Siemens AG 2022 All rights reserved

Figure 1 - Hardware-Setup
PC z.B. SIMATIC Field-PG
Node-RED SIMATIC
Dashboard IOT 2050

400V AC

Option
Optioninstead
of a PCPC
anstelle

OPC UA

SIMOCODE
pro V PN
E-stop
Not-Halt

DM-F Local
(Optional)

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 7
2 Engineering

2.2 Setting up Windows PC for Node-RED


Node-RED is based on the runtime environment Node.js. The necessary software
components must first be installed on the Windows PC used for this application. On
the download page https://nodejs.org/en/download, you will find the Windows
Installer. In this example, installation is performed with the 64-bit version. Perform
the installation according to the instructions and check that installation has been
successful in the Windows PowerShell (Fig. 4).

Figure 2 – Download node.js


 Siemens AG 2022 All rights reserved

Figure 3 – Node.js Setup

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 8
2 Engineering

By entering: node --version; npm --version


in the Windows PowerShell, you can verify if the installation was successful. The
versions of the components should be returned.

Figure 4 – Check Installation

Now install Node-RED via Windows PowerShell by entering the following:

npm install -g --unsafe-perm node-red

Figure 5 – Installing Node-RED


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 9
2 Engineering

Now start Node-RED in Windows PowerShell with the command node-red

Figure 6 – Starting Node-RED


 Siemens AG 2022 All rights reserved

This PowerShell application must remain open while Node-Red is being used.

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 10
2 Engineering

Call the Node-RED user interface in a web browser with


http://127.0.0.1:1880.

Figure 7 – Call Node-RED in the web browser


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 11
2 Engineering

2.3 Preparing SIMOCODE with the SIMOCODE ES TIA


Portal V17

SIMOCODE is parameterized with the SIMOCODE ES TIA Portal V17 engineering


tool. The supplied file "109816582_SIMOCODE pro V PN – Info Dashboard with
Node-RED.zap" is subsequently unzipped in the TIA Portal and downloaded to the
SIMOCODE. A time synchronization to the SIMOCODE is performed from the TIA
Portal.

Hint: Alternative hardware design


The attached configuration example is for a SIMOCODE setup with fail-safe DM-F
local digital module.
However, the Node-RED application can also be performed with any other
hardware setup of a SIMOCODE pro V PN. For this purpose, the hardware
configuration in SIMOCODE ES V17 must be adapted according to its current
hardware structure.

Figure 8 – Opening the SIMOCODE application file in the TIA Portal


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 12
2 Engineering

Figure 9 – Opening the project

Hint: Activate OPC UA


If you are working with an existing SIMOCODE configuration, make sure that the
 Siemens AG 2022 All rights reserved

OPC UA Server is activated in SIMOCODE.


See Chapter 3.1.1 for relevant information.

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 13
2 Engineering

Figure 10 – Preparing the project for loading into SIMOCODE


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 14
2 Engineering

Figure 11 – Loading project data into SIMOCODE

Figure 12 – Open commissioning path


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 15
2 Engineering

Figure 13 - Connect online

Figure 14 – Use command ‘Set time (= PC time in UTC)’


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 16
2 Engineering

2.4 Installing Node-RED node packages


Call the Node-RED interface in a Web browser with
http://127.0.0.1:1880
Node-RED works with nodes that are created and published as open source within
the framework of the Node-RED community with a wide variety of applications.
Before the actual SIMOCODE application is imported as a .json file, all the node
packages required for the application must be installed. The following node
packages are used:

Figure 15 - Node RED nodes to be installed


 Siemens AG 2022 All rights reserved

After installing Node-RED, only the node-red node package is preinstalled. Add the
following node packages as shown:

Figure 16 – Call ‘Manage palette’ for node installation

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 17
2 Engineering

Figure 17 – Call ‘manage palette’ for node installation via the install-tab

Figure 18 – Search for node-red-contrib-opcua node collection


 Siemens AG 2022 All rights reserved

Figure 19 – Install node-red-contrib-opcua node collection

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 18
2 Engineering

Figure 20 – Node in installation phase

Figure 21 – Nodes added to the node collection


 Siemens AG 2022 All rights reserved

Figure 22 – Successfully installed node-red-contrib-opcua node collection

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 19
2 Engineering

Repeat this process for node-red-contrib-ui-led and node-red-dashboard node


collections.

Figure 23 – Successfully installed node collections


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 20
2 Engineering

2.5 Import Node-RED application example


Node-RED offers the possibility to import or export finished flows.
In the following, the application example "SIMOCODE node-red.json" is imported
and applied with the "Deploy" command. Blue dots on the nodes always indicate a
pending deployment.

Figure 24 – Import flow with SIMOCODE application


 Siemens AG 2022 All rights reserved

Figure 25 – File Select

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 21
2 Engineering

Figure 26 – Select .json-file

Figure 27 – Import .json-file


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 22
2 Engineering

Figure 28 – Succesfull import of .json file

Figure 29 – Imported flows


 Siemens AG 2022 All rights reserved

Figure 30 – Blue info point and button "Deploy"

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 23
2 Engineering

2.6 SIMOCODE application in detail


2.6.1 Tab „SIMOCODE Control“

The application example in Node-RED consists of 4 flows.


The first flow "SIMOCODE Control" shows the activation and deactivation of the
SIMOCODE via OPC UA commands. Since SIMOCODE works as OPC UA Server,
the node "OPC UA Client" is required from the node package "node-red-contrib-
opcua". This node now receives data from the inject node. The "inject node" is
already pre-installed with the installation of Node-RED. This node can execute
commands at the click of a mouse or on a scheduled basis. In the following figure,
the commands for switching the SIMOCODE on and off are issued with a mouse
click.

Figure 31 – Flow "SIMOCODE Control"


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 24
2 Engineering

In the "OPC UA Client" node, the user has to make the adjustment to the
SIMOCODE IP address. The following figures show the procedure.

Figure 32 – Adjust the IP address in the node "OPC UA Client"


 Siemens AG 2022 All rights reserved

Figure 33 – Adjusting the IP address in the endpoint

The inject node "Set ON" passes on the OPC UA data for switching on the
SIMOCODE to the node "OPC UA Client" via the payload and/or topic property.
The specification of the switch-on is done via the payload property by means of
"TRUE". The topic property contains the namespace "ns", the node ID "i" and the
data type "datatype".
Namespace, node ID and data type can be found in the function manual
"SIMOCODE pro motor management - Communication Manual". SIMOCODE can
be switched on using the buttons in Figure 36. The power-on command must then
be reset.

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 25
2 Engineering

Figure 34 – Structure of switching command Set ON

Figure 35 - Switching On SIMOCODE and resetting the command


 Siemens AG 2022 All rights reserved

In this flow, the SIMOCODE is switched off in the same way as switching it on.

Hint: SIMOCODE can only be controlled via OPC UA if the OPC UA IDs in the
SIMOCODE ES V17 software are connected to the control station (or another
function).

During parameterization of SIMOCODE, it is thus possible to flexibly define


whether control via OPC UA is possible and which functions can be triggered via it.

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 26
2 Engineering
 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 27
2 Engineering

2.6.2 Tab „SIMOCODE ON OFF“

The "SIMOCODE ON OFF" flow is part of the dashboard and forms with the nodes
"ON" and "OFF" one button each for switching the SIMOCODE on and off. These
nodes are taken from the previously installed node palette "node-red-contrib-
dashboard". The parameters of the nodes are made in the Properties window.

Figure 36 – Switching SIMOCODE on/off via ON/OFF button for the dashboard
 Siemens AG 2022 All rights reserved

Figure 37 – Switching SIMOCODE on/off via button in the dashboard

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 28
2 Engineering

Resetting the switch-on or the switch-off command is time-delayed via the "delay"
node.
If the SIMOCODE is switched off in the event of overload, an
automatic reset is performed after receipt of the “overload" status.

Figure 38 – "Delay" node and query "overload” status


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 29
2 Engineering

2.6.3 Tab „SIMOCODE Status“

In this flow, the queries of selected binary status information of the SIMOCODE
and their visualization on the "LED" displays in the dashboard are performed. The
query is performed via an array of node IDs so that the OPC UA client does not
have to establish a connection to the OPC UA server of SIMOCODE multiple
times. A data-efficient query can be created using the "READ MULTIPLE"
command and the transfer of an array field with namespace, node ID and data
type. The "switch" node assigns the data received from the OPC UA client to the
desired "LED" displays of the dashboard.

Figure 39 – Import SIMOCODE status via “readmultiple"


 Siemens AG 2022 All rights reserved

Figure 40 – Read array of Node-ID’s

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 30
2 Engineering

Figure 41 – Node "OPC UA Client" action "READ MULTIPLE"

Figure 42 – Node "switch" LED marshalling via node ID's


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 31
2 Engineering

Figure 43 – Parameterization of LED indicators


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 32
2 Engineering

2.6.4 Tab „SIMOCODE Measured value“

Selected SIMOCODE measured values are read out in this node. These are also
requested via an array transfer with the action "READ MULTIPLE" from the OPC
UA client to the OPC UA server of the SIMOCODE. The values are then ranked on
the "gauge" node and the "chart" node for the dashboard. The number of starts, the
maximum current in %, the active power in W and the voltage in V are displayed.
In addition to the display, the values "Maximum current in %" and "Active power in
W" are written to a file as a numerical value every second. The files are stored in
the root directory under \tmp\current.log and \tmp\power.log.

Figure 44 – Reading and assignment of selected measurement values


 Siemens AG 2022 All rights reserved

Figure 45 – Saving measurement values in files

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 33
2 Engineering

2.6.5 SIMOCODE Dashboard

The SIMOCODE Dashboard can be accessed directly from Node-RED or via the
web address. The dashboard is designed in such a way that it has been adapted to
the format of a smartphone. It consists of the sections Operation, Status, Display
and Chart.
Alternatively, the dashboard can be accessed directly via the following link:
http://127.0.0.1:1880/ui/

Figure 46 – Call SIMOCODE Dashboard


 Siemens AG 2022 All rights reserved

Figure 47 – ON/OFF operation of SIMOCODE

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 34
2 Engineering

Figure 48 – Status of SIMOCODE


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 35
2 Engineering

Figure 49 – SIMOCODE measurments display


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 36
2 Engineering

Figure 50 – SIMOCODE charts


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 37
3 Worth knowing

3 Worth knowing

3.1 OPC UA Communication

An OPC UA server (here SIMOCODE) provides process information of a device at


its interface. The OPC UA Client (here Node-RED with node "OPC UA Client")
connects to the server and can access the data offered. With OPC UA, the OPC
Foundation has defined a platform called OPC Unified Architecture (UA). The aim
of this standard is the generic description and uniform access to all information that
need be exchanged between systems or applications.

OPC UA offers the following features:

 Use of open and platform-independent protocols for network


communication.
 Internet access and communication through firewalls.
 Integrated access control and security mechanisms at protocol and
application level.
 Siemens AG 2022 All rights reserved

3.1.1 Activating OPC UA Server for SIMOCODE in the TIA Portal

The property "OPC UA Server" for SIMOCODE pro V PN is assigned via the
parameters of the SIMOCODE. After calling the PROFINET parameters and
assigning a valid IP address, the property "OPC UA Server activated" has to be
checked in the "OPC UA Server/Web Server" section. Any change to the "Activate
OPC UA Server" parameter requires a restart of the communication interface. By
restarting the communication interface, all Ethernet and PROFINET connections
are interrupted and re-established.

Figure 51 – PROFINET parameters

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 38
3 Worth knowing

Figure 52 – Activate the OPC UA-Server


 Siemens AG 2022 All rights reserved

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 39
3 Worth knowing

3.1.2 Supported security features

SIMOCODE pro V PN supports the following safety functions for OPC UA:

Table 3-1 – OPC UA security modes

Security Policy MessageSecurityMode


None* None
Basic128Rsa152 SignAndEncrypt**

* The certificate exchange is switched off


** The data packets are signed and encrypted with the certificates.

In productive operation it’s recommenced to use the following settings for secure
communication between client and server:

 Security Policy: Basic128Rsa152


 Siemens AG 2022 All rights reserved

 Message Security Mode: SignAndEncrypt

The prerequisite for the certificate exchange in SIMOCODE pro V PN is the


existence of a valid time. SIMOCODE pro V PN has an unbuffered real-time clock
that can be synchronized via the NTP protocol.

Figure 53 – Enabling the NTP server

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 40
4 Appendix

4 Appendix
4.1 Service and Support
Industry Online Support
Do you have questions or need support?
Industry Online Support provides you with around-the-clock access to the entire
service and support know-how and our services.
Industry Online Support is the central address for information on our products,
solutions and services.
Product information, manuals, downloads, FAQs and application examples – all
information is accessible with a few mouse clicks:support.industry.siemens.com

Technical Support
The technical support from Siemens Industry supports you fast and competently
with all technical requests with numerous tailored offerings
– from basic support to individual support contracts.
You can make inquiries to Technical Support in the web form:
siemens.com/SupportRequest

SITRAIN – Digital Industry Academy


 Siemens AG 2022 All rights reserved

With our training courses available worldwide for our products and solutions, we
support you with practical, innovative learning methods and with a coordinated
customer-specific concept.
You can find out more about the training and courses on offer and our sites and
dates at:
siemens.de/sitrain

Service offerings
Our service offerings include the following:
 Plant data Services
 Spare parts services
 Repair services
 Field and maintenance services
 Retrofit and modernization services
 Service programs and contracts
You will find detailed information about our service offerings in the service catalog:
support.industry.siemens.com/cs/sc

Industry Online Support App


The "Siemens Industry Online Support" app provides you with optimum support
even when you are out and about. The app is available for iOS and Android:
support.industry.siemens.com/cs/ww/de/sc/2067

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 41
4 Appendix

4.2 Industry Mall

The Siemens Industry Mall is the platform on which the entire product portfolio of
Siemens Industry is accessible. From selection of the products through ordering and
delivery tracking, the Industry Mall enables complete procurement processing –
directly and independently of time and place:
mall.industry.siemens.com

4.3 Links und literatur


Table 4-1 - Literature

Nr. Thema
 Siemens AG 2022 All rights reserved

\1\ Siemens Industry Online Support


https://support.industry.siemens.com
\2\ Link to the article page of the application example
https://support.industry.siemens.com/cs/document/109816582
\3\ SIMOCODE Manual collection:
https://support.industry.siemens.com/cs/ww/en/view/109743951

4.4 Change documentation


Table 4-2 – Change history

Version Datum Änderung


V1.0 01/2023 First Release

4.5 Tables
Table 1-1 – Hardware components............................................................................................5
Table 1-2 – Software components .............................................................................................6
Table 1-3 – Files of the application example ..............................................................................6
Table 3-1 – OPC UA security modes ....................................................................................... 40
Table 4-1 - Literature............................................................................................................... 42
Table 4-2 – Change history ..................................................................................................... 42

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 42
4 Appendix

4.6 Figures
Figure 1 - Hardware-Setup ........................................................................................................7
Figure 2 – Download node.js .....................................................................................................8
Figure 3 – Node.js Setup...........................................................................................................8
Figure 4 – Check Installation .....................................................................................................9
Figure 5 – Installing Node-RED .................................................................................................9
Figure 6 – Starting Node-RED ................................................................................................. 10
Figure 7 – Call Node-RED in the web browser......................................................................... 11
Figure 8 – Opening the SIMOCODE application file in the TIA Portal ....................................... 12
Figure 9 – Opening the project ................................................................................................ 13
Figure 10 – Preparing the project for loading into SIMOCODE................................................. 14
Figure 11 – Importing project data into SIMOCODE................................................................. 15
Figure 12 – Open commissioning path .................................................................................... 15
Figure 13 - Connect online ...................................................................................................... 16
Figure 14 - Set time command (= PC time in UTC) .................................................................. 16
Figure 15 - Node RED nodes to be installed ............................................................................ 17
Figure 16 – Manage palette call for node installation ............................................................... 17
Figure 17 – Call ‘manage palette’ for node installation via the install-tab .................................. 18
Figure 18 – Search for node-red-contrib-opcua node collection .............................................. 18
Figure 19 – Install node-red-contrib-opcua node collection ...................................................... 18
Figure 20 – Node in installation phase ..................................................................................... 19
Figure 21 – Nodes added to the node collection ...................................................................... 19
Figure 22 – Successfully installed node-red-contrib-opcua node collection .............................. 19
Figure 23 – Successfully installed node collections .................................................................. 20
 Siemens AG 2022 All rights reserved

Figure 24 – Import flow with SIMOCODE application ............................................................... 21


Figure 25 – File Select ............................................................................................................ 21
Figure 26 – Select .json-file ..................................................................................................... 22
Figure 27 – Import .json-file ..................................................................................................... 22
Figure 28 – Succesfull import of .json file................................................................................. 23
Figure 29 – Imported flows ...................................................................................................... 23
Figure 30 – Blue info point and button "Deplay" ....................................................................... 23
Figure 31 – Flow "SIMOCODE Control"................................................................................... 24
Figure 32 – Adjust the IP address in the node "OPC UA Client" ............................................... 25
Figure 33 – Adjusting the IP address in the endpoint ............................................................... 25
Figure 34 – Structure of switching command Set ON ............................................................... 26
Figure 35 - Switching On SIMOCODE and resetting the command .......................................... 26
Figure 36 – Switching SIMOCODE on/off via ON/OFF button for the dashboard ...................... 28
Figure 37 – Switching SIMOCODE on/off via button in the dashboard ..................................... 28
Figure 38 – "Delay" node and query "overload” status ............................................................. 29
Figure 39 – Import SIMOCODE status via “readmultiple" ......................................................... 30
Figure 40 – Read array of Node-ID’s ....................................................................................... 30
Figure 41 – Node "OPC UA Client" action "READ MULTIPLE" ................................................ 31
Figure 42 – Node "switch" LED marshalling via node ID's ........................................................ 31
Figure 43 – Parameterization of LED indicators ....................................................................... 32
Figure 44 – Reading and assignment of selected measurement values ................................... 33
Figure 45 – Saving measurement values in files ...................................................................... 33
Figure 46 – Call SIMOCODE Dashboard ................................................................................. 34
Figure 47 – Operation SIMOCODE ON/OFF .......................................................................... 34
Figure 48 – Status SIMOCODE .............................................................................................. 35
Figure 49 – SIMOCODE display ............................................................................................. 36
Figure 50 – SIMOCODE charts .............................................................................................. 37
Figure 51 – PROFINET parameters ........................................................................................ 38
Figure 52 – Activate the OPC UA-Server................................................................................. 39
Figure 53 – Enabling the NTP server....................................................................................... 40

SIMOCODE pro V PN - Info dashboard with Node-RED


Entry ID 109816582, 01/2023 43

You might also like