Upload
rockdrigos
View
215
Download
0
Embed Size (px)
Citation preview
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 1/55
http://support.automation.siemens.com/WW/view/81066268
Application description
10/2013
Realization of a Fault-
Tolerant Tunnel Lighting
System With S7-400HSIMATIC H-System S7-400H
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 2/55
Warranty and liability
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 2
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Warranty and l iability
Note The Application Examples are not binding and do not claim to be completeregarding the circuits shown, equipping and any eventuality. The ApplicationExamples do not represent customer-specific solutions. They are only intendedto provide support for typical applications. You are responsible for ensuring thatthe described products are used correctly. These application examples do notrelieve you of the responsibility to use safe practices in application, installation,operation and maintenance. When using these Application Examples, yourecognize that we cannot be made liable for any damage/claims beyond theliability 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 theseapplication examples and other Siemens publications – e.g. Catalogs – thecontents 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 shallnot 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 adeficiency or breach of a condition which goes to the root of the contract(“wesentliche Vertragspflichten”). The damages for a breach of a substantialcontractual obligation are, however, limited to the foreseeable damage, typical for the type of contract, except in the event of intent or gross negligence or injury to
life, body or health. The above provisions do not imply a change of the burden of proof to your detriment.
Any form of duplication or distribution of these Application Examples or excerptshereof is prohibited without the expressed consent of Siemens Industry Sector.
CautionThe functions and solutions described in this article confine themselves to therealization of the automation task predominantly. Please take into accountfurthermore that corresponding protective measures have to be taken up in thecontext of Industrial Security when connecting your equipment to other parts of theplant, the enterprise network or the Internet. Further information can be found
under the Item-ID 50203404.
http://support.automation.siemens.com/WW/view/en/50203404
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 3/55
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 4/55
1 Task
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 4
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
1 Task
Introduction
The safe operation of a tunnel not only requires security systems (e.g. fireprotection systems), but also systems for ventilation, lighting and traffic signcontrol.
For this reason, these systems should also be integrated in the tunnel securityconcept and protected against damage.
Today, the use of redundant systems for tunnel operation is a mandatoryrequirement, so as to ensure a high level of security and availability. Thecomplexity of fault-tolerant systems is alleviated through the use of modular structures.The individual modules – in this example the systems for safe tunnel operation – can be easily separated from each other.
The example presented here focuses on the “tunnel lighting system” as a separate
module.
The lighting system is not merely important for traffic safety, it is also closelyconnected with the smooth flow of traffic. A high degree of illumination qualityincreases the driving safety and driving pleasure and thus conduces to a harmonictraffic flow.
Overview of the automation task
The following figure provides an overview of the automation task.
Figure 1-1
Control room 1
Control room 2
Light intensity areas
Entrance ligh t Interior light Exit light
Light sensor
level 1
level 2
level 3
Choose Intensity level
Descripti on of the automation task
The abrupt light changes when entering and leaving the tunnel shall be smoothedby a tunnel lighting system which meets the adaptability of the human eye. Theoperator control and monitoring functions shall be realized with the help of a localHMI panel.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 5/55
1 Task
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 5
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
The following requirements shall be fulfilled by the automation system:
· Light intensity measurement outside the tunnel by means of a light sensor.
· Light intensity control:
– The entrance and exit lights depend on the values measured (three-step
control). The function and the values of the light at the entrance and exitremain always the same.
– The interior light depends on the time of day.
· Plausibility check of the outside sensor measurement: A defect sensor or external influences (e.g. fog) may lead to values that would not be measuredunder normal conditions (e.g. correctly working light sensor, no unusualexternal influences). This might lead to the measurement of a night situationduring daytime, for example.
· Realization of the tunnel lighting task using the fault-tolerant S7-400H systemon the basis of a function block.
The following points shall be realized with a local HMI panel:
· Changeover between automatic and manual mode.
· Control of the tunnel lighting levels.
· Specification of the light intensity limit values for the outside light sensor.
· Indication of group information about the status of the fault-tolerant system.
· Display of the result from the sensor plausibility check.
· Password protection for the HMI panel to prevent unauthorized manipulation.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 6/55
2 Solution
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 6
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
2 Solution
2.1 Overview
Schematic layout
The following figure provides a schematic overview of the solution and its mostimportant components:
Figure 2-1
Control room 1 Control room 2
ET 200M
HMI-PanelS7-400H
ET 200M
HMI-Panel S7-400H
Industrial Ethernet
PROFIBUS DP
synchronisation
FB 100
Tunnel_Lighting_
System
FB 100
Tunnel_Lighting_
System
Structure
Each control room is equipped with a fault-tolerant system (CPU 416-5H) includinga distributed I/O system (ET200M) and an HMI panel.The ET 200M is a redundant system (two head modules) which is additionallyprovided with an analog input module and a digital output module.The HMI panel (MP 370 Touch) is used for visualization and operator control.
Network integration is laid out as follows:
· The S7-400H stations and the HMI panel are connected via Industrial Ethernet
· In control room 1: Connection of the CPU with always the first head module of the ET 200M stations via PROFIBUS DP.
· In control room 2: Connection of the CPU with always the second head moduleof the ET 200M stations via PROFIBUS DP.
Note In our test setup, the use of an analog module for connection with the outsidesensor has been omitted, as the light intensity is entered manually in thisexample application.
Advantages
The solution presented here offers the following advantages:
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 7/55
2 Solution
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 7
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
· Configuration and programming of the H-systems is identical to that of standard systems; only a few additional hardware components are required.
· No further configuration of the redundancy-specific functions andconfigurations. This is effected by the optional package “S7-H-Systems”
(integrated in STEP 7 Version 5.3 or higher).
· Integrated self-diagnosis function of the H-system (besides the standarddiagnosis functions) for advance error identification and indication, beforethese errors affect the process.
· Replacement of components (hot swapping) and performance of program andconfiguration changes while the system remains running.
· The use of two control rooms enables the local distribution of redundantsystems. If a fire breaks out in one control room, the redundant system willtake over and vital functions such as ventilation, lighting and traffic signalingwill remain operative.
· Realization with the function block FB 100 makes the system for tunnel lighting
control transparent to the user so that it can be easily modified or expanded.
Assumed knowledge
The following knowledge is assumed:
· Basic experience with STEP 7
· Basic experience with fault-tolerant systems, S7-400H
· Basic experience with WinCC flexible
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 8/55
2 Solution
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 8
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
2.2 Descr iption of the core functionali ty
2.2.1 Function block FB 100 “ Tunnel_Lighting_System”.
Overview
The core element of the automation task is the function block“Tunnel_Lighting_System”.
This block is used to control the tunnel lighting for the entrance, interior and exitzones in automatic or manual mode.
The function principle of the block depends on the selected mode of operation.
Function princip le in automatic mode
In automatic mode, a light sensor measures the light intensity outside the tunnel.Depending on the result, the light intensity level of the entrance and exit light willbe adapted accordingly.
The table below shows the sensor limit values and the associated light levels for the entrance and exit zones.
Table 2-1
Light intensity measured by the outside sensor in Cd (lm/ser)
Level
Set_Val_Lev1 - Set_Val_Lev2 Level 1
Set_Val_Lev2 - Set_Val_Lev3 Level 2
Set_Val_Lev3 - Set_Sensor_MAX_VAL Level 3
The sensor intensity limits (Set_Val_LevX) are defined via the local HMI panel.
The interior light is also broken down into three levels and depends on the relevant
time of day.
Table 2-2
Time of day Level
Nighttime: 00:00 to 06:00 and 20:00 to 23:59 Nightlight
Sunrise or sunset time: 6:00 to 8:00;
18:00 to 20:00
Morning and evening twilight
Daytime: 08:00 to 18:00 Daylight
The functional interaction of the required light levels between entrance, exit andinterior light are listed in the following table:
Table 2-3
Time of day Expected light intensity Level
00:00 to 06:00
20:00 to 23:59
Set_Val_Lev1 - Set_VAL_Lev2 Level 1 or nightlight,respectively
6:00 to 8:00
18:00 to 20:00
Set_Val_Lev2 - Set_VAL_Lev3 Level 2 or evening andmorning twilight,respectively
08:00 to 18:00 Set_Val_Lev3 -Set_Sensor_MAX_VAL Level 3 or daylight,respectively
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 9/55
2 Solution
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 9
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
The function block FB 100 “Tunnel_Lighting_System” performs a plausibility checkof the light intensity values measured by the sensor.If this check is negative, e.g. resulting from a defect or incorrect light sensor values(weather conditions: fog or rain), the required light levels for the entrance, exit or
passing zones will be activated automatically. In addition, a message will appear on the local HMI panel.
The light control system can be explained by the following example:
If a light intensity between “Set_Val_Lev3” and “Set_Sensor_MAX_VAL” ismeasured during daytime, light level 3 will be activated automatically for theentrance and exit zone. The interior light will be set to “daylight” in accordance withthe time of day.
.
Function princ iple in manual mode
In this mode of operation, the lighting of the entrance, exit and interior zones iscontrolled with the help of three manually controlled light levels. The light levels areactivated via the local HMI panel. The table below shows the relation between themanually controlled light levels and the associated light levels in the entrance, exitand interior zones.
Table 2-4
Desired light level Entrance and exit zones Interior zone
Entrance_Exit_Level1_Man Entrance_Exit_Level1 Nightlight
Entrance_Exit_Level2_Man Entrance_Exit_Level2 Morning and eveningtwilight
Entrance_Exit_Level3_Man Entrance_Exit_Level3 Daylight
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 10/55
2 Solution
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 10
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
2.2.2 User interface for visualization on the local HMI panel
Each control room is equipped with a local HMI panel. The user interface for
visualization on the panels is identical.Visualization on the local HMI panels
Figure 2-2
Note Visualization can also be effected with WinCC flexible Runtime.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 11/55
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 12/55
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 13/55
2 Solution
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 13
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
2.3 Hardware and software components
The function example was reproduced using the following components.
Hardware components
Table 2-6
Component Qty. Order number Note
Power SupplyAC120/230V/10A 2 6ES7 407-0KA01-0AA0 Standard power supplymodule
Power Supply AC120/230V/5A 2 6ES7 307-1EA00-0AA0 Standard power supplymodule
CPU 416-5H 2 6ES7 416-5HS06-0AB0 Firmware V6.0 or later
IM153-2 HF 4 6ES7 153-2BA02-0XB0 Redundant structure
DO SM 322 for ET 200M 2 6ES7322-8BH00-0AB0 Digital output module
MP 370 Touch 2 6AV6 545-0DA10-0AX0 12’’ HMI panel
PC 1 For engineering purposes
SCALANCE X208 2 6GK5208-0BA10-2AA3
Note You may also use similar products which deviate from the list above. In thiscase, please note that changes to the sample code (e.g. different addresses)
may become necessary.
NotePlease also note that a pairwise and redundant installation requires the use of modules of the same product and firmware versions.
Software components
Table 2-7
Component Qty. Order number Note
SIMATIC STEP7 V5.5 +SP3 1 6ES7810-5CC11-0YC5..
Floating license for 1user
SIMATIC WinCCFlexible+ RUNTIME2008 SP3
1 6AV6612-0AA51-3CA5 Floating license for 1user
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 14/55
2 Solution
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 14
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Block library " Functional I/O Redundancy"
The block library “Functional I/O Redundancy” supplied with the S7-400 H optionspackage contains the following blocks supporting the redundant inputs andoutputs.
Table 2-8
Functional I/O redundancy blocks Applied Used in
FC 450 "RED_INIT": Initialization function X OB72, OB100 and OB102
FC 451 "RED_DEPA": Triggers re-enable function - -
FB 450 "RED_IN": Function block to read in redundantinputs
X OB1
FB 451 "RED_OUT": Function block to controlredundant outputs
X OB1
FB 452 "RED_DIAG": Function block for the diagnosisof redundant I/Os
X OB72, OB82,OB83 and OB85
FB 453 "RED_STATUS": Function block for redundancystatus information.
X OB1
Note Functionality and application of the blocks are described in the associated onlinehelp.
Further libraries
In addition, the following libraries from the SIMATIC library are required for thisexample:
·
“Redundant IO CGP V5.X“: Blocks for channel group granular redundancy· “Redundant IO CGP V4.X”: Blocks for channel granular redundancy
· “Redundant IO MGP V3.X”: Blocks for module granular redundancy
These libraries can be opened in the SIMATIC Manager by selecting "File > Open> Libraries"
Note For supplementary information on the subject of “Functional I/O Redundancy”,please refer to the manual: “SIMATIC Fault-Tolerant Systems S7-400H”, see \3\.
Sample files and projects
The following list shows all files and projects used in this application example.Table 2-9
Component Note
81066268_Tunnel_Lighting_System_v10.zip This zip file includes the
STEP 7- and WinCC flexible project.
81066268_Tunnel_Lighting_System _v10_de.pdf This document.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 15/55
3 Realization of “Fault Tolerance”
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 15
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
3 Realization of “ Fault Tolerance”
3.1 The automation system S7–400H
3.1.1 Description
The requirements on tunnel lighting control are fulfilled with the help of afault-tolerant system.
The automation system S7–400H satisfies the high demands on availability,intelligence and decentralization placed on modern automation systems.Furthermore, it also provides all functions required for the acquisition andpreparation of process data, including functions for the control, management andmonitoring of plants and aggregates.
3.1.2 Struc ture of the H-Systems
Overview
In order to ensure the reliable availability of the S7–400H system even if an error occurs, it is laid out in a redundant structure (master and standby station). Allessential components, such as the central processing unit (CPU), the power supplymodule and the hardware for connection between the two CPUs are doublypresent.
Usually, the master and standby stations are arranged in a centralized structure.
Figure 3-1
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 16/55
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 17/55
3 Realization of “Fault Tolerance”
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 17
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
3.1.3 Function principle
The H-system is suitable to establish a redundant system environment with two
CPUs and so ensures switchover to the standby system, if the master system fails.The event-controlled synchronization enables a fast and bumpless switchover between the two stations in case of a failure. The redundant CPU steps in andcontinues operation at the point of failure, so that no information or alarm will belost.
Under the aspect of user program processing, the S7-400H follows the sameprinciple as a standard system. The synchronization functions are integrated in theoperating system and run automatically and entirely in the background. Thesefunctions need not be considered in the user program.
In a redundant operating mode, the user programs in the two CPUs are completelyidentical and processing is performed in an event-controlled approach.
3.2 Distributed I/Os3.2.1 Description
One decentralized I/O module ET200M is connected as DP slave to the fault-tolerant automation system via PROFIBUS DP. The redundant structure isobtained by means of an additional ET 200M and an additional PROFIBUS DPconnection.
3.2.2 Redundant I/O structure
The add-on modules in the distributed I/O device ET200M, also referred to asinterface modules (IM), are used as a PROFIBUS DP interface. In a redundant I/O
structure, two interface modules (IMs) per ET 200M station are required and bothmust be set to the same bus address.This is to ensure bumpless continuation by the passive module, if the active add-onmodule fails during operation. The active interface is indicated by the LED ACT of the corresponding add-on module.
Connection of the redundant I/Os to the H-system is effected in the connected DPslave mode. This means that both the master station and the stand-by station areconnected with the two ET200M stations.
Figure 3-3
Redundant module pair
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 18/55
3 Realization of “Fault Tolerance”
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 18
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
The use of redundant I/O modules ensures that the connected I/Os remainavailable for the process, even if the following situations arise:
· Failure of a signal module
·
Failure of an interface module· Failure of the ET200M station
· Failure of an H-CPU
· Failure of a PROFIBUS-DP segment
3.3 Redundant connections
The demand for highest availability also includes the communication. Dependingon the specific network topology, redundant connections with automatic switchover in case of failure can be realized. If a failure occurs, the fault-tolerantcommunication will be continued automatically and entirely in the background.
Note In this application example, fault-tolerant communication has not beenconfigured.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 19/55
4 Program Blocks for Tunnel Lighting Control
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 19
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
4 Program Blocks for Tunnel Lighting Control
4.1 General overview
Graphical illu stration
The graphic below shows the program structure of the entire STEP 7 project.
Figure 4-1
OB 1
FB 1„H-SYS_STATUS“
FB 100„Tunnel_Lighting_System“
DB 101„SYS_DATA_HMI“
DB 102„HMI_CONTROLLER“
SFC 1,
SFC 51
SFC 2, 3,4
FC 6, 8, 105
Meaning of the blocksThe blocks fulfill the following functions:
Table 4-1
Block Function
OB 1 Organization block; called at cyclic intervals.
FB 1 “H-SYS_STATUS” Provides information on the current status of the H-system.
FB 100“Tunnel_Lighting_System”
Tunnel lighting control system.
DB 101 “SYS_DATA_HMI” Display interface between HMI panel and CPU.
DB102 “HMI_Controller” Control interface between HMI panel and CPU.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 20/55
4 Program Blocks for Tunnel Lighting Control
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 20
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Overview of s tandard functions
The following table shows the functions from the S7 standard library required for the realization of the tunnel lighting control system.
Table 4-2
S7-Functions
Description Used in
SFC 1 SFC 1 "READ_CLK" (read system clock) is used to readthe clock time and date from the CPU.
FB1 “H-SYS_STATUS“
SFC 2 With SFC 2 "SET_RTM" (set runtime meter) , theelapsed-time counter of the CPU can be set to aspecified value.
FB100“Tunnel_Lighting_System“
SFC 3 SFC 3 "CTRL_RTM" (control runtime meter) is used tostart or stop the elapsed-time counter.
FB100“Tunnel_Lighting_System“
SFC 4 SFC 4 "READ_RTM" (read runtime meter) is used to
read out the elapsed-time counter.
FB100
“Tunnel_Lighting_System“SFC 51 SFC 51 "RDSYSST" (read system status) is used to read
an SZL sub-list or an excerpt from an SZL sub-list.FB1 “H-SYS_STATUS“
FC 6 The function FC 6 is used to extract the data formatDATE from the DATE_AND_TIME format. The DATE islocated between the limits DATE#1990-1-1 andDATE#2089-12-31.
FB100“Tunnel_Lighting_System“
FC 8 The function FC 8 is used to extract the data formatTIME_OF_DAY from the DATE_AND_TIME format.
FB100“Tunnel_Lighting_System“
FC 105 The “Scale Values” function is used to convert integralvalues into real numeric values.
FB100“Tunnel_Lighting_System“
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 21/55
4 Program Blocks for Tunnel Lighting Control
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 21
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
4.2 Function block “ H-SYS_STATUS” (FB 1)
4.2.1 Description
The function block “H-SYS_STATUS” (FB 1) is called in OB1 at cyclic intervals.
When the system function “RSYSST” (SFC 51) with the SZL-ID (system status listID) W#16#0071 is called within this function block, information on the current statusof the H-system will be read out.This information will then be buffered in the global data block “SYS_DATA_HMI”(DB101) for visualization of the H-system status on the local HMI panels.
For supplementary information on the individual system functions, please refer tothe manual: “System and Standard Functions for S7-300/400 Volume1/2“, see\5\.
4.2.2 Structure of the system status list W#16#0071
The sub-list identified by the SZL-ID (system status list ID) W#16#0071 providesinformation on the current status of the H-system. 16 bytes can be read out in total.
The data record is structured as follows:
Table 4-3
Content Length Description
redinf 2 bytes Information on redundancy
mwstat1 1 byte Status byte 1
Bits 0-3: Reserved
Bit 4: H-status of CPU in rack 0
=0: standby CPU
=1: master CPUBit 5: H-status of CPU in rack 1
=0: standby CPU
=1: master CPU
Bits 6/7: Reserved
mwstat2 1 byte Status byte 2
Bit 0: Synchronization between CPU 0 and CPU 1
=0: not possible
=1: possible
Bits 1/2: 0
Bit 3: Reserved
Bit 4:
=0: CPU not inserted in rack 0 =1: CPU inserted in rack 0 (in redundant mode: bit 4 = 0)
Bit 5: =0: CPU not inserted in rack 1
=1: CPU inserted in rack 1 (in redundant mode: bit 5 = 0)
Bit 6: Reserved
Bit 7: Standby-master switchover since last re-enable
=0: no
=1: yes
hsfcinfo 2 bytes Info word to SFC 90 "H_CTRL"
Bit 0:
=0: re-enable inactive
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 22/55
4 Program Blocks for Tunnel Lighting Control
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 22
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Content Length Description
=1: re-enable active
Bit 1: =0: updating of standby enabled
=1: updating of standby disabled
Bit 2: =0: link-up to standby enabled
=1: link-up to standby disabled
Bit 3-8: Reserved
samfehl 2 bytes Reserved
bz_cpu_0 2 bytes Mode of CPU in rack 0
W#16#0001: STOP (update)
W#16#0002: STOP (memory reset)
W#16#0003: STOP (self-initialization)
W#16#0004: STOP (internal)
W#16#0005: STARTUP (cold restart)
W#16#0006: STARTUP (warm restart)
W#16#0007: STARTUP (hot restart)
W#16#0008: RUN (solo mode)
W#16#0009: RUN-R (redundant mode)
W#16#000A: HOLD
W#16#000B: LINK-UP
W#16#000C: UPDATE
W#16#000D: DEFECTIVE
W#16#000E: SELFTEST
W#16#000F: NO POWER
bz_cpu_1 2 bytes Mode of CPU in rack 1
(see values for bz_cpu_0)bz_cpu_2 2 bytes Reserved
cpu_valid 1 byte Validity of variables bz_cpu_0 and bz_cpu_1
B#16#01: bz_cpu_0 valid
B#16#02: bz_cpu_1 valid
B#16#03: bz_cpu_0 and bz_cpu_1 valid
hsync_f 1 byte Status of connection quality(valid only, if b bit 0 is set in mwstat2)
Bit 0: Fiber optics connection quality of the synchronization modules in the upper receptacle is limited
Bit 1: Fiber optics connection quality of the synchronization modules in the lower receptacle is limited
Bit 2-7: 0
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 23/55
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 24/55
4 Program Blocks for Tunnel Lighting Control
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 24
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Parameter Data type Note
=1: possible
(Bit 0 from mwstat2 of SZL data record)
bz_cpu_0 WORD Operating status of CPU in rack 0(bz_cpu_0 of SZL data record)
bz_cpu_1 WORD Operating status of CPU in rack 1(bz_cpu_1 of SZL data record)
Output parameters
The output parameters have the following meanings:
Table 4-5
Parameter Data type Note
PLC_Rack_0_Master BOOL H-status of CPU in rack 0
=0: standby CPU=1: master CPU
PLC_Rack_1_Master BOOL H-status of CPU in rack 1
=0: standby CPU
=1: master CPU
Syn_Link_UP_01 BOOL Status of synchronization connection 01:Synchronization between CPU 0 and CPU 1
=0: not possible
=1: possible
Fiber_optic_Con_0 BOOL =0: faultless
=1: Fiber optics connection quality of thesynchronization modules in the upper
receptacle is limitedFiber_optic_Con_1 BOOL =0: faultless
=1: Fiber optics connection quality of thesynchronization modules in the lower receptacle is limited
PLC_Rack_0_Stop BOOL CPU rack 0 in STOP mode
PLC_Rack_1_Stop BOOL CPU rack 1 in STOP mode
PLC_Rack_0_RUN_S BOOL CPU rack 0 in solo mode
PLC_Rack_1_RUN_S BOOL CPU rack 1 in solo mode
PLC_Rack_0_RUN_R BOOL CPU rack 0 in redundant mode
PLC_Rack_1_RUN_R BOOL CPU rack 1 in redundant mode
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 25/55
4 Program Blocks for Tunnel Lighting Control
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 25
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
4.3 Function block “ Tunnel_Light ing_System” (FB 100)
4.3.1 Description
The function block “Tunnel_Lighting_System” is used to control the tunnel lightingsystem for the tunnel entrance and exit zones.
A light sensor measures the light intensity outside the tunnel and via an analoginput the measuring signal is transmitted to the controller.Depending on the measured value, the light intensity in the entrance and exitzones is regulated in three levels (see chapter 2.2.1).
The interior light is also broken down into three levels according to the relevanttime of day (also refer to chapter 2.2.1). In performing these tasks, the functionblock uses the standard functions from the S7 standard library (see chapter 4.1).
The correlation between the individual light levels as required in the entrance, exitand interior zones is shown in the following table:
Table 4-6
Time of day Expected light intensity Level
00:00 to 06:00
20:00 to 23:59
Set_Val_Lev1 - Set_VAL_Lev2 Level 1 or nightlight
6:00 to 8:00
18:00 to 20:00
Set_Val_Lev2 - Set_VAL_Lev3 Level 2 or morning/evening twilight
08:00 to 18:00 Set_Val_Lev3 - Set_Sensor_MAX_VAL Level 3 or daylight
The plausibility check of the light intensity measurement by the sensor is performedwithin the function block on the basis of defined real light intensity values over thecourse of the day. If this plausibility check shows a negative result, e.g. due to
incorrect values supplied by the light sensor (weather conditions: fog or rain), or adefect, either daylight, nightlight or evening/morning twilight will be activated,depending on the clock time.
Note The light intensity measured by the outside sensor is defined manually at the“Tunnel_Lighting_System” block (FB 100).
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 26/55
4 Program Blocks for Tunnel Lighting Control
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 26
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
4.3.2 Avoiding light f lickering between activat ion levels
The selection of the light level for the entrance and exit zones depends on the light
intensity measured outside the tunnel by the light sensor.Table 4-7
Light intensity measured by the outside sensor in Cd (lm/ser)
Level
Set_Val_Lev1 - Set_Val_Lev2 Level 1
Set_Val_Lev2 - Set_Val_Lev3 Level 2
Set_Val_Lev3 - Set_Sensor_MAX_VAL Level 3
Weather-induced influences or similar reasons may cause variations in the resultsof light intensity measurement. If this occurs at the defined transitions to adjacentlight levels, fast changes in the light levels cannot be avoided.
Light intensity
Time00:00 06:00 08:00 18:00 20:00 23:59
Set_Value_Lev1
Set_Value_Lev2
Set_Value_Lev3
Set_Sensor_Max_
Value
Level 1
Level 2
Level 3
Nightlight NightlightDaylightTwilight Twilight
In order to avoid light flickering at least for minor variations, a hysteresis is used.
This hysteresis represents sort of an “environment” around the setpoint valuewithin the range of which the actual value may vary. The control system will reactonly, if the actual value exceeds the maximum value or falls below the minimumvalue of this range.
In this application, the hysteresis is controlled with the help of a timer. If the valuemeasured by the sensor exceeds a defined limit to the next light level, a timer willbe started (time value: 1 minute). If the sensor value levels out to the previousrange within this period, the timing element will be reset.
If the sensor value remains within the new range even after the period haselapsed, the relevant light level will be activated.
This reduction of light flickering is effective only in automatic mode.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 27/55
4 Program Blocks for Tunnel Lighting Control
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 27
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
4.3.3 Descr iption of the interface
The figure and table below show the call interface of the user function block“Tunnel_Lighting_System” (FB 100).
Figure4-3
Input parameters
The input parameters have the following meanings:
Table 4-8
Parameter Data type Note
LIGHT_SENSOR_OUTSIDE INT Analog value measured in Cd (lm/ser)
AUTO_MODE_ON BOOL Automatic mode
MANUAL_MODE_ON BOOL Manual mode
ACTUAL_SYS_DATE_TIME DATE_ AND_TIME
Current system date and time
Entry_EXIT_LIGHTLEV_1_MAN BOOL Entrance and exit light at level 1 inmanual mode
Entry_EXIT_LIGHTLEV_2_MAN BOOL Entrance and exit light at level 2 inmanual mode
Entry_EXIT_LIGHTLEV_3_MAN BOOL Entrance and exit light at level 3 inmanual mode
SET_ELAPSED_T_COUNTER_PV BOOL Reset of elapsed-time counter to 0
Set_VAL_Level_1 REAL Sensor limit value for level 1 in Cd(lm/ser)
Set_VAL_Level_2 REAL Sensor limit value for level 2 in Cd
(lm/ser)
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 28/55
4 Program Blocks for Tunnel Lighting Control
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 28
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Parameter Data type Note
Set_VAL_Level_3 REAL Sensor limit value for level 3 in Cd(lm/ser)
Set_Sensor_MAX_VAL REAL Maximum sensor value in Cd (lm/ser)
Output parameters
The output parameters have the following meanings:
Table 4-9
Name of the variable Data type Note
ENTRY_LIGHT_1 BOOL Entrance light, level 1
ENTRY_LIGHT_2 BOOL Entrance light, level 2
ENTRY_LIGHT_3 BOOL Entrance light, level 3
EXIT_LIGHT_1 BOOL Exit light, level 1EXIT_LIGHT_2 BOOL Exit light, level 2
EXIT_LIGHT_3 BOOL Exit light, level 3
TUNNEL_INSIDE_DAYLIGHT BOOL Interior light for the period08:00-18:00
TUNNEL_INSIDE_SUNUP_DOWN BOOL Interior light for the period06:00-08:00 and 18:00-20:00
TUNNEL_INSIDE_NIGHTLIGHT BOOL Interior light for the period20:00-06:00
ACTUAL_SYS_DATE DATE Current system date for visualizationon the local HMI panel
ACTUAL_SYS_TIME TIME_OF_DAY Current system time for visualizationon the local HMI panel
ENTRY_EXIT_DAY_ON BOOL Daylight for entrance and exit zone
ENTRY_EXIT_SUNUP_DOWN_ON BOOL Evening and morning twilight for entrance and exit zone
ENTRY_EXIT_NIGHT_ON BOOL Nightlight for the entrance and exitzone
ELAPSED_TIME_COUNTER_VAL INT Current value of the elapsed-timecounter
AUTO_MODE BOOL Automatic mode activated
MANUAL_MODE BOOL Manual mode activated
SEN_PLAUSIBILITIY_CHECK BOOL Sensor plausibility check
=0: no fault, sensor OK
=1: failed
LIGHT_INTENSITY_SENSOR REAL Current light intensity value
measured by outside sensor in Cd(lm/ser)
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 29/55
4 Program Blocks for Tunnel Lighting Control
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 29
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
4.4 Data block “ SYS_DATA_HMI” (DB 101)
Description
The data block “SYS_DATA_HMI” is used to collect and store all informationrequired for visualization from the two function blocks.
Descripti on of variables
The figure and table below show the variables of data block “SYS_DATA_HMI”(DB 101).
Figure 4-4
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 30/55
4 Program Blocks for Tunnel Lighting Control
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 30
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
The meaning of the variables is as follows:
Table 4-10
Variable Data type Note
Elapsed_Time_CounterVAL INT
SYS_Time TIME_OF_DAY Internal system time
SYS_DATE DATE Internal system date
AUTO_Mode BOOL Automatic mode activated
MANUAL_MODE BOOL Manual mode activated
Sen_Plausibility_Check BOOL Sensor plausibility check
=0: no fault, sensor OK
=1: failed
Entry_Light_1 BOOL Entrance light, level 1
Entry_Light_2 BOOL Entrance light, level 2
Entry_Light_3 BOOL Entrance light, level 3EXIT_Light_1 BOOL Exit light, level 1
EXIT_Light_2 BOOL Exit light, level 2
EXIT_Light_3 BOOL Exit light, level 3
T_Inside_Day_Light BOOL Interior light for the period08:00-18:00
EXIT_ENTRY_DAYLIGHT_ON
BOOL Daylight for entrance and exit zone
EXIT_ENTRY_NIGHTLIGHT _ON
BOOL Nightlight for entrance and exit zone
PLC_Rack_0_RUN_P BOOL CPU rack 0 in redundant mode
PLC_Rack_1_RUN_P BOOL CPU rack 1 in redundant modePLC_Rack_0_RUN_S BOOL CPU rack 0 in solo mode
PLC_Rack_1_RUN_S BOOL CPU rack 1 in solo mode
PLC_Rack_0_Stop BOOL CPU rack 0 in STOP mode
PLC_Rack_1_Stop BOOL CPU rack 1 in STOP mode
SYNC_Link_UP_01 BOOL Status of synchronization link-up 01:Synchronization between CPU 0 andCPU 1
=0: not possible
=1: possible
Fiber_Optic_Con_0 BOOL =0: no fault
=1: Fiber optics connection quality of the synchronization modules in theupper receptacle is limited
Fiber_Optic_Con_1 BOOL =0: no fault
=1: Fiber optics connection quality of the synchronization modules in thelower receptacle is limited
T_Inside_Night_Light BOOL Interior light for the period 20:00-06:00
T_Inside_SunUP_Dw_ON BOOL Interior light for the periods06:00-08:00 and 18:00-20:00
EXIT_ENTRY_SunUP_Dw_ON
BOOL Evening and morning twilight for theentrance and exit zone
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 31/55
4 Program Blocks for Tunnel Lighting Control
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 31
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Variable Data type Note
RACK_0_MSTR BYTE H-status of CPU in rack 0
=0: standby CPU
=1: master CPURACK_1_MSTR BYTE H-status of CPU in rack 1
=0: standby CPU
=1: master CPU
Light_Intensity_Sensor REAL Current light intensity value
measured by the outside sensor in Cd(lm/ser)
DT_date_and_time DATE_AND_TIME
Read system time and date
Reserve1 WORD
Reserve2 WORD
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 32/55
5 Configuration
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 32
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
5 Configuration
5.1 Address overview
The following figure illustrates the structure of the S7 project for the tunnel lightingcontrol system.
Figure 5-1
Control room 1 Control room 2
S7-400H„T_Control_Room1_PLC1“
ET 200M
HMI panel„Control_Room1_HMI1“
ET 200M
S7-400H„T_Control_Room2_PLC2“
HMI panel„Control_Room2_HMI2“
IP addresses
The modules are addressed as follows:
Table 5-1
Hardware Address Subnet mask
H-CPU_1
“T_Control_Room_1_PLC1”
192.168.0.130 255.255.255.0
H-CPU_2
“T_Control_Room_1_PLC2”
192.168.0.131 255.255.255.0
HMI Multipanel
“Control_Room_HMI_1”
192.168.0.3 255.255.255.0
HMI Multipanel“Control_Room_HMI_2”
192.168.0.4 255.255.255.0
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 33/55
5 Configuration
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 33
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Connection ID
Communication between the modules is realized by means of S7 connections. Thefollowing table provides an overview:
Table 5-2
H-CPU_1 Control Center/T_Control_Room_1_PLC1
Local ID Partner ID Partner Type Active connection buildup
1 S7-connection_1 Control_Room_1_HMI S7 connection no
2 S7-connection_3 Control_Room_2_HMI S7 connection no
H-CPU_2 Control Center/T_Control_Room_2_PLC2
Local ID Partner ID Partner Type Active connection buildup
3 S7-connection_2 Control_Room_1_HMI S7 connection no
4 S7-connection_4 Control_Room_2_HMI S7 connection no
Table5-3
Control_Room_1_HMI
Local ID Partner ID Partner Type Active connection buildup
S7-connection_1 1 T_Control_Room_1_PLC1 S7 connection yes
S7-connection_2 3 T_Control_Room_2_PLC2 S7 connection yes
Control_Room_2_HMI
Local ID Partner ID Partner Type Active connection buildup
S7-connection_3 2 T_Control_Room_1_PLC1 S7 connection yes
S7-connection_4 4 T_Control_Room_2_PLC2 S7 connection yes
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 34/55
5 Configuration
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 34
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
5.2 Informat ion on the hardware configurat ion
The STEP 7 project supplied with the functional example of a tunnel lighting control
system as presented in this document also includes the hardware configurationand the sample code.
For a better overview, the following chapter goes into some important STEP 7hardware settings. Basically, these settings can be modified (e.g. to adapt thesystem to individual requirements).
5.2.1 Settings for the H-CPUs
Table 5-4
No. Action Notes
1. Open a STEP 7 project in the SIMATIC
Manager. Select the H-system Tunnel andopen the hardware configuration dialog.
2. In the Properties dialog for the H-CPU youcan define the following properties:
· Definition of monitoring times:
– Max. scan cycle time extension
– Max. communication delay
– Max. disabling time for priority classes
– Min. I/O retention time
You may also click the “Calculate” button to initiate automatic calculation of the monitoring times.
· Allocation of the data block no. for theredundant I/O. These two data blocksare generated by the library“Redundant IO” at runtime.
3. Select “Properties> PN-IO Interface” toopen a dialog where you can define the IPaddresses of the two CPUs:
CPU1: IP address:192.168.0.130,subnet mask:225.225.225.0.
CPU2: IP address:192.168.0.131,
subnet mask:225.225.225.0.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 35/55
5 Configuration
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 35
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Note The data block number for the redundant I/Os should not be used somewhereelse in the user program. Previous data blocks will be deleted and generatedanew.
Note For further information on H-system configuration, please refer to the followingmanual: “SIMATIC Fault-tolerant systems S7-400H”, see \3\.
5.2.2 Conf iguration of the HMI panels
Table 5-5
No. Action Notes
1. Select the HMI station“Control_Room_1_HMI” and
open the hardware configurationdialog.
Select “Properties HMI IE>General> InterfaceProperties>Parameters” to opena dialog where you can definethe IP address and the network:
Control_Room_1_HMI:
IP address:192.168.0.3
Subnet mask:225.225.225.0
Control_Room_2_HMI:
IP address:192.168.0.4
Subnet mask:225.225.225.0
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 36/55
5 Configuration
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 36
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
5.2.3 Defining the I/O redundancy
The term ‘redundant I/Os” refers to input/output modules which are available in
twofold and redundantly configured and operated in pairs. The redundancy mode isdefined in the Properties dialog of the signal modules.
Table 5-6
No. Action Notes
1. Open the Properties dialog for the signal module “SM322 DO1624 V / 0.5 A” and select the“Redundancy tab” where youcan define the redundant modesettings.
If “2 modules” is selected in the
redundancy settings, all possibleredundant modules in other ET200M stations of the sametype will be listed automatically.
Click the “Find” button to displayall modules of the same type inthe redundant Profibusnetworks.
Note A current list of modules suitable for redundant operation can be found in thefollowing system manual:
“Fault-tolerant system S7-400H“, chapter “Signal modules for redundancy”,see \3\.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 37/55
5 Configuration
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 37
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
5.2.4 Conf igurat ion of the S7 connect ion
To enable communication between the HMI panel and the H-CPUs, the relevant
S7 connections are to be created in NetPro.Table 5-7
No. Action Notes
2. To add a new connection, firstselect CPU 1. Use your rightmouse button or the shortcutCtrl+N to add a new connection.Now select the connection type"S7 connection” and confirmyour selection with OK.
3. The Properties dialog for the S7connection shows the local andthe partner address.
After a click on the OK button,the configured connection will beshown in the table.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 38/55
5 Configuration
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 38
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
No. Action Notes
4. After having configured allconnections, click “Ethernet(1)”so that all connections will be
shown in the lower connectiontable.
Compile the networkconfiguration and download it tothe controller.
5.3 Configurat ion inst ruct ions for the HMI panel
5.3.1 Connection to the H station
An HMI panel can be connected directly to a SIMATIC H station only, if the H-CPUs have different IP addresses. As this requirement is met in this applicationexample, the HMI panel can be used for visualization and control.
Each control room is provided with its own HMI panel which shall always beavailable for operator control and monitoring even after a switchover betweenmaster and standby station.
This is effected by the internal system function “WechseleVerbindung” incombination with the status analysis of the H-CPUs.
If the SIMATIC H-station identifies the failure of an H-CPU, the“WechseleVerbindung” function will build up a connection to the other H-CPU.
The “WechseleVerbindung” function terminates the connection to the PLC currentlyin use and establishes a new connection with the specified controller.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 39/55
5 Configuration
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 39
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
5.3.2 Connections in WinCC f lex ible
Configuration of connections
The HMI panels are connected with the two H-CPUs via Industrial Ethernet. Toenable the exchange of variables between these components, the relevantconnections must be specified in WinCC flexible.
· S7-connect ion_1 or S7-connection_3 is connected to the first H-CPU(T_Control_Room_1_PLC1) via Industrial Ethernet.
· S7-connect ion_2 or S7-connection_4 is connected to the second H-CPU
(T_Control_Room_2_PLC2) via Industrial Ethernet.
· Control_Raum_1_PLC_Changer_12 and/or Control_Raum_2_PLC_Changer_12 has been connected “manually” to anS7-300/400 unit via Industrial Ethernet and provides an auxiliary connectionfor the “WechseleVerbindung” function.
Figure 5-2
Note Please make sure to enter the receptacle and slot numbers correctly.
5.3.3 The system function “ WechseleVerbindung”
With the help of the internal system function “WechseleVerbindung” and the statusanalysis of the H-CPUs, a connection to the active H-CPU will be established,depending on the operating mode of the CPU.
Creation of variables
For the status analysis of the H-CPUs, one variable for each H-CPU must becreated in WinCC flexible (“Rack_x_PLC_x_Master”) and referenced to thecorresponding status variable in the data block "SYS_DATA_HMI". In concreteterms, this means:
· “Rack_0_PLC_1_Master”è Tag “RACK_0_MSTR” in DB 101 (DB101.DBB11)
· “Rack_1_PLC_2_Master”è Tag “RACK_1_MSTR” in DB 101 (DB101.DBB12)
These data block variables may show the following values:
· =0: CPU presently used as standby station
· =1: CPU defined as master.
In WinCC flexible, the acquisition type “cyclic continuous” is selected.
Figure 5-3
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 40/55
5 Configuration
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 40
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Configuration of variables
In the Properties dialog for the WinCC tag “Rack_x_PLC_x_Master”, an upper limitvalue of “0” is defined in combination with the event parameter “High limit
exceeded” and the function “ChangeConnection”. As “Connection” partner, theauxiliary connection “Control_Room_x_PLC_Changer_12” is selected.
The addresses, slots and racks correspond to the connection parameters.
Figure 5-4
Function principle
Initial situation: The first CPU (T_Control_Room_1_PLC_1) is the master CPU; theassociated H-status in DB101.DB11 shows the value "1".
In WinCC flexible, the upper limit value of the variable “DB101.DBB11” is analyzed(limit value “0”). The “limit value” is exceeded (Master = “1”) and the"ChangeConnection" function is executed.
The panel terminates the connection “Control_Room_1_PLC_Change_12” andchanges over to the configured connection parameters of S7-connection_1.
Connection to the CPU is built up.
Initial situation: The second CPU (T_Control_Room_2_PLC_2) is the master CPU;the associated H-status in DB101.DB12 shows the value “1”.
In WinCC flexible, the upper limit value of the variable “DB101.DBB12” is analyzed(limit value “0”). The “limit value” is exceeded and the “ChangeConnection” functionis executed.
The panel terminates the connection “Control_Room_2_PLC_Change_12” andchanges over to the configured connection parameters of S7-connection_2.Connection to the CPU is built up.
Note A detailed description of how to connect a panel with a SIMATIC H-station isavailable under the entry ID: 23842653, see \6\
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 41/55
6 Installation
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 41
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
6 InstallationThe following chapter describes all steps required to put the sample project intoservice on the basis of this application example and the hardware list.
6.1 Hardware and software instal lat ion
Hardware structu re of the H-stations
The figure below shows the hardware structure of the application.
Figure 6-1
Control room 1 Control room 2
S7-400H
ET 200M
HMI panel
S7-400H
ET 200M
HMI panel
SCALANCE
X208
SCALANCE
X208
Both control rooms are equipped with identical hardware components:
· H-CPU 416-5H
· PS 407
· HMI panel
· SCALANCE X208
· ET 200M (for redundant operation) with two IMs and one DO.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 42/55
6 Installation
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 42
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Proceed as follows for hardware installation and connection in the control rooms:
Table6-1
No. Action Notes
1. Mount the individual modules to a suitablemodule rack.
See HW configuration
2. Connect the PS307 for ET 200M and the PS 407for the H-CPUs to power (230 V AC).
Take note of correct polarity.
3. Use the power supply modules to supply theother modules with 24V DC.
4. Connect the following devices with theSCALANCE X208:
· PROFINET interface of the CPU
· PROFINET interface of the HMI panels
· PROFINET interface of the Engineering PG
The Engineering-PG is used to load thecontroller and the HMI panel in the controlroom.
Depending on the controller or HMI panel tobe loaded, the PC will be connected with therelevant X208 of the control room.
5. Connect an IM of the ET200M with the CPU via
PROFIBUS. The following assignments apply:· Control room 1: IM1 with H-CPU1
· Control room 2: IM2 with H-CPU2
Interconnect the two control rooms as follows:
Table6-2
Nor. Action Notes
1. Connect the two SCALANCE X208 units.
2. Produce further connections to the IMs of theET 200M via PROFIBUS.The following assignments apply:
· Control room 1: IM2 with H-CPU2
· Control room 2: IM1 with H-CPU1
Connection of the redundant I/Os to the H-system is effected in the defined DP slavemode. This means that both master andstandby station are connected with the two
ET 200M stations.
3. Interconnect the H-CPUs via fiber optics cables.
Note The guidelines for the installation and setup of components are to be observed.Please refer to the corresponding device manuals.
NOTICE Connect the system to power only after having completed and checked allinstallation and setup work!
Software installation
The Engineering station is used as a configuration calculator for the S7 station. Thefollowing software components must be installed.
Table 6-3
No. Action Notes
1.. Install STEP 7 Follow the instructions of the installationprogram.
2. Install WinCC Flexible Follow the instructions of the installationprogram.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 43/55
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 44/55
6 Installation
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 44
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Change the IP address
The figure below shows the network settings to be changed for the PG/PC.
Table 6-6No. Action Display
1. Select “Start > Settings >NetworkConnection >Local Connections” to open the Propertiesdialog for the Internet Protocol (TCP/IP).
In this dialog, select the internet protocol(TCP/IP) and open the Properties dialog.
Activate the radio button “Use following IP-address” and fill in the field as shown in thescreenshot. Click “OK” to close the dialogagain.
2. If your PG is provided with an IWLANinterface, it must be disabled.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 45/55
6 Installation
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 45
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Change the IP address of the CPU
Before you can download the STEP 7 project to your CPU, the IP address of theH-CPU must be changed as shown in Table 4-1.Connect the Engineering PC with the corresponding SCALANCE X208.
Table 6-7
No. Action Display
1. Open the SIMATIC Manager and select theSTEP 7 project.
2. Select “Edit Ethernet Node…” from the “PLC”menu list.
3. Click the “Browse…“ button.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 46/55
6 Installation
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 46
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
No. Action Display
4. Select the desired module and confirm your selection with “OK”.
5. In the “Set IP configurations” field in the nextdialog, enter the IP address as described inthe chapter on H-CPU configuration.
Click the button “Assign IP Configuration”.Then click the “Close” button to close thedialog window.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 47/55
6 Installation
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 47
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Set the clock time
When using the tunnel application it is important that the controller knows thecurrent clock time. Proceed as follows to set the clock in the CPU:
Table 6-8
No. Action Display
1. Open the SIMATIC Manager and select theSTEP 7 project.
2. Select the first CPU(T_Control_Room_1_PLC_1). Select the CPUmenu commands “PLC > Set Time of Day” toopen a dialog where the clock time can bedefined.
You can either use the clock time from thePG/PC or enter another value manually. Clickthe “ Apply” button to transfer the clock time
information to the PLC.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 48/55
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 49/55
6 Installation
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 49
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Download the WinCC flexible project
To enable operation of the project via the operator control devices(Control_Room_1_HMI and Control_Room_2_HMI), the project data must betransmitted. Connect the Engineering PC with the corresponding SCALANCE
X208.
Proceed as follows to download the WinCC project to the operator control device(in this example to the HMI panels in control room 1; download to the other HMIpanel is performed analogously):
Table 6-10
No. Action Display
1. Open the SIMATIC Manager and select“Control_Room_1_HMI > WinCC flexible RT”using the “Open object” command or with adouble-click.
2. Select “Project > Transfer > Transfer…” todefine the settings for data transfer.Select Ethernet mode and enter the IPaddress of the HMI panel. Use the Transfer button to start the transmission of the projectto the operator control device.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 50/55
7 Operation of the Application
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 50
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
7 Operation of the Application
Overview
Prerequisite for the operation of the sample project is that the H-system, as well asthe HMI panels and the sample project have been loaded.
The sample project is operated via the HMI panel. Only the light intensity values for sensor simulation are entered directly into the variables table “VAT_1”.
This interaction is illustrated in the following figure:
Figure 7-1
or
Note The light intensity value is entered via the variables table VAT_1:0 – 27648 corresponds to a light intensity of 0 – 100.000 Cd (lm/ser).
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 51/55
7 Operation of the Application
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 51
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Log in and log out at the panel
Table 7-1
No. Action Display
1. Before you start operating the HMI panel, youmust first log in with the following access data:
User: “ Admin”
Password: “siemens”
After successful registration, the name of thelogged-in user will be shown.
Use the “Log out” button, if you wish to quit.
With the “Runtime OFF” button you can closethe Runtime program.
Define the sensor limit values via the HMI
Table 7-2
No. Action Display
1. Click the button SENSOR SET VALUES toopen a dialog where the sensor limit valuescan be defined.
Enter the following limit values:
Set Sensor Maximum Value = 100.000,00 Cd.
Set Value Level 3= 66666,67Cd.
Set Value Level 2 = 33333,34Cd.
Set Value Level 1 = 0,00 Cd.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 52/55
7 Operation of the Application
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 52
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Switchover between operating modes
Table 7-3
No. Action Display1. Click the button AUTO-MODE to activate the
automatic mode.
The automatic mode will be reset, as soon asmanual mode (MAN-Mode) is selected andone of the following inputs is activated:
ENTRY_EXIT_LIGHTLEV1_MAN;ENTRY_EXIT_LIGHTLEV2_MAN;
ENTRY_EXIT_LIGHTLEV3_MAN.
Reset the elapsed-time coun ter of the CPU
Table 7-4
No. Action Display
1. Here you can set the elapsed-time counter of the CPU to 0.
You may also define a CPU-specific number for the elapsed-time counter.
The output field shows the current value of theCPU’s elapsed-time counter.
Note If the elapsed-time counter exceeds 32767 hours, it will stop and the SFC 4“READ_RTM” will show the error message “Overflow”.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 53/55
7 Operation of the Application
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 53
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
Define the light in tensity value
Table 7-5
No. Action Displays
1. Open the variables table “VAT_1” and activate
the monitoring mode (Strg+F7 or ).
Change this value in a range between0..27648 which corresponds to a light intensityof 0..100.000Cd (lm/ser).
The specified value can then be transferred tothe PLC by pressing the shortcut keys Ctrl+F9
or clicking the icon .
Simulate reaction to an error
For the period between 8:00 and 18:00 the light sensor shall show a value betweenSet_Val_Lev3 (66666,67) and Set_Sensor_Max_Val (100000), as expected.If a defect or environmental influences (e.g. fog) lead to an incorrect measuringresult, e.g. a value smaller than Set_Val_Lev3, an error reaction will be simulatedon the HMI.
Table 7-6
No. Action Display
1. We assume that the current CPU time is
14:00. Light level 3 is activated and theplausibility check does not show any problems(i.e. the measured light intensity complies withthe time of day).
Enter a light intensity value of 65104,17 Cd(integer number 18000) in the variables tableVAT_1 and transfer this value to the PLC.
The light intensity value of 65104,17 Cd is nolonger within the expected range betweenSet_Val_Lev3 (66666,67) andSet_Sensor_Max_Val (100000), but in a rangefor light level 2.
Since a plausibility check indicates an
incorrect measuring result (time of day andmeasured light intensity do not match), thefollowing message will appear on the HMI after a time T=1min (hysteresis time to avoid lightflickering):
“Sensor plausibility check failed, please checkthe outside sensor”.
Daylight illumination and light level 3 will beactivated for the entrance and exit zones.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 54/55
7 Operation of the Application
Tunnel Lightning SystemItem-ID: 81066268, Version 1.0, 10/2013 54
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
H-system status: H-system in solo mode
Table 7-7
No. Action Display
1. The HMI shows the status of the fault-tolerantsystem.
If a hardware error occurs, one H-CPUchanges over to STOP mode and the H-system is no longer in redundant mode.
Set the master H-CPU to STOP mode.
The system will switchover from the master tothe standby CPU. The previous master H-CPUbecomes the standby CPU and remains inSTOP mode, whereas the new master H-CPUtakes over the control functions.
H-system status: Synchronization cable disconnection
Table 7-8
No. Action Display
1. Any disconnection of the synchronization cablebetween the two H-CPUs is indicated on theHMI. The standby H-CPU will turn into a faultlocating mode (RUN and STOP LEDs startflashing at a frequency of 0,5 Hz) and the H-system is no longer in redundant mode.
8/10/2019 81066268_Tunnel_Lighting_System_V10_en.pdf
http://slidepdf.com/reader/full/81066268tunnellightingsystemv10enpdf 55/55
8 Related literature
C o p y r i g h t ã
S i e
m e n s A G
2 0 1 3 A l l r i g h t s r e s e r v e d
8 Related literatureTable 8-1
Topic Title / Link\1\ Siemens Industry
Online Support
http://support.automation.siemens.com
\2\ Download page of this entry
http://support.automation.siemens.com/WW/view/81066268
\3\ Fault-tolerantsystems S7-400H
http://support.automation.siemens.com/WW/view/en/60458386
\4\ WinCC flexible2008
WinCC flexible 2008 Communication Part 1http://support.automation.siemens.com/WW/view/en/18797552
\5\ System andStandardFunctions for S7-300/400 Volume1/2.
http://support.automation.siemens.com/WW/view/en/44240604
\6\ How do youconnect a panelto a SIMATIC Hstation?
http://support.automation.siemens.com/WW/view/en/23842653
/7/ Step 7 Automating with STEP7 in STL and SCL
Author: Hans Berger
Publicis Publishing
ISBN 3895783242
/8/ SPC automation Automatisieren mit SPS – Theorie und Praxis
[Automating with PLC – Theory and Practice]
Authors: Günter Wellenreuther \ Dieter Zastrow
Publicis Publishing
ISBN 9783834802316
9 HistoryTable 9-1
Version Date Modifications
V1.0 10/2013 First version