Professional Documents
Culture Documents
https://support.industry.siemens.com/cs/ww/en/view/86299299
Warranty and Liability
Note The Application Examples are not binding and do not claim to be complete with
regard to configuration, equipment or any contingencies. The Application
Examples do not represent customer-specific solutions. They are only intended
to provide support for typical applications. You are responsible for the correct
operation of the described products. These Application Examples do not relieve
you of the responsibility of safely and professionally using, installing, operating
and servicing equipment. 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 and without prior notice. If there are any
deviations between the recommendations provided in this Application Example
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 will be excluded. Such an exclusion will 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, body
or health, guarantee for the quality of a product, fraudulent concealment of a
Siemens AG 2015 All rights reserved
Security Siemens provides products and solutions with industrial security functions that
informa- support the secure operation of plants, solutions, machines, equipment and/or
tion networks. They are important components in a holistic industrial security
concept. With this in mind, Siemens products and solutions undergo continuous
development. Siemens recommends strongly that you regularly check for
product updates.
For the secure operation of Siemens products and solutions, it is necessary to
take suitable preventive action (e.g. cell protection concept) and integrate each
component into a holistic, state-of-the-art industrial security concept. Third-party
products that may be in use should also be considered. For more information
about industrial security, visit http://www.siemens.com/industrialsecurity.
To stay informed about product updates as they occur, sign up for a product-
specific newsletter. For more information, visit
http://support.industry.siemens.com.
Table of contents
Warranty and Liability ................................................................................................. 2
Preface .......................................................................................................................... 5
1 Task ..................................................................................................................... 6
2 Solution............................................................................................................... 7
2.1 Solution overview ................................................................................. 7
2.2 Description of the core functionality ..................................................... 8
2.3 Hardware and software components used......................................... 10
2.4 Basic performance data ..................................................................... 12
3 Interface Description of the Blocks ............................................................... 13
3.1 Function block E2M_VISU ............................................................... 13
3.1.1 Function .............................................................................................. 13
3.1.2 Interfaces ............................................................................................ 13
3.2 Function block E2M_SENTRON_PAC_DRV................................... 15
3.2.1 Function .............................................................................................. 15
3.2.2 Interfaces ............................................................................................ 16
3.3 Function block E2M_AIEnergyMeter_DRV...................................... 19
3.3.1 Function .............................................................................................. 19
3.3.2 Interfaces ............................................................................................ 19
3.4 Function block E2M_SIMOCODE_PRO_V_DRV ............................ 23
3.4.1 Function .............................................................................................. 23
Siemens AG 2015 All rights reserved
Preface
Objective of this application
In this application, you learn about the basics of energy data acquisition as well as
the setup of an integrated and logic measuring concept.
The application example is divided into three topic areas.
Documentation is available for each topic area.
The following table shows what topics are described in the respective document.
The document you are currently reading is written in bold letters.
Table 0-1
Document Content
Part 1 Basic Knowledge In this document you learn about the basic
setup of a measuring system for energy
data with SIMATIC components.
Part 2 Programming the This document mainly discusses
Data Acquisition programming the PLC for connecting it to
the visualization.
Furthermore, commissioning the supplied
Copyright Siemens AG 2015 All rights reserved
1 Task
Introduction
Data acquisition is the first step in the energy management process.
2 Solution
2.1 Solution overview
Schematic layout
The figure below shows a schematic overview of the most important components of
the solution:
Figure 2-1
Management level
Control level
Data flow
Basic Comfort Runtime
Advanced WinCC V7
Panel Panel
Copyright Siemens AG 2015 All rights reserved
Field level
Advantages
This application offers the following advantages:
Simple and quick programming through supplied blocks.
The program structure is identical for all measuring devices.
Further processing of data with higher-level systems is possible.
Time saving and cost reduction due to simple integration into existing PLC
program.
Easily expandable to several measuring points.
Scope
This document does not include a description of
how to configure the visualization of energy data.
commissioning SIMATIC, SIRIUS and SIMOCODE components.
Assumed knowledge
Basic knowledge of programming and commissioning of SIMATIC S7, SIRIUS, and
SIMOCODE components is assumed.
S7-300
S7-400
Data Acquisition Data processing S7-1200 Visualization
S7-1500
Start/Stop
(OB1 cycle) 1
Calling
Calling
E2M_Visu
driver block
Read data
Read data from the
record structure
Check
Calculate number of
missing user-defined
Copyright Siemens AG 2015 All rights reserved
values
values
Calculating
1 the gauge
scales
Transfer-
ring bit
masks
Table 2-1
Action Note
1. OB1 cycle Calling OB1
2. Call the driver block
3. Read data record The data is read from the measuring
device.
4. Calculate missing values Any value not supplied by default by the
measuring device, yet can be
calculated, will be calculated here (e.g.
min. and max. values).
5. Define the bit masks The bit masks for the visualization are
defined depending on the measured
values which the device or the driver
block supplies.
6. Write data to the structure The structure with the measured data is
later transferred to the E2M_Visu
block.
7. Call E2M_Visu
8. Read data from the structure
9. Check the number of user-defined
values
Copyright Siemens AG 2015 All rights reserved
Hardware components
Table 2-2
Component No. Article number Note
SIMATIC HMI KTP600 Basic 1 6AV6647-0AB11-3AX0
mono PN
SIMATIC HMI TP900 Comfort 1 6AV2124-0JC01-0AX0
SIMTAIC HMI KTP900 Basic 1 6AV2123-2JB03-0AX0
7KM PAC3200 1 7KM2112-0BA00-3AA0
Switched Ethernet PROFINET 1 7KM9300-0AE01-0AA0 Required for 7KM
module PAC3200
SIMOCODE PRO V PN 1 3UF7011-1AB00-0
Current / voltage 1 3UF7110-1AA00-0 Required for
acquisition module SIMOCODE pro V
Component Note
86299299_E2M_Basic_Knowledge.pdf Basic knowledge on energy data
acquisition (part 1/4)
86299299_E2M_PLC_Programming.pdf This document.
86299299_E2M_Visualization.pdf Documentation Visualizing the
Energy Data (part 3/4).
86299299_E2M_Energy_Meter_Details.pdf Documentation Detailed Information
ET 200SP AI Energy Meter (part 4/4)
86299299_E2M_EnergyMeter_Sample_V12.zip Example project with different
application scenarios of the energy
meter for STEP 7 V12.
86299299_E2M_EnergyMeter_Sample_V55.zip Example project with different
application scenarios of the energy
meter for STEP 7 V5.5.
respective S7 controller.
Respective information is available in the manual of the controller.
The update cycles are also affected by whether the program needs to process
further data or whether it is exclusively assigned to the acquisition of energy data.
This function block provides a uniform interface for visualizing the energy data.
The block represents the link between the driver block of the measuring device
and the visualization of the energy data.
The E2M_VISU block must be called for each measuring point independent of the
measuring device used.
The block has the additional option of also creating up to twelve additional
measured values and transferring them to the visualization (e.g. operating hours
counter of the measuring device).
Note Depending on the target system for which the block was compiled, the block has
the name E2M_VISU, E2M_1200_VISU or E2M_1500_VISU.
3.1.2 Interfaces
Copyright Siemens AG 2015 All rights reserved
Inputs
Table 3-1
Parameter Data type Description
Add_Value_Count (optional) INT Number of user-defined measured values.
AddValue_01 (optional) REAL User-defined measured value 1.
AddValue_02 (optional) REAL User-defined measured value 2.
AddValue_03 (optional) REAL User-defined measured value 3.
AddValue_04 (optional) REAL User-defined measured value 4.
AddValue_05 (optional) REAL User-defined measured value 5.
AddValue_06 (optional) REAL User-defined measured value 6.
AddValue_07 (optional) REAL User-defined measured value 7.
AddValue_08 (optional) REAL User-defined measured value 8.
AddValue_09 (optional) REAL User-defined measured value 9.
AddValue_10 (optional) REAL User-defined measured value 10.
AddValue_11 (optional) REAL User-defined measured value 11.
AddValue_12 (optional) REAL User-defined measured value 12.
Start_Azyclic (optional) BOOL Starts reading the measured values once,
independent of the HMI.
Start_Auto (optional) BOOL Starts automatic reading of the values
independent of the HMI.
Reset_Min_Max_Data BOOL Resets the MIN and MAX values of
(optional) visualization and measuring device.
Reset_Energy_Meter BOOL Resets the energy counters of visualization
(optional) and measuring device.
Outputs
Table 3-3
Parameter Data type Description
HMI_Bits STRUCT Structure for transferring the commands of
the operating device as well as the bit
masks for dynamization of the
visualization.
ERROR DWORD Outputs error codes.
Note All further outputs contain the measured values of the DriverData structure
which are additionally put out.
Copyright Siemens AG 2015 All rights reserved
NOTICE This block was developed for the application of the following devices and
firmware versions.
7KM PAC3200
- Firmware: V 2.3.0
7KM PAC4200
- Firmware: V 1.5.1
Expansion module PROFIBUS DPV1
- MLFB: 7KM9300-0AB01-0AA0
- Firmware: V 4.0
Switched Ethernet PROFINET module
- MLFB: 7KM9300-0AE01-0AA0
- Firmware: V 2.0.1
3.2.1 Function
Copyright Siemens AG 2015 All rights reserved
This function block ensures the data exchange of the measured values for
PROFINET and PROFIBUS with a 7KM PAC3200 and 7KM PAC4200 measuring
device.
The function block supplies the measured data in a standardized structure and
transfers it to the E2M_VISU block for an S7-300 or S7-400, to an
E2M_1200_VISU block for an S7-1200, or to an E2M_1500_VISU block for an
S7-1500 respectively.
Furthermore, the standardized visualization is influenced via a bit mask. Values
which are no longer available are hidden via the bit mask.
Values calculated by the driver block are explicitly labeled via the bit mask.
Note This block does not work with the default Modbus TCP interface of the measuring
device.
For using the block you need the separately available PROFIBUS or PROFINET
module.
For further information on the modules, refer to entry ID 63454754.
3.2.2 Interfaces
Inputs
Table 3-4
Parameter Data type Default Description
ID S7-300/ 0 First input byte of the
S7-400: measuring device in the
INT hardware configuration or
diagnostic address for
PROFINET.
S7-1200/ -
S7-1500: Hardware identifier of the
measuring device in the
HW_IO hardware configuration.
First_Byte_IO_Data INT 0 First input byte of the
measuring device in the
hardware configuration.
States:
1 1-phase
3 3-phase
Comm_Resource_Limit INT 4 Maximum number of
simultaneous SFB calls which
the drive can assign at the
same time.
Automatic_Update (optional) BOOL FALSE Specifies whether the data is
automatically updated
independent of the HMI.
Reset_Min_Max (optional) BOOL FALSE Resets all minimum and
maximum values of the block
with a positive edge.
Reset_Energy_Counter BOOL FALSE Resets all energy counters in
(optional) the measuring device with a
positive edge.
HMI_Bits_Connected BOOL FALSE The HMI_Bits structure is
connected.
Comm_Type INT 1 Specifies the communication
protocol used.
States:
1 PROFINET
2 PROFIBUS
Min_Max_Calculated BOOL TRUE Specifies whether the
minimum and maximum
values are directly read from
the device
(only for PROFIBUS)
Figure 3-1
Copyright Siemens AG 2015 All rights reserved
When using an S7-300 or S7-400, the following value must be specified for the ID
parameter.
PROFIBUS module: First input byte of the configured measured value.
PROFINET module: Diagnostic address of the measuring device.
In order to read the first input byte, at least one measured value must be
configured in the device.
Figure 3-2
The First_Byte_I_O_Data input must be supplied with the first output byte of the
control byte for all controllers.
Figure 3-3
Outputs
Table 3-6
Parameter Data type Default Description
Driver_Data STRUCT Contains all measured values
Copyright Siemens AG 2015 All rights reserved
S7-1200/
S7-1500:
DTL
Error_Location WORD W#16#0 Specifies the error cause and
location.
Error_Code DWORD DW#16# Specifies the error code of the
0 SFB or SFC which has
produced an error.
This function block ensures the data exchange of the measured values for
PROFINET and PROFIBUS with an AI Energy Meter module of an ET 200SP.
The function block supplies the measured data in a standardized structure and
transfers it to the E2M_VISU block for an S7-300 or S7-400, to an
E2M_1200_VISU block for an S7-1200, or to an E2M_1500_VISU block for an
S7-1500 respectively.
Furthermore, the standardized visualization is influenced via a bit mask. Values
which are no longer available are hidden via the bit mask.
Values calculated by the driver block are explicitly labeled via the bit mask.
Additionally, the driver takes on the automatic securing and restoring of the energy
counter values in the event of a power failure at the energy meter module.
Maximum values
Average values
3.3.2 Interfaces
Inputs
Table 3-7
Parameter Data type Default Description
ID S7-300/ 0 First input byte of the
S7-400: measuring device in HW
INT Config.
States:
1 1-phase
3 3-phase
Comm_Resource_Limit INT 4 Maximum number of
simultaneous SFB calls which
the drive can assign at the
same time.
When using an S7-1200 or S7-1500, the hardware identifier of the energy meter
module must be specified for the ID parameter.
It can be read out from the properties of the energy meter module.
Figure 3-4
Copyright Siemens AG 2015 All rights reserved
The First_Byte_I_O_Data input must be supplied with the address of the first
input byte of the module.
Figure 3-5
Outputs
Table 3-9
Copyright Siemens AG 2015 All rights reserved
S7-1200/
S7-1500:
DTL
Error_Location WORD W#16#0 Specifies the error cause and
location.
Error_Code DWORD DW#16# Specifies the error code of the
0 SFB or SFC which has
produced an error.
Time_Stamp_En_Count S7-300/ DT#1990 Time of the last update of the
S7-400: -01-01- energy counter.
DT 00:00:00
S7-1200/
S7-1500:
DTL
Copyright Siemens AG 2015 All rights reserved
This function block ensures the data exchange of the measured values for
PROFINET and PROFIBUS with a SIMOCODE pro V motor management system.
The function block supplies the measured data in a standardized structure and
transfers it to the E2M_VISU block for an S7-300 or S7-400, to an
E2M_1200_VISU block for an S7-1200, or to an E2M_1500_VISU block for an
S7-1500 respectively.
Furthermore, the standardized visualization is influenced via a bit mask. Values
which are no longer available are hidden via the bit mask.
Values calculated by the driver block are explicitly labeled via the bit mask.
3.4.2 Interfaces
Inputs
Table 3-10
Parameter Data type Default Description
ID S7-300/ 0 First input byte of the
S7-400: measuring device in HW
INT Config.
States:
1 1-phase
3 3-phase
Comm_Resource_Limit INT 4 Maximum number of
simultaneous SFB calls which
the drive can assign at the
same time.
Automatic_Update (optional) BOOL FALSE Specifies whether the data is
automatically updated
independent of the HMI.
Reset_Min_Max (optional) BOOL FALSE Resets all minimum and
maximum values of the block
with a positive edge.
States:
1 PROFINET
2 PROFIBUS
Set_Current_Is REAL REAL Set current of the connected
motor.
Nominal_Motor_Current REAL REAL Nominal current of the
connected motor.
When using an S7-1200 or S7-1500, the hardware identifier of the basic device
must be used for the ID parameter.
Copyright Siemens AG 2015 All rights reserved
Figure 3-6
Outputs
Table 3-12
Parameter Data type Default Description
Driver_Data STRUCT Contains all measured values
of the device as well as all
values calculated by the
driver.
S7-1200/
S7-1500:
DTL
Error_Location (optional) WORD W#16#0 Specifies the error cause and
location.
Error_Code (optional) DWORD DW#16# Specifies the error code of the
0 SFB or SFC which has
produced an error.
Time_Stamp_En_Count S7-300/ DT#1990 Time of the last update of the
S7-400: -01-01- energy counter.
DT 00:00:00
S7-1200/
S7-1500:
DTL
This function block ensures the data exchange of the measured values with a
SIRIUS 3RR2441 control device.
The function block supplies the measured data in a standardized structure and
transfers it to the E2M_VISU block for an S7-300 or S7-400, to an
E2M_1200_VISU block for an S7-1200, or to an E2M_1500_VISU block for an
S7-1500 respectively.
Furthermore, the standardized visualization is influenced via a bit mask. Values
which are no longer available are hidden via the bit mask.
Values calculated by the driver block are explicitly labeled via the bit mask.
3.5.2 Interfaces
Inputs
Table 3-13
Parameter Data type Default Description
ID S7-300/ 0 First input byte of the
S7-400: measuring device in HW
INT Config.
0 Master
When using an S7-300 or S7-400, it must be noted that when connecting the ID
input, the address of the respective device IO link port must be added to the first
input byte of the respective device (IO link master) in the PCT tool.
Figure 3-7
Copyright Siemens AG 2015 All rights reserved
Figure 3-8
The First_Byte_I_O_Data input must be supplied with the address of the first
input byte of the module. You need to add the address of the respective IO link port
to this value in the PCT tool.
Figure 3-9
Copyright Siemens AG 2015 All rights reserved
Outputs
Table 3-15
Parameter Data type Default Description
Driver_Data STRUCT Contains all measured values
of the device as well as all
values calculated by the
driver.
S7-1200/
S7-1500:
DTL
Error_Location WORD W#16#0 Specifies the error cause and
location.
Error_Code DWORD DW#16# Specifies the error code of the
0 SFB or SFC which has
produced an error.
This function block ensures the data exchange of the measured values with a
SIRIUS 3UG4841 control device.
The function block supplies the measured data in a standardized structure and
transfers it to the E2M_VISU block for an S7-300 or S7-400, to an
E2M_1200_VISU block for an S7-1200, or to an E2M_1500_VISU block for an
S7-1500 respectively.
Furthermore, the standardized visualization is influenced via a bit mask. Values
which are no longer available are hidden via the bit mask.
Values calculated by the driver block are explicitly labeled via the bit mask.
NOTICE Notice that using this block additionally requires the IO_LINK_DEVICE
block.
You can download this block free of charge under entry ID 82981502 .
3.6.2 Interfaces
Inputs
Table 3-16
Parameter Data type Default Description
ID S7-300/ 0 First input byte of the
S7-400: measuring device in HW
INT Config.
0 master
When using an S7-300 or S7-400, it must be noted that when connecting the ID
input, the address of the respective device IO link port must be added to the first
input byte of the respective device (IO link master) in the PCT tool.
Figure 3-10
Copyright Siemens AG 2015 All rights reserved
Figure 3-11
The First_Byte_I_O_Data input must be supplied with the address of the first
input byte of the module. You need to add the address of the respective IO link port
to this value in the PCT tool.
Figure 3-12
Copyright Siemens AG 2015 All rights reserved
Outputs
Table 3-18
Parameter Data type Default Description
Driver_Data (optional) STRUCT Contains all measured values
of the device as well as all
values calculated by the
driver.
S7-1200/
S7-1500:
DTL
Error_Location (optional) WORD W#16#0 Specifies the error cause and
location.
Error_Code (optional) DWORD DW#16# Specifies the error code of the
0 SFB or SFC which has
produced an error.
This function block ensures the data exchange of the measured values with a
SIRIUS 3RW44 soft starter via PROFIBUS and PROFINET.
The function block supplies the measured data in a standardized structure and
transfers it to the E2M_VISU block for an S7-300 or S7-400, to an
E2M_1200_VISU block for an S7-1200, or to an E2M_1500_VISU block for an
S7-1500 respectively.
Furthermore, the standardized visualization is influenced via a bit mask. Values
which are no longer available are hidden via the bit mask.
Values calculated by the driver block are explicitly labeled via the bit mask.
3.7.2 Interfaces
Inputs
Table 3-19
Parameter Data type Default Description
ID S7-300/ 0 First input byte of the
S7-400: measuring device in HW
INT Config.
0 master
Figure 3-13
Outputs
Table 3-21
Parameter Data type Default Description
Driver_Data (optional) STRUCT Contains all measured values
of the device as well as all
values calculated by the
driver.
S7-1200/
S7-1500:
DTL
Error_Location (optional) WORD W#16#0 Specifies the error cause and
location.
Error_Code (optional) DWORD DW#16# Specifies the error code of the
0 SFB or SFC which has
produced an error.
Copyright Siemens AG 2015 All rights reserved
NOTICE For the communication via PROFIBUS, please note that this block can be
used for PROFIBUS module 7KM9300-0AB01-0AA0 as of firmware version
V2.0.
For the communication via PROFINET, please note that this block can be
used for PROFINET module 7KM9300-0AB01-0AA0 as of firmware version
V2.1.
3.8.1 Function
This function block ensures the data exchange of the measured values for
PROFINET and PROFIBUS with a 3VA compact circuit-breaker (breaker).
The number of 3VA compact circuit-breakers that can be connected at a data
concentrator depends on the type of the data concentrator.
Table 3-22
Copyright Siemens AG 2015 All rights reserved
The communication occurs between the CPU and the PB or PN module plugged in
the data concentrator. The data concentrator directs the message frames to the
addressed 3VA compact circuit-breaker.
The 3 VA compact circuit-breakers can obtain address 1 to 8. The address is equal
to the slot in the hardware configuration in Step 7.
The function block supplies the measured data in a standardized structure and
transfers it to the E2M_VISU block for an S7-300 or S7-400, to an
E2M_1200_VISU block for an S7-1200, or to an E2M_1500_VISU block for an
S7-1500 respectively.
Furthermore, the standardized visualization is influenced via a bit mask. Values
which are no longer available are hidden via the bit mask.
Values calculated by the driver block are explicitly labeled via the bit mask.
Note This block does not work with the default Modbus/TCP interface of the data
concentrator.
For using the block you need the separately available PROFIBUS or PROFINET
module.
Further information on the modules is available in entry ID 26504884 for the
PROFIBUS module and entry ID 26504372 for the PROFINET module.
3.8.2 Interfaces
Inputs
Table 3-23
Parameter Data type Default Description
ID S7-300/ 0 PROFIBUS: 1. Input address of the
S7-400: COM device in HW Config.
INT PROFINET: diagnostic address of
the breaker in HW Config
PROFIBUS: HW ID of the breaker in
S7-1200/ - the device view
S7-1500: PROFINET: HW ID of COM060 in
HW_IO the device view.
First_Byte_I_O_Data INT 0 First input byte of the measuring
device in the hardware configuration
(control/status bytes).
Connection_Type INT 1 Connection variant of the measuring
device.
States:
1 1-phase
11 3-phase
Copyright Siemens AG 2015 All rights reserved
Note The identifier as optional parameter only applies when using the visualization.
The First_Byte_I_O_Data input must be supplied with the first output byte of
the control byte.
Figure 3-15
Outputs
Table 3-25
Parameter Data Start value Description
type
Driver_Data (optional) STRUCT Contains all measured
values of the device as
well as all values
calculated by the driver.
- energy counter 32 bit
format.
S7-1200/
S7-1500:
DTL
Error_Location (optional) WORD W#16#0 Specifies the error cause
and location.
Error_Code (optional) DWORD DW#16#0 Specifies the error code of
the SFB or SFC which has
produced an error.
Breaker_Adr_State WORD W#16#0 Breaker address and
status of the block
Table 3-26
Error_Location Error_Code Description
Error when resetting the energy counters
0x1311 SFB 53 or minimum and maximal values or when
requesting the measured values.
Error during the update of measured
0x1321 SFB 52
values.
The selected measuring variant is not
available. Available values for the 3VA are
0x1372 DW#16#1
1 (1-phase measurement) and 3 (3-phase
measurement).
No resources have been assigned to the
0x1373 DW#16#1
driver for communication.
No resources counters have been
0x1376 DW#16#1 assigned to the driver
(Comm_Resource_Counter).
The selected communication type is
0x1377 DW#16#1 invalid. PROFINET and PROFIBUS are
valid for Comm_Type.
The selected ETU type is invalid. Currently
0x1382 DW#16#1
only ETU type = 8 is supported.
0x1383 DW#16#1 Wrong breaker address, 1-8 is possible
Copyright Siemens AG 2015 All rights reserved
Data concentrator COM800 cannot read the values from all connected breakers
simultaneously. This makes sequential reading necessary.
A separate 3VA_E2M_DRV block instance must be called for each breaker.
To prevent the breakers connected at the same COM800 from polling data
simultaneously, they need to be coordinated. This task is performed by the
E2M_3VA_COORD.
Overview:
Abbildung 3-17
E2M_3VA_DRV E2M_3VA_COORD
Breaker_Active Breaker_Adr_State Breaker_1 Breaker
Active
Breaker_2
E2M_3VA_DRV
Breaker_3
Breaker_Active
Breaker_4
Breaker_Adr_State
Copyright Siemens AG 2015 All rights reserved
Breaker_5
E2M_3VA_DRV Breaker_6
The coordination block has 8 inputs: Breaker_1 to Breaker_8. These inputs are
connected to the Breaker_Adr_State outputs of the individual 3VA_E2M_DRV
instances. Not all 8 inputs must be used.
The breaker address for the breaker in which the data is currently processed is
output at output parameter Breaker_Active. This output is connected with each
Breaker_Active input parameter of the connected 3 VA instances.
Only one breaker at a time can be active. As soon as the data of the active breaker
was read, the coordination block activates the next breaker by outputting the next
breaker address.
If parameter Breaker_Active does not contain the own breaker address, the drive
block is not processed.
If a breaker is not currently edited, it retains the data in the data structures that it
provides to the visualization. The last read values are displayed until they are read
and updated again.
3.8.5 Interfaces
Inputs
Table 3-27
Parameter Data Default Description
type
Breaker_1 WORD 0 1. byte: 1. Breaker address
2. byte: Status (00 inactive; 01
running; 02 finished)
Breaker_2 WORD 0 1. byte: 2. Breaker address
2. byte: Status (00 inactive; 01
running; 02 finished)
Breaker_3 WORD 0 1. byte: 3. Breaker address
2. byte: Status (00 inactive; 01
running; 02 finished)
Breaker_4 WORD 0 1. byte: 4. Breaker address
2. byte: Status (00 inactive; 01
running; 02 finished)
Breaker_5 WORD 0 1. byte: 5. Breaker address
2. byte: Status (00 inactive; 01
Copyright Siemens AG 2015 All rights reserved
running; 02 finished)
Breaker_6 WORD 0 1. byte: 6. Breaker address
2. byte: Status (00 inactive; 01
running; 02 finished)
Breaker_7 WORD 0 1. byte: 7. Breaker address
2. byte: Status (00 inactive; 01
running; 02 finished)
Breaker_8 WORD 0 1. byte: 8. Breaker address
2. byte: Status (00 inactive; 01
running; 02 finished)
Reset BOOL FALSE Resets the block
Outputs
Table 3-28
Parameter Data Start value Description
type
Breaker_Active INT 0 Breaker address of the
3VA switch to be edited at
this moment
Table 3-29
Error_Location Error_Code Description
W#16#1311 Status Error when writing the first job with
WRREC PROFIenergy: for reading the measured
values.
W#16#1312 Status Error when writing the second job with
WRREC PROFIenergy for reading the measured
values.
W#16#1313 Status Error when writing the job with PROFIBUS
WRREC for fetching the measured values.
Table 3-30
Error_Location Error_Code Description
W#16#7000 0 Block waits for new job.
W#16#7001 0 Wait for free communication resource.
Copyright Siemens AG 2015 All rights reserved
During the visualization for WinCC V7, a measured value is displayed in italics if it
was calculated by the driver.
Figure 4-2
CalculateValue1 6 Reserved
CalculateValue1 7 Reserved
Table 4-2
PLC tag Bit (visualization) Object (visualization)
CalculateValue2 8 U_PH_PH_Average
CalculateValue2 9 U_PH_PH_Average_MIN
CalculateValue2 10 U_PH_PH_Average_MAX
CalculateValue2 11 U_PH_N_Average
CalculateValue2 12 U_PH_N_Average_MIN
CalculateValue2 13 U_PH_N_Average_MAX
CalculateValue2 14 I_L1_MIN
CalculateValue2 15 I_L1_MAX
CalculateValue2 0 I_L2_MIN
CalculateValue2 1 I_L2_MAX
CalculateValue2 2 I_L3_MIN
CalculateValue2 3 I_L3_MAX
CalculateValue2 4 I_Average
CalculateValue2 5 I_Average_MIN
CalculateValue2 6 I_Average_MAX
CalculateValue2 7 Reserved
Table 4-3
PLC tag Bit (visualization) Object (visualization)
CalculateValue3 8 S_L1
CalculateValue3 9 S_L1_MIN
CalculateValue3 10 S_L1_MAX
CalculateValue3 11 S_L2
CalculateValue3 12 S_L2_MIN
CalculateValue3 13 S_L2_MAX
CalculateValue3 14 S_L3
CalculateValue3 15 S_L3_MIN
CalculateValue3 0 S_L3_MAX
CalculateValue3 1 S_Total
CalculateValue3 2 S_Total_MIN
CalculateValue3 3 S_Total_MAX
CalculateValue3 4 Reserved
CalculateValue3 5 Reserved
CalculateValue3 6 Reserved
CalculateValue3 7 Reserved
Copyright Siemens AG 2015 All rights reserved
Table 4-4
PLC tag Bit (visualization) Object (visualization)
CalculateValue4 8 P_L1
CalculateValue4 9 P_L1_MIN
CalculateValue4 10 P_L1_MAX
CalculateValue4 11 P_L2
CalculateValue4 12 P_L2_MIN
CalculateValue4 13 P_L2_MAX
CalculateValue4 14 P_L3
CalculateValue4 15 P_L3_MIN
CalculateValue4 0 P_L3_MAX
CalculateValue4 1 P_Total
CalculateValue4 2 P_Total_MIN
CalculateValue4 3 P_Total_MAX
CalculateValue4 4 Reserved
CalculateValue4 5 Reserved
CalculateValue4 6 Reserved
CalculateValue4 7 Reserved
Table 4-5
PLC tag Bit (visualization) Object (visualization)
CalculateValue5 8 Q_L1
CalculateValue5 9 Q_L1_MIN
CalculateValue5 10 Q_L1_MAX
Table 4-6
PLC tag Bit (visualization) Object (visualization)
Copyright Siemens AG 2015 All rights reserved
Voltage (PH-N)
Copyright Siemens AG 2015 All rights reserved
Table 4-8
PLC tag Bit (visualization) Object (visualization)
U_PH_N_Mod 8 U_L1_N
U_PH_N_Mod 9 U_L2_N
U_PH_N_Mod 10 U_L3_N
U_PH_N_Mod 11 U_PH_N_Average
U_PH_N_Mod 12 U_L1_N MIN/MAX
U_PH_N_Mod 13 U_L2_N MIN/MAX
U_PH_N_Mod 14 U_L3_N MIN/MAX
U_PH_N_Mod 15 U_PH_N_Average
MIN/MAX
U_PH_N_Mod 0 Reserved
U_PH_N_Mod 1 Reserved
U_PH_N_Mod 2 Reserved
U_PH_N_Mod 3 Reserved
U_PH_N_Mod 4 Reserved
U_PH_N_Mod 5 Reserved
U_PH_N_Mod 6 Reserved
U_PH_N_Mod 7 No voltage (PH-N) (Value =
FALSE)
Current
Table 4-9
PLC tag Bit (visualization) Object (visualization)
I_Mod 8 I_L1
I_Mod 9 I_L2
Apparent power
Table 4-10
PLC tag Bit (visualization) Object (visualization)
S_Mod 8 S_L1
S_Mod 9 S_L2
S_Mod 10 S_L3
S_Mod 11 S_Total
S_Mod 12 S_L1 MIN/MAX
S_Mod 13 S_L2 MIN/MAX
S_Mod 14 S_L3 MIN/MAX
S_Mod 15 S_Total MIN/MAX
S_Mod 0 Reserved
S_Mod 1 Reserved
S_Mod 2 Reserved
S_Mod 3 Reserved
S_Mod 4 Reserved
S_Mod 5 Reserved
S_Mod 6 Reserved
S_Mod 7 No apparent power
(Value = FALSE)
Active power
Table 4-11
PLC tag Bit (visualization) Object (visualization)
P_Mod 8 P_L1
P_Mod 9 P_L2
P_Mod 10 P_L3
P_Mod 11 P_Total
P_Mod 12 P_L1 MIN/MAX
P_Mod 13 P_L2 MIN/MAX
P_Mod 14 P_L3 MIN/MAX
P_Mod 15 P_Total MIN/MAX
P_Mod 0 Reserved
P_Mod 1 Reserved
P_Mod 2 Reserved
P_Mod 3 Reserved
P_Mod 4 Reserved
P_Mod 5 Reserved
Copyright Siemens AG 2015 All rights reserved
P_Mod 6 Reserved
P_Mod 7 No active power
(Value = False)
Reactive power
Table 4-12
PLC tag Bit (visualization) Object (visualization)
Q_Mod 8 Q_L1
Q_Mod 9 Q_L2
Q_Mod 10 Q_L3
Q_Mod 11 Q_Total
Q_Mod 12 Q_L1 MIN/MAX
Q_Mod 13 Q_L2 MIN/MAX
Q_Mod 14 Q_L3 MIN/MAX
Q_Mod 15 Q_Total MIN/MAX
Q_Mod 0 Reserved
Q_Mod 1 Reserved
Q_Mod 2 Reserved
Q_Mod 3 Reserved
Q_Mod 4 Reserved
Q_Mod 5 Reserved
Q_Mod 6 Reserved
Q_Mod 7 No reactive power
(Value = False)
Energy (counter)
Table 4-13
PLC tag Bit (visualization) Object (visualization)
E_Mod 8 Active rate 1 import
E_Mod 9 Active rate 1 export
E_Mod 10 Active rate 2 import
E_Mod 11 Active rate 2 export
E_Mod 12 Reactive rate 1 import
E_Mod 13 Reactive rate 1 export
E_Mod 14 Reactive rate 2 import
E_Mod 15 Reactive rate 2 export
E_Mod 0 Apparent rate 1 import
E_Mod 1 Apparent rate 2 import
E_Mod 2 Reserved
E_Mod 3 Reserved
E_Mod 4 Reserved
E_Mod 5 Reserved
Copyright Siemens AG 2015 All rights reserved
E_Mod 6 Reserved
E_Mod 7 No energy (counter) (Value
= FALSE)
Frequency
Table 4-14
PLC tag Bit (visualization) Object (visualization)
f_Mod 8 Frequency
f_Mod 9 Frequency MIN/MAX
f_Mod 10 Reserved
f_Mod 11 Reserved
f_Mod 12 Reserved
f_Mod 13 Reserved
f_Mod 14 Reserved
f_Mod 15 Reserved
f_Mod 0 Reserved
f_Mod 1 Reserved
f_Mod 2 Reserved
f_Mod 3 Reserved
f_Mod 4 Reserved
f_Mod 5 Reserved
f_Mod 6 Reserved
f_Mod 7 No frequency
(Value = FALSE)
Cos_Mod 6 Reserved
Cos_Mod 7 No power factor
(Value = FALSE)
5 General Notes
5.1 Prioritizing the communication resources
Through dividing the measuring points to be recorded into several groups,
preferred processing of individual measuring points can be achieved.
Example
The data of 10 measuring points shall be recorded in a plant.
An S7-319 3PN/DP is used which enables simultaneous calling of 8 SFBs.
Measuring points 1-4 shall be processed with preference.
Measuring points 5-10 can temporarily be neglected.
When calling the respective driver block for measuring points 1-4, value 4 is
transferred to the Comm_Resource_Limit parameter. Therefore, one SFB call is
reserved for each measuring point.
For measuring points 5-10, a value of 4 is transferred to the
Comm_Resource_Limit parameter.
In this case, 6 measuring points must share only 4 SFB calls. This delays the
update of the values.
Copyright Siemens AG 2015 All rights reserved
Note The total of the values at the Comm_Resource_Limit parameter must not
exceed the maximum number of SFB calls of your CPU.
Therefore, the program must contain organization blocks OB82 and OB86 in
STEP 7 V5.5, or I/O FLT1 in TIA Portal respectively, especially for controllers of
the S7-300 and S7-400 family.
Table 6-2
No. Action Remark
5. Open the hardware catalog and select the
PAC3200 device.
(Available for PROFINET and PROFIBUS)
Table 6-3
Copyright Siemens AG 2015 All rights reserved
Table 6-4
No. Action Remark
1. Create a new PLC tag of type INT (e.g.
Comm_Resource_Counter)
Note Steps 2-11 need to be performed for each measuring point to be visualized.
Copyright Siemens AG 2015 All rights reserved
The following chapters discuss the acquisition of energy data of an energy meter
module for the ET 200SP module using an S7-1500.
Follow the instructions in the table below to configure the device correctly.
Copyright Siemens AG 2015 All rights reserved
Table 7-2
No. Action Remark
1. Open the network view of the TIA Portal.
2. Open the hardware catalog and select the IM
155-6 PN ST device in ET 200SP.
Before copying the block into the project, the version of the WRREC block to be
used must be set.
Use the following version:
Copyright Siemens AG 2015 All rights reserved
Figure 7-1
Table 7-3
No. Action Remark
1. Select the Libraries task card in the TIA
Portal.
2. Open the E2M Energy Data Monitoring
library and navigate to the Master Copies >
PLC folder via the library tree.
Table 7-4
No. Action Remark
1. Create a new PLC tag of type INT (e.g.
Comm_Resource_Counter)
Note Steps 4-7 need to be repeated for each measuring point to be recorded.
8 Installation
Installing the hardware
The figure below shows the hardware setup of the demo application for WinCC
V7.2 and STEP 7 V5.5.
Here, the energy data is recorded with a 7KM PAC3200 measuring device via
PROFINET and visualized on a PC station with WinCC V7.2.
Figure 8-1
Copyright Siemens AG 2015 All rights reserved
S7-300
172.16.78.41
PROFINET / IE
7KM PAC3200
172.16.78.54
The figure below shows the hardware setup of the demo application for WinCC
V13 and STEP 7 V13.
Figure 8-2
SIMOCODE Pro V
S7-1500 172.16.78.51
172.16.78.40
PROFINET / IE
7KM PAC3200
172.16.78.54
COM 800
172.16.217.67
Copyright Siemens AG 2015 All rights reserved
The S7-1500 controller takes on the data acquisition for all measuring devices.
The energy data of the 7KM PAC3200 measuring device and the SIMOCODE
pro V is visualized on the KTP900 Basic.
The energy data of the 7KM PAC3200 measuring device and the Energy Meter
module is visualized on the TP900 Comfort.
the project has been assigned to all devices the project to your requirements.
and is unique.
11 History
Siemens AG 2015 All rights reserved
Table 11-1
Version Date Modifications
V1.0 02/2014 First version
V1.1 07/2014 SIRIUS control devices added.
Updating to TIA Portal V13.
V2.0 10/2014 SIRIUS 3RW44 added.
nd
Visualization for Basic panels (2 generation) added.
Various changes and bug fixes
V2.1 07/2015 3VA molded case circuit breakers added.
Updating to TIA Portal V13 SP1.