Académique Documents
Professionnel Documents
Culture Documents
If you have any questions concerning this document please e-mail us to the
following address:
online-support.automation@siemens.com
Industrial Security
By the increasing networking of industrial plants the productivity is increased.
However, also IT security risks arise which it is necessary to meet with
corresponding protective measures for Industrial Security. A holistic view is
necessary which takes similarly into account technical measures and contains the
training of employees and the definition of guidelines and processes. This is
necessary to attain the highest possible level of security and to ensure the safe
operation of the plant. You find further information about technical solutions and
Siemens AG 2012 All rights reserved
http://support.automation.siemens.com/WW/view/de/50203404
PROFIenergy
2 V 1.6, Entrys-ID: Entry ID
SIEMENS Automation Task 1
Automation Solution 2
Basics 3
Function Mechanisms of
this Application 4
SIMATIC Configuration 5
PROFIenergy Operation of the
Application 6
Application of PROFINET profile PROFIenergy
Glossary 7
Siemens AG 2012 All rights reserved
Literature 8
10
Copyright
11
12
PROFIenergy
V 1.6, Entry-ID: Entry ID 3
Warranty and Liability
Note The Application Examples are not binding and do not claim to be complete
regarding the circuits shown, equipping and any eventuality. The Application
Examples do not represent customer-specific solutions. They are only intended
to provide support for typical applications. You are responsible for ensuring that
the described products are used correctly. These application examples do not
relieve you of the responsibility to use safe practices in application, installation,
operation and maintenance. When using these Application Examples, you
recognize that we cannot be made liable for any damage/claims beyond the
liability clause described. We reserve the right to make changes to these
Application Examples at any time without prior notice.
If there are any deviations between the recommendations provided in these
application examples and other Siemens publications – e.g. Catalogs – the
contents of the other documents have priority.
We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
Siemens AG 2012 All rights reserved
PROFIenergy
4 V 1.6, Entrys-ID: Entry ID
Table of Contents
Table of Contents
1 Automation Task................................................................................ 6
1.1 Overview ........................................................................................... 6
1.2 Scenarios .......................................................................................... 8
2 Automation Solution........................................................................... 9
2.1 Overview of the overall solution ......................................................... 9
2.2 Description of the core functionality.................................................. 10
2.3 Required Hardware and Software Components ............................... 15
2.4 Basic performance data ................................................................... 16
3 Basics ............................................................................................. 17
3.1 PROFIenergy profile ........................................................................ 17
3.2 Available Hardware.......................................................................... 18
3.3 Required software ........................................................................... 18
4 Function Mechanisms of this Application.......................................... 19
4.1 Functionality FB820 “PE_WOL” ....................................................... 19
4.1.1 Program details on block FB820 ...................................................... 19
4.1.2 Structure of the STATUS signal ....................................................... 21
4.1.3 Structure of the PROFIenergy User DB............................................ 23
5 Configuration ................................................................................... 29
5.1 Configuration of the ET200S interface module ................................. 29
5.2 Configuration of ET200S power module ........................................... 30
Siemens AG 2012 All rights reserved
PROFIenergy
V 1.6, Entry-ID: Entry ID 5
1 Automation Task
1.1 Overview
1 Automation Task
1.1 Overview
Introduction
The importance of energy management will grow in the future. To cut costs by
saving energy in the production is an approach that has been used for quite some
time already. Recently, short production-free times become center of the focus -
from short pauses up to shifts off work.
Main switch turned off - the complete production stops and the lights in the hall go
out. This is the common way in nearly each plant all over the world in production
free times like weekends or during plant vacation shutdown. But what happens
during shorter pauses? Here, the plant proceeds and consumes energy without
delivering productive results.
Is it not possible to put smaller units of the plant that are not needed over a certain
period of time into an energy saving mode while the rest of the plant keeps on
producing?
All this might considerably improve the energy balance of a production unit.
The currently used technology which isolates the production components from the
mains via one or more main switches is inappropriate for that purpose as it
Siemens AG 2012 All rights reserved
PROFIenergy
6 V 1.6, Entrys-ID: Entry ID
1 Automation Task
1.1 Overview
In terms of energy saving the PROFIenergy does not focus on the drive motors
since these are switched off in case of a production stop. It rather concentrates on
the numerous sensors and further electronic components.
Copyright
PROFIenergy
V 1.6, Entry-ID: Entry ID 7
1 Automation Task
1.2 Scenarios
Figure 1-2
Siemens AG 2012 All rights reserved
A variable table and an optional control panel serve to visualize and control.
1.2 Scenarios
Requirements of the automation task
This application example shall present the following switch-on and switch-off
Copyright
scenarios.
Table 1-1
Problem description Explanation
Switch off all the plant components If no staggered switch-off is required; which
means that all parts are switched off at
once
Switch off individual plant components Staggered switch-off
Coordinated shut-down, i.e. necessary
because of the technological process
Switch on individual plant components Staggered switch-on
Switch on all / remaining plant components Components of the plant, which are not
subject to a special switch-on sequence.
PROFIenergy
8 V 1.6, Entrys-ID: Entry ID
2 Automation Solution
2.1 Overview of the overall solution
2 Automation Solution
2.1 Overview of the overall solution
Layout
The following figure shows the most important components of the solution:
Figure 2-1
Siemens AG 2012 All rights reserved
Structure
The plant described above is based in a decentralized design. Via two ET 200S
with several I/O groups (load groups) each, the CPU controls the plant.
PROFIenergy enabled power modules separate the I/O groups. The respective I/O
modules have to supply the sensors and actuators with voltage to achieve
Copyright
appropriate energy savings. The energy is saved by switching off the supply
voltage via the power modules.
A direct supply of the sensors and actuators via a "24V bus" would impede a
selective switch-off and by that the saving of energy.
Input / visualization via HMI are offered as an option. The same information and
input fields are available in a variable table. The panel itself can also be simulated
on the PG via WinCC flexible Runtime.
Required knowledge
It is assumed that the user has basic knowledge in automation, SIMATIC,
PROFINET and project planning with STEP 7.
PROFIenergy
V 1.6, Entry-ID: Entry ID 9
2 Automation Solution
2.2 Description of the core functionality
2nd step:
User block Diag-Addr. with „CmdStart
Bit“ = 1 are queued up for
processing.
User DB Instance DB
1st step:
… … … …
User sets the
„CmdStart Bit“ of
devices to be
turned of to „1“.
PROFIenergy
10 V 1.6, Entrys-ID: Entry ID
2 Automation Solution
2.2 Description of the core functionality
START
Init‘d? yes
no
Init
Update yes
User DB
= 1?
Siemens AG 2012 All rights reserved
no EnQ (DB)
Q.E… yes
>0
Copyright
no
Q.Job
Q.Job. yes
Idle?
DeQ
no
END
PROFIenergy
V 1.6, Entry-ID: Entry ID 11
2 Automation Solution
2.2 Description of the core functionality
START
Clean Queue
Resetting the job queue
Config Devices
Reading configured
devices for PROFINET
I/O system
No. of yes
Devices Determining diagnostic
>0 addresses
Dev. Diag.
no
Siemens AG 2012 All rights reserved
Reading Order ID
Order ID
User DB
Setup of WoL
Connection connection
setup
END END
(Failure) (Initialized)
PROFIenergy
12 V 1.6, Entrys-ID: Entry ID
2 Automation Solution
2.2 Description of the core functionality
Controller Device
(FB820)
START
no Device
prepares
Addt‘l info in DB:
1 Response
- Time_to_operate
- Time_min_Pause
- PE_Mode_ID Response:
- … Time_to_operate
- Wake_Up_Method Time_min_Pause
- Wake_Up_Data Wake_Up_Method
Store Response …
_Length
Copyright
- Wake_Up_Data
- …
Pause_Time
>
Time_min_
yes Start_sleep_mode
Pause
Query Status
PEM_Status
3 Device in an
Store Response
Energy-
Saving_mode
END
PROFIenergy
V 1.6, Entry-ID: Entry ID 13
2 Automation Solution
2.2 Description of the core functionality
Controller Device
(FB820)
START
User-DB
list of devices w: PE_Mode yes
= „0xFE“ Magic-Packet™
- Diag address
- Pause_Time Via T-COM
- WoL DefaultPort: 2189
- Start_Pause_Bit Device in
- …
no Sleep_
2 mode
Siemens AG 2012 All rights reserved
End End_Pause
Pause
Addt‘l info in DB:
- Time_to_operate
- Time_min_Pause
- PE_Mode_ID
- …
Copyright
- Wake_Up_Method
- Wake_Up_Data Device in
_Length Store Response Energy_
- Wake_Up_Data
- …
saving_
mode_x
2 2
PEM_Status
Wait „TTO“
Device in
Store Response Ready_to_
operate_
mode
END
PROFIenergy
14 V 1.6, Entrys-ID: Entry ID
2 Automation Solution
2.3 Required Hardware and Software Components
NOTICE The available block FB „PE_WOL“ can only be used in conjunction with a
CPU with integrated Ethernet interface. This CPU must be able to execute
blocks with a size of more than 40kB.
You cannot use this block on a PROFINET I/O system connected through
an Ethernet CP.
Copyright
PROFIenergy
V 1.6, Entry-ID: Entry ID 15
2 Automation Solution
2.4 Basic performance data
The requirements for the also necessary instance DB are listed in table 2-5.
Table 2-4
Memory requirements for the Instance DB Value
Load memory 7.756 bytes
Working memory 6.904 bytes
Siemens AG 2012 All rights reserved
Also the memory requirements for the User DB need to be fulfilled by the CPU,
which is listed in table 2-6.
Table 2-5
Memory requirements for User DB Value
Load memory 26.142 bytes
Working memory 25.746 bytes
Copyright
Measured data
PROFIenergy
16 V 1.6, Entrys-ID: Entry ID
3 Basics
3.1 PROFIenergy profile
3 Basics
This chapter explains the functions of PROFIenergy, especially the relation
between the functional modules and the hardware.
PROFIenergy devices. In the presented application the states OFF ("PAUSE") and
ON ("READY") are realized. The state "OFF" provides the complete PROFINET
communication ability. This is achieved as the interface module IM151 induces the
selected power modules to switch off the supply voltage for the following electronic
modules (here DI/DO).
For further reference see the under \2\ mentioned literature, which can be
downloaded from \5\
Copyright
PROFIenergy
V 1.6, Entry-ID: Entry ID 17
3 Basics
3.2 Available Hardware
PROFIenergy
18 V 1.6, Entrys-ID: Entry ID
4 Function Mechanisms of this Application
4.1 Functionality FB820 “PE_WOL”
CAUTION Calling the FB820 “PE_WOL” cyclic in OB1 and OB3x may lead to
unpredictable erratic behavior and shall be avoided.
PROFIenergy
V 1.6, Entry-ID: Entry ID 19
4 Function Mechanisms of this Application
4.1 Functionality FB820 “PE_WOL”
DB”.
STATUS DWORD OUTPUT Supplies a STATUS value, which
provides information about the
internal block state.
The STATUS is split into 3
sections. These sections are:
MESSAGE, LOCATION, INFORMATION.
Copyright
PROFIenergy
20 V 1.6, Entrys-ID: Entry ID
4 Function Mechanisms of this Application
4.1 Functionality FB820 “PE_WOL”
The Status signal is coded as follows and contains additional information about the
internal status of the block.
Table 4-2
Bit 31 Bit 23 Bit 15 Bit 0
MESSAGE LOCATION INFORMATION
Table 4-3
Possible values for MESSAGE
16#00 OK or No Error.
16#50 Start of initialization.
16#51 Determining the configured devices of the specified
PROFINET I/O system.
16#52 No devices configured on the specified PROFINET I/O
system.
16#53 Determining the logical diagnostic addresses of the
configured devices.
16#54 Reading interface information for each device.
Siemens AG 2012 All rights reserved
Table 4-4
Possible values for LOCATION
16#00 Not initialized or idle.
16#70 Waiting for jobs to be queued.
16#71 Adding job to the queue.
16#72 Preparing request data record for sending.
16#73 Sending request data record.
16#74 Waiting for response from device.
16#75 Evaluating the response data record from device.
16#76 Removing job from the queue.
16#FF Unknown situation detected.
PROFIenergy
V 1.6, Entry-ID: Entry ID 21
4 Function Mechanisms of this Application
4.1 Functionality FB820 “PE_WOL”
Table 4-5
Possible values for INFORMATION
16#0000 No additional information available and No jobs active.
16#0001 – Processing of 1 – 255 jobs currently active.
16#00FF
16#8001 Error at 1. Parameter.
16#8002 Error at 2. Parameter.
16#8003 Error at 3. Parameter.
16#8004 Error at 4. Parameter.
16#8005 Error at 5. Parameter.
This error will be reported, as soon as there is an invalid
or missing parameterization to the User DB detected. The
User DB may be
- Too small,
- Write protected,
- Not loaded into RAM (only in load memory)
- Invalid for the used CPU
16#8100 There are more than the maximum possible 256 jobs
active. This represents a temporary issue and solves itself
as soon as a previous job is finished. The last job request
wasn’t accepted and needs to be placed again.
Siemens AG 2012 All rights reserved
NOTE You may not see all of the above mentioned status codes, since there may be
more than just one job active for multiple devices.
PROFIenergy
22 V 1.6, Entrys-ID: Entry ID
4 Function Mechanisms of this Application
4.1 Functionality FB820 “PE_WOL”
The User DB for the PROFIenergy block FB820 „PE_WOL“ creates a database for
the processing of requests to multiple devices. For this to work properly the format
of the User DB has to be well defined and documented. Within the library Siemens
provides a UserDB to achieve this goal. The structure of the UserDB is described
in the table below.
Table 4-6
Addr. Name Data type Meaning
+0.0 Header STRUCT --- Header information
+0.0 Update BOOL R/W Signal to indicate a
data change in the data
area.
block didn’t
finished the
initialization (yet).
+0.2 LinkUp BOOL R Signal indicating a
successfully configured
Ethernet interface.
Default= 2189
+46.0 Connection STRUCT --- Contains the connection
configuration for the
„Wake on LAN“ functionality.
+46.0 block_length WORD R Length of the structure
always B#16#40
+48.0 id WORD R/W Connection ID
+50.0 connection_type BYTE R/W Connection type:
UDP = B#16#13
PROFIenergy
V 1.6, Entry-ID: Entry ID 23
4 Function Mechanisms of this Application
4.1 Functionality FB820 “PE_WOL”
PROFIenergy
24 V 1.6, Entrys-ID: Entry ID
4 Function Mechanisms of this Application
4.1 Functionality FB820 “PE_WOL”
error to a device.
+168.7 StatusRetryEx BOOL R Indicates a non successful
command execution. The block
removed the last request to
this device from the queue.
+169.0 CmdStartPause BOOL R/W Places a START_PAUSE command
for this device into the
queue.
+169.1 CmdEndPause BOOL R/W Places an END_PAUSE command
for this Device into the
queue
Copyright
PROFIenergy
V 1.6, Entry-ID: Entry ID 25
4 Function Mechanisms of this Application
4.1 Functionality FB820 “PE_WOL”
o
Each part of the DB has s specific constant size. This leads to a constant minimum
size for that User DB of 25.746 byte.
green fields can be filled by the customer code.
blue fields may be used by the customer
(for user specific Information)
NOTICE The predefined structure of the UserDB shall not be changed. Neither
Copyright
PROFIenergy
26 V 1.6, Entrys-ID: Entry ID
4 Function Mechanisms of this Application
4.1 Functionality FB820 “PE_WOL”
Table 4-7
Bit Hex Service name Meaning
encoding
0 0x0001 PE_IDENTIFY This command allows the
retrieval of the supported
services by a PROFIenergy
enabled device
1 0x0002 PE_START_PAUSE The device supports the at at
least one additional energy
saving mode
2 0x0004 PE_END_PAUSE The device can be switched
back to
READY_TO_OPERATE mode
3 0x0008 PEM_STATUS The device supports status
requests
4 0x0010 PE_QUERY_MODE The device supports the
retrieval of a list of supported
energy saving modes and
Siemens AG 2012 All rights reserved
Connectionparameters
The FB820 “PE_WOL” reserves a connection resource out of the pool for “open
communication”. This connection will be used with UDP. The following parameters
need to be set in the UserDB.
ConnectionID
PortNo
LocalDeviceID
PROFIenergy
V 1.6, Entry-ID: Entry ID 27
4 Function Mechanisms of this Application
4.1 Functionality FB820 “PE_WOL”
ConnectionID
The ConnectionID is an integer number in the range of 1 to 32. The default setting
is 31. It serves the identification of the firmware internal assigned communication
resources, such as send- and receive buffers.
The ConnectionID needs to be unique CPU wide.
This parameter refers to the WORD type parameter “Connection.id”.
PortNo
The port number identifies the UDP port used to send the WakeOnLAN packet.
The port number is part of the communication resources, which are identified
firmware internal by the connectionID. The port numbers are listed and assigned to
applications by the IANA. The used default setting for the port number is 2189,
which is unused as of the time this document was written.
The parameter can be modified in the UserDB at “Header.PortNo”. the modified
value will be transferred during the initialization process into the connection
specification. The affected values are “Connection.local_tsap_id[1]” and
“Connection.rem_tsap_id[1]”.
LocalDeviceID (InterfaceID)
Siemens AG 2012 All rights reserved
Table 4-8
„local_device_id“
PROFIenergy
28 V 1.6, Entrys-ID: Entry ID
5 Configuration
5.1 Configuration of the ET200S interface module
5 Configuration
At the moment only the head and power modules named above can be delivered
with PROFIenergy functionality. You can adapt and change the delivered example
program according to your needs and your hardware equipment. In the following
chapters the crucial steps of the hardware configuration are described. If you want
to integrate the PROFIenergy blocks into existing software, you can rename them.
Select one of the PROFIenergy-enabled head modules (V7.0) and add it to the
PROFINET I/O system.
PROFIenergy
V 1.6, Entry-ID: Entry ID 29
5 Configuration
5.2 Configuration of ET200S power module
Insert at least one PROFenergy-enabled power module into the ET200S station.
You are free to select the further equipment. You can either select further
PROFIenergy power modules or any other modules.
PROFIenergy
30 V 1.6, Entrys-ID: Entry ID
5 Configuration
5.3 Calling the FB820 “PE_WOL”
The regular call inside the cyclic program (OB1 or OB3x) could be reduced as
shown in the next figure.
PROFIenergy
V 1.6, Entry-ID: Entry ID 31
5 Configuration
5.3 Calling the FB820 “PE_WOL”
Figure 5-4
Make sure the COM_RST parameter get a “False” value assigned after
Note
initialization. Otherwise the block will continuously stay in the initialization
routine.
Siemens AG 2012 All rights reserved
Copyright
PROFIenergy
32 V 1.6, Entrys-ID: Entry ID
6 Operation of the Application
6.1 Overview
Between two commands should be at least one block call with an „Update“ = False.
Otherwise the new commands may not be detected and therefore not processed.
Figure 6-1
CmdStartPause
Siemens AG 2012 All rights reserved
CmdEndPause
CmdUpdateStatus
Update
Copyright
The above figure demonstrates the timely sequence of the three possible
commands. They will be processed one after the other independently of the
success of the previous command.
Setting all three command requests at once, only a single command will be
executed, the others will be discarded. The block implements a priorization of the
commands, which prefers the CmdStartPause command with the highest priority
over the other commands. The command CmdEndPause will be discarded when
CmdStartPause is selected, but has a higher priority than the CmdUpdateStatus
command.
In the case all three commands are selected at the same call, the not executed
commands will stay active. This way the next rising edge on „Update” causes the
next command to be scheduled for execution.
PROFIenergy
V 1.6, Entry-ID: Entry ID 33
7 Glossary
7 Glossary
PROFIenergy
PROFIenergy is a vendor independent, standardized and open application profile
on PROFINET. It provides a standardized method to retrieve energy consumption
data from devices and/ or execute power switching on enabled devices.
Wake On LAN
The Wake On LAN functionality allows data processing equipment to resume
operation from an almost power off state on receipt of a specially crafted Ethernet
packet. For this to work properly the data processing equipment need to have a
network controller, which is enabled to receive such a packet.
This packet (also called a Magic Packet ™) has a special format containing the
network controllers MAC address 15 times.
Siemens AG 2012 All rights reserved
Copyright
PROFIenergy
34 V 1.6, Entrys-ID: Entry ID
8 Related Literature
8 Related Literature
8.1 Bibliography
This list is not complete and only represents a selection of relevant literature.
Table 8-1
Subject Title
/1/ STEP7 Automation with STEP7 in STL and SCL
Hans Berger
Publisher: Vch Pub
ISBN-10 3895783412
ISBN-13 9783895783418
/2/ PROFIenergy Common Application Profile PROFIenergy; Technical
Profile Specification for PROFINET; Version 1.0;
January 2010; Order No: 3.802
This list is not complete and only represents a selection of relevant information.
Table 8-2
Subject Title
\1\ Reference to the http://support.automation.siemens.com/WW/view/en/EntryID
entry
\2\ Siemens I IA/DT http://support.automation.siemens.com
Customer Support
\3\ Decentral I/O http://support.automation.siemens.com/WW/view/de/1144348
Copyright
system ET200S -
Manual
\4\ FW download http://support.automation.siemens.com/WW/view/de/35934244
PROFIenergy
V 1.6, Entry-ID: Entry ID 35