Application on Control Technology - Siemens...Application on Control Technology SIMATIC S7 CPU...

51
Application on Control Technology SIMATIC S7 CPU 300/400 Application Description Range and Level Measurement in the S7-CPU using a Sonar BEROs

Transcript of Application on Control Technology - Siemens...Application on Control Technology SIMATIC S7 CPU...

  • Application on Control Technology

    SIMATIC S7 CPU 300/400 Application Description

    Range and Level Measurement in the S7-CPU using a Sonar BEROs

  • Warranty, liability and support

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 2/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Note The application examples are not binding and do not claim to be complete regarding the circuits shown, equipping and any eventuality. The application examples do not represent customer-specific solutions. They are only intended to pro-vide support for typical applications. You are responsible in ensuring that the de-scribed products are correctly used. These application examples do not relieve you of the responsibility in safely and professionally using, installing, operating and servicing equipment. When using these application examples, you recognize that Siemens cannot be made liable for any damage/claims beyond the liability clause described. We reserve the right to make changes to these application examples at any time without prior notice. If there are any deviations between the recommendations provided in these application examples and other Siemens publications - e.g. Catalogs - then the contents of the other documents have priority.

    Warranty, liability and support We do not accept any liability for the information contained in this document.

    Any claims against us - based on whatever legal reason - resulting from the use of the examples, information, programs, engineering and performance data etc., described in this application example shall be excluded. Such an exclusion shall not apply in the case of mandatory liability, e.g. under the German Product Liability Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life, body or health, guarantee for the quality of a product, fraudulent concealment of a deficiency or breach of a condition which goes to the root of the contract (“wesentliche Vertragspflichten”). However, claims arising from a breach of a condition which goes to the root of the contract shall be limited to the foreseeable damage which is intrinsic to the contract, unless caused by intent or gross negligence or based on mandatory liability for injury of life, body or health The above provisions does not imply a change in the burden of proof to your detriment.

    Copyright© 2006 Siemens A&D. It is not permissible to transfer or copy these application examples or excerpts of them without first having prior authorization from Siemens A&D in writing. For questions about this document please use the following e-mail address:

    mailto:[email protected]

    Foreword Objective of the application

    This application was created to provide the user with the following:

  • Foreword

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 3/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    • A modifiable and expandable example of a range and level measurement and

    • the illustration of a convenient option of operating and visualizing a control using a touch panel.

    This application shows how using a SIMATIC controller and a Sonar-BERO1 the filling level in a container is determined and actions are performed depending on defined levels.

    • This topic is particularly relevant in the chemical industry as well as the beverage industry.

    Main contents of this application The following main points are discussed in this application:

    • Design, principle of operation and application of ultrasonic proximity switches (Sonar BEROs)

    • STEP7 program for detecting filling levels of liquids in a production process

    • Connecting a touch panel for process control and plant monitoring using WinCC flexible

    Delimitation This application does not include a description of

    • the SIMATIC STEP 7 engineering tool • the WinCC flexible visualization software

    Basic knowledge of these topics is required.

    1 BERO = Sensor for remote detection of objects (Berührungslose Erfassen von Objekten)

  • Foreword

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 4/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Structure of the document The documentation of this application is divided into the following main parts.

    Part Description Application Description Provides a general overview of the contents. You

    will learn about the components used (standard hardware and software components and the specially created software).

    Function Principles and Program Structures

    This part describes the detailed function processes of the involved hardware and software components, the solution structures and – where useful – the specific implementation of this application. This part is necessary if you want to learn about the interaction of the solution components, for example in order to use them as the basis for own development.

    Structure, Configuration and Operation of the Application

    This part leads you step by step through the structure, important configuration steps, commissioning and operation of the application.

    Appendix This section of the documentation includes further information, e.g. literature, glossary etc.

    Reference to Automation and Drives Service & Support This entry originates from the internet application portal of the A&D Service and Support. It has the entry ID 11609935. The direct link to the download page of this entry is available in /2/.

  • Foreword

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 5/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Table of Contents Table of Contents ......................................................................................................... 5

    Application Description ............................................................................................... 6

    1 Automation Task ............................................................................................ 6 1.1 Overview........................................................................................................... 6 1.2 Requirements ................................................................................................... 8

    2 Automation Solution .................................................................................... 10 2.1 Overview of the overall solution...................................................................... 10 2.2 Description of the core functionality................................................................ 11 2.2.1 Overview and description of the user interface .............................................. 11 2.2.2 Process sequence of main functionality ......................................................... 16 2.3 Required hardware and software components............................................... 18 2.4 Basic Performance Data................................................................................. 21

    Function Principles and Program Structures .......................................................... 23

    3 General Function Mechanisms ................................................................... 23 3.1 Basics on the subject of "Ultrasonic Sensors"................................................ 23

    4 Explanations for the Example Program ..................................................... 28 4.1 Measured value processing............................................................................ 28 4.2 The structure of the STEP7 program.............................................................. 31 4.3 FC 12 (MAIN) in detail .................................................................................... 33 4.4 The variables at the touch panel .................................................................... 36

    5 Modifications to the Example Program ...................................................... 37 5.1 Changing the BERO properties ...................................................................... 37 5.2 Changing the runtime language (TP170A) ..................................................... 38

    Structure, Configuration and Operation of the Application ................................... 39

    6 Installation and Commissioning ................................................................. 39 6.1 Installation of hardware and software............................................................. 39 6.2 Installation of the application software............................................................ 41 6.3 Startup ............................................................................................................ 44 Appendix and List of Further Literature ................................................................... 49

    7 Literature ....................................................................................................... 49 7.1 References on hardware and software of this application.............................. 49 7.2 Further Literature............................................................................................ 50

  • Application Description

    Automation Task

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 6/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Application Description

    Content In this section you are provided with a general overview of the contents. You will learn about the components used (standard hardware and software components and the specially created software).

    The displayed performance data illustrate the performance capability of this application.

    1 Automation Task

    Here you will find information on … the automation task discussed in the documentation on hand.

    1.1 Overview

    Introduction In the application example, the following partial tasks are realized:

    • Detecting liquid volumes in containers

    • Detecting the permissible minimum / maximum levels of liquid levels in containers

    • Determining specific level sections for visualizing them or for triggering various actions in the production process

    The main focus of this automation task is measuring the level of a liquid surface with remote sensors. On a PLC these sensor data are used to control the technical process or for monitoring purposes. An HMI (human machine interface, e.g. a touch panel) enables visual monitoring of levels and defining new rated or limit level values.

    Overview of the automation task The below figure shows an example of a possible field of application for this application.

  • Application Description

    Automation Task

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 7/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Figure 1-1: Central container for producing a mixed drink

    Description of the Automation Task A partial process in the beverage industry involves producing a mixed drink from various ingredients (water, fruit extract, sugar, etc). After individual preparation processes, the various ingredients are filled into a container (see Figure 1-1).

    Various automatic actions are to be started depending on the level. Examples for possible actions are mentioned in Table 1-1.

    Table 1-1 Examples of possible actions depending on the level

    Level reached Action(s) filling level 1 (min. permitted level) Optical/acoustic warnings filling level 2 Start the agitator filling level 3 Add syrup filling level 4 Increase agitator speed filling level 5 Add sugar filling level 6 … filling level 7 Reduce agitator speed filling level 8 (max. permit. level) Optical/acoustic warnings

    Open the drain valve

    Figure 1-1: Central container for producing a mixed drink roughly illustrates the subject of the application. The detailed problem of level detection is illustrated in Figure 1-2: Schematic view of the automation

  • Application Description

    Automation Task

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 8/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    problem. The used sensor is a Sonar-BERO. Its robustness and insensitivity to dirt ensures reliable operation also under harsh conditions and therefore, they are widely used in industries. A prerequisite, however, is that the ultrasonic BERO pulses are precisely (tolerance ± 3°) at right angle to the detected liquid surface, for the BERO to be able to detect the echo.

    Figure 1-2: Schematic view of the automation problem

    1.2 Requirements

    This application is realized in a STEP7 project. It is to meet the requirements listed below:

    Sensor requirements • The filling level of a liquid container is to be detected with a sensor. • The sensor design must be an ultrasonic proximity switch (Sonar-

    BERO). • The sensor is to be able to detect a liquid column of 0…max. 85 cm

    height and to transform this travel into an analog output signal of 4…20 mA.

    • Protection type IP 67

  • Application Description

    Automation Task

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 9/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Controller requirements • From a sensor signal, the controller is to calculate the current filling

    height of the liquid in centimeters. • The controller is to divide the overall liquid travel into seven filling level

    sections, each of which is allocated a digital output (A 4.0…A4.6). The DO with the level section of the current liquid level is controlled. It should be easy for the user to change the level section.

    • Underrun or overrun of the min. permitted or max. permitted level should be indicated by a blinking digital output (e.g. for connecting a signal lamp). The blinking should require acknowledgement.

    • The respectively last limit level violation is to be logged by the time stamp of the CPU. If there has been no level violation since the start of the CPU, the time stamp of the startup shall be logged.

    HMI requirements • The HMI is to be realized by a touch panel (screen diagonal 6 inches). • The following information is to be displayed:

    – Current filling level (bar-type display and value)

    – Level violation (minimal and maximal level, graphical)

    – Date and time of the last level violation (minimal and maximal level)

    – Current filling level related to level section (graphical)

    • The following operations are to be possible: – Input/change of filling level section

    – Acknowledgement of level underrun/overrun

    – Terminating the runtime

    Note The above-mentioned requirements are met by the application software without need for additional programming overhead or entering parameters in data blocks.

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 10/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    2 Automation Solution

    Here you will find information on … the solution selected for the automation task.

    2.1 Overview of the overall solution

    Display The following figure displays the most important components of the solution:

    Figure 2-1: Hardware overview of the automation solution

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 11/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Setup A SIMATIC CPU 314C-2 DP is the key element of the application. This central processing unit already includes the digital and analog inputs and outputs required by the application. The switching output of the Sonar BERO is directly connected to the analog input integrated in the central processing unit. The TP170A touch panel is connected to the MPI of the controller via a PROFIBUS cable. The controller and the BERO, as well as the touch panel, are supplied with 24V DC by the PS 307 power supply.

    2.2 Description of the core functionality

    2.2.1 Overview and description of the user interface A TP 170A touch panel is used as HMI. The display/HMI is realized as three screens:

    • Display Filling Level (start picture)

    • Define Levels

    • Level Violation

    Level detection is enabled by a digital input. The acknowledgement of a level violation can be performed alternatively via touch panel or digital input.

    The user-defined area with the current level, as well as level violations, are additionally singalled to the touch panel display by digital output bits..

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 12/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    TP 170A – “Display Filling Level“ screen (start picture) Figure 2-2: Display Filling Level (start picture)

    Provided that the touch panel has already been loaded with the HMI software created in WinCC flexible, the above start screen – which is to be considered the main screen – is displayed when applying the supply voltage. The screen contains the following elements:

    1. Display of level height It is displayed as a cm value as well as a bar diagram (range 0…100cm). The calculation and display of the current level height is only performed if it has been enabled via input E 0.0. At E 0.0 = 0 the last recorded level value is displayed. Outside of the BERO measuring range (object distance 100cm) level height 0 is output.

    2. Display and acknowledgement of level violations A level violation occurs if the following limit values specified in DB10 are violated:

    – Level underrun comparision_level [1] (default value 10cm)

    – Level overrun comparision_level [8] (default value 80cm)

    A level underrun or overrun is indicated by two blinking marks on the right side of the bar diagram ( ). If the liquid level is outside the permitted limits, the blinking marks are invisible. A level violation requires acknowledgement. The respective blinking mark only

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 13/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    disappears if the level is within the permitted range and the alarm has been reset with the “Acknowledge“ button. Limit values can be changed in the “Define Levels“ screen.

    3. “Last Level Violation“ button This button takes you to the “Limit Violation“ screen. This screen displays the time stamp of the last level underrun or overrun.

    4. “Define Levels“ button This button takes you to the “Define Levels“ screen. There you can specify eight filling heights for process control or display purposes.

    5. Stop Runtime This button terminates the Runtime in order to reload the tough panel, for example.

    TP 170A – “Define Levels“ screen Figure 2-3: Define Levels

    The "Define Levels" button in the "Display Filling Level" screen takes you to the "Define Levels” screen. Here you specify the discrete filling levels which you can use for process control or display purposes.

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 14/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    6. Input of level values If you are using the example project, then the values for the filling heights are those of Figure 2-3: Define Levels. When selecting (touching) the respective gray-shaded I/O box, a numerical keyboard is displayed on the screen with which you can enter the desired value and apply it using the Enter key. All filling heights must be in the range of 0…85cm. The input value is rounded to two decimals. Filling Level 1 corresponds to the lowest, Filling Level 8 to the highest definable liquid level. For the input, the following must apply:

    Filling Level n < Filling Level n+1 (n=1…7)

    Underrun of Filling Level 1 or overrun of Filling Level 8 triggers a level violation which requires acknowledgement.

    7. Display of the current filling level sections The area between defined, neighboring filling heights, in which the current liquid level is located, is displayed by a mark ( ) on the left next to the input fields for the filling height.

    Display of level violations Level violations requiring acknowledgement in this screen are, analog to the “Display Filling Level“ screen, also displayed as blinking marks ( ).

    Use the “Back” button located at the bottom of the display to return to the “Display Filling Level” screen.

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 15/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    TP 170A – “Limit Violation“ screen Figure 2-4: Level Violation

    The "Last Level Violation" button in the "Display Filling Level" screen takes you to the "Limit Violation"�screen.

    8. Display in the upper frame

    – If since the last restart of the CPU no level underrun has taken place, then the time stamp of the last restart is displayed.

    – If since the last restart of the CPU at least one level underrun has taken place, the time stamp of the last level underrun is displayed.

    9. Display in the bottom frame

    – If since the last restart of the CPU no level overrun has taken place, then the time stamp of the last restart is displayed.

    – If since the last restart of the CPU at least one level overrun has taken place, then the time stamp of the last level overrun is displayed.

    Use the “Back” button located at the bottom of the display to return to the “Display Filling Level” screen.

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 16/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Digital input bits Table 2-1

    Input Meaning Note

    E 0.0 Enabling the level detection

    E 0.1 Acknowledging a level violation Identical with the “Acknowledge“ button in the “Display Filling Level“ screen

    Digital output bit Table 2-2

    Output Meaning Note

    A 4.0 Current level is between filling level 1 and 2 A 4.1 Current level is between filling level 2 and 3 A 4.2 Current level is between filling level 3 and 4 A 4.3 Current level is between filling level 4 and 5 A 4.4 Current level is between filling level 5 and 6 A 4.5 Current level is between filling level 6 and 7 A 4.6 Current level is between filling level 7 and 8

    These output bits correspond to the position of the level mark ( ) in the “Define Levels“ screen at the touch panel.

    A 5.0 There is an exceeding of level. The output is blinking. Resetting the output occurs by acknowledgment of the level violation.

    The function is identical with the blinking marks ( ) in the “Display Filling Level“ and “Define Levels“ screens at the touch panel.

    A 5.1 Level underrun: The current level is below Filling Level 1

    A 5.2 Level overrun: The current level is above Filling Level 8

    2.2.2 Process sequence of main functionality

    The following flow chart illustrates main functionality “Filling Level Detection”. The process is realized in function FC12.

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 17/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Figure 2-5: Flowchart of the core functionality

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 18/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    2.3 Required hardware and software components

    The application was developed and tested with the following components. Please consider that configuration changes in the sample project are possibly required in case of deviations from the listed components and that screen shots in this document can differ from your screen contents.

    To realize the sample project, you additionally require:

    • PG or PC with corresponding communications processor (e.g. CP5512) and Microsoft ® Windows 2000 Professional or Windows XP Professional operating system.

    • An MPI cable.

    Hardware components Table 2-3: Hardware components

    Component No. MLFB / Order number Note SIMATIC S7-300, RAIL L=480MM

    1 6ES7390-1AE80-0AA0 = minimum length

    SIMATIC S7-300, LOAD POWER SUPP. PS 307, 120/230 V AC, 24 V DC, 2 A

    1 6ES7307-1BA00-0AA0 Or similar

    SIMATIC S7-300, CPU 314C-2 DP COMPAKT

    1 6ES7314-6CF02-0AB0 The compact version was only used because of the integrated DO/DI.

    SIMATIC S7, MICRO MEMORY CARD F. S7-300/C7/ET 200S IM151 CPU, 3.3 V NFLASH, 64 KBYTES

    1 6ES7953-8LF11-0AA0 Or larger

    SIMATIC S7-300, FRONT CONNECTOR 392 WITH SCREW CONTACTS, 40-PIN

    2 6ES7392-1AM00-0AA0 Also available with spring contacts

    SIMATIC TOUCH PANEL TP170A BLUE MODE STN-DISPLAY MPI/PROFIBUS-DP INTERFACE

    1 6AV6545-0BA15-2AX0 Configurable with ProTool/Lite from version V5.2, SP1 and WinCC flexible Compact from version 2004

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 19/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Component No. MLFB / Order number Note SIMATIC NET, CONN. CABLE 830-2 F. PROFIBUS, PREASSEMBLED CABLE WITH 2 SUB-D-CONNECTORS 9-POLE, SWITCHABLE TERMINATING RESISTORS, 3 M

    1 6XV1830-2AH30 2-wire shielded cable with PROFIBUS connectors for connecting the TP 170A to the CPU. For alternatives see /6/.

    PROXIMITY SWITCH BERO COMPACT RANGE M18 SONAR, 24 V DC, SN=150...1000 MM, 150 MA, ANALOG OUTPUT 4...20 MA, NICKEL-PLATED BRASS, STRAIGHT SENSOR, WITH M12 CONNECTOR, IP65

    1 3RG6233-3LS00 Or equivalent inductive proximity switch

    M12 ANGLED CABLE PLUG, 4-POL. WITH 5M CABLE PUR BLACK, 4 X 0.34MM2

    1 3RX8000-0CE42-1AF0 Or equivalent component

    INTERFACE UNIT AND SOFTWARE FOR SONAR BERO PROGRAMMING, COMPACT M18, II AND III, OPERATING VOLTAGE 100...240 V AC

    1 3RX4000 optional; See chapter 5.1 “Changing the BERO properties”

    Standard software components Table 2-4: Standard software components

    Component No. MLFB / Order number Note SIMATIC S7, STEP7 V5.4, FLOATING LICENSE FOR 1 USER, E-SW, SW AND DOCU. ON CD, LICENSE KEY ON FD, CLASS A, 5 LANGUAGES (G,E,F,I,S), EXECUTABLE UNDER WIN2000PROF/XPPROF, REFERENCE-HW: S7-300/400, C7

    1 6ES7810-4CC08-0YA5 For order information, system requirements and compatibility of STEP7 V5.4 see /7/.

    The application is also runnable under STEP7, V5.3.

    WINCC FLEXIBLE 2005 COMPACT ENGINEERING-SW, FLOATING LICENSE LICENSE KEY ON FD SW AND DOCUMENTATION ON CD IN GER/EN/IT/FR/SP, EXEC. UNDER WIN2000/XPPROF FOR CONFIGURATION OF SIMATIC PANELS UP TO SERIES 170

    1 6AV6611-0AA01-1CA5 TP170A requires at least WinCC flexible Compact.

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 20/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Example files and projects The following list contains all files and projects used in this example.

    Table 2-5: Example files and projects

    Component Note 11609935_Abstand_Fuellstand_V20.zip This zip file contains the

    STEP 7 project

    Note Visualization by means of a touch panel is an integrated part of the STEP7 project. The “Range and Level Measurement” functionality is equally complied without visualization.

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 21/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    2.4 Basic Performance Data

    Sensor Table 2-6: Specification data of Sonar BERO 3RG6233-3LS00

    Criterion Data / Comment Additional Notes

    Sensing range 15...100 cm2 Blind zone 0…14 cm2 Standard target 2 cm x 2 cm Repeat accuracy R ± 2

    Operational voltage (DC) 10…35 V

    including +/- 10% residual ripple; at 10 V to 20 V DC sensitivity reduced by up to 20%

    Analog output signal 4…20 mA2 Load capability 150 mA No-load supply current I0 max. 60 mA Ultrasonic frequency 200 kHz Switching rate 4 Hz Response time 120 ms Power-up delay 280 ms

    Switching status display LED yellow Lights up in the set analog range

    Connector cable

    4 lines (connector M12): 1 Plus 3 Masse 4 Signal

    Line colors: Brown Blue Black

    Enclosure material Brass, nickel-plated; CRASTIN converter cover; epoxy resin converter surface

    Degree of protection IP67 -25 °C to 70 °C Operation

    Ambient temperature -40 °C to 85 °C Bearings

    Weight approx. 0,05 kg

    2 Values in delivery status. Changes possible with programming device and SONPROG software. See chapter 5.1

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 22/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Application software Table 2-7: Performance data of the application software

    Criterion Basic performance data Additional note

    Program size

    Project: 17.1 MB Project (.zip) 3.016 MB MMC: 2746 bytes Work Memory: 1306 bytes

    Longest Scan Cycle Time 3 ms

    at CPU

    Filling level range 0…85 cm BERO mounting height above filling level 0 cm 100 cm

  • Application Description

    Automation Solution

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 23/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Criterion Basic performance data Additional note

    Power-up delay after restart 10 s

    Resolution of filling level display at the tough panel

    2 decimals Unit: cm

    Number of HMI screens 3

  • Function Principles and Program Structures

    General Function Mechanisms

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 24/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Function Principles and Program Structures

    Content This part describes the detailed functions and functional sequences of the involved hardware and software components, the solution structures and – where useful – the specific implementation of this application.

    It is only required to read this part if you are interested in details on the solution components and their interaction.

    3 General Function Mechanisms

    Here you will find information on … the general function mechanisms which apply with regard to Sonar BEROs.

    3.1 Basics on the subject of "Ultrasonic Sensors"

    To also introduce readers of little or no experience with Sonar BEROs to this topic, some basic information on “ultrasonic sensors” will be provided below.

    Basic characteristics Ultrasonic sensors are SIEMENS-internally referred to as Sonar-BERO. Sonar BEROs are ultrasonic sensors for remote object recognition and distance detection in a distance range between 8 cm to 10 cm. Devices send ultrasonic pulses in cyclic intervals, which are reflected by objects and surfaces. The device then determines the range of the object from the time difference between emitting the pulses and receiving the reflected pulse. Since the distance to the object is determined via sound run duration measurement and not via intensity measurement. Therefore, ultrasonic sensors have an excellent background filter. Almost all materials with reflect sound are detected – irrespective of their color. Even crystal clear materials or thin foils are no problem for ultrasonic sensors.

  • Function Principles and Program Structures

    General Function Mechanisms

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 25/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Blind Zone Directly in front of the sensor is the so-called blind zone. It depicts the time which the sonar proximity switch requires to switch from sending to receiving mode. Depending on the sensor, the close range includes a range between 6 and 80 cm. Placing an object within the close range will yield an instable output signal.

    Figure 3-1: Blind Zone

  • Function Principles and Program Structures

    General Function Mechanisms

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 26/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Angle Correct measurement requires considering the angle of the reflection surface. The angle must not exceed ±3 degree. If the angle exceeds 3 degree, the Sonar BERO cannot detect the echo signal.

    Figure 3-2: Reflection angle

    The restriction of 3 degrees also applies to liquids such as water. A stable signal requires an undisturbed liquid surface.

  • Function Principles and Program Structures

    General Function Mechanisms

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 27/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Figure 3-3: Sound reflections at a liquid surface:

    For coarse-grained materials, the angle can exceed 45 degrees, as the reflected signal is diffused over a lager angle area.

    Figure 3-4

  • Function Principles and Program Structures

    General Function Mechanisms

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 28/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Sonar- BEROs of compact range M18 by Siemens

    Figure 3-5: Sonar BERO, compact range M18

    The devices can be delivered with switch, analog or frequency output. In switch mode the devices can be operated as… • Diffuse sensor (standard mode)

    Objects fed into the sound cone from any direction cause a changed output signal if located within the set switching range.

    • Reflex sensor If a reflector is placed in a fixed switching are, the Sonar proximity switch can be operated through all (even sound absorbing) objects between the Sonar proximity switch and the reflector.

    • Thru-beam sensor (two sensors required) Only for evaluating whether an object is present between sender and receiver. The range of the system doubles compared with the range of individual sensors.

    For optimizing to the operating conditions, all sensors of the M18 compact range can be programmed using a PC and the SONPROG 3RX4 000 interface device.

    Simultaneous usage of several BEROs, with distances mounted smaller than the specified minimum distance, enables operating them in multiplex mode (successively), to prevent mutual disturbance. Further information on this topic is available in the SONPROG Online Help under the key words Multiplex and Synchronization.

    The application on hand uses the Sonar BERO with a sensing range of 15…100cm and an analog output of 4…20mA.

    An operating instruction is available in /10/.

  • Function Principles and Program Structures

    Explanations for the Example Program

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 29/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    4 Explanations for the Example Program

    Here you will find information on … • how the measured value reaches the controller

    • the structure of the STEP7 program

    • the functions of the individual blocks and networks

    4.1 Measured value processing

    Reading the measuring value The injected current of the BERO output is fed to the analog input AI 0 of the controller (connection see Table 6-1: Setup of the hardware, point 4). The integrated A/D converter converts the analog signal into a digital Periphery Input Word (PIW), which is accessed by the FC12 function. The electrical parameter to be converted and the PIW address to which the data value is to be filed is parameterized in HW Config.

  • Function Principles and Program Structures

    Explanations for the Example Program

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 30/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Figure 4-1: HW Config

    Figure 4-1: HW Config shows, that the measuring range is set to 4…20mA and that the result of the A/D conversion was transferred to PIW 752. For the PIW address, the system requirements remain unchanged. The above settings are part of the application example. You need not change anything in the hardware configuration.

    During A/D conversion the selected measured range (4…20mA) is projected to a digital value range of 0…27648. For the purpose of transparent program design, this value range is converted back to a real number range 4.0 ... 20.0 using the library function “SCALE“, which is called in FC 12. This will be the starting point for calculating the filling level.

  • Function Principles and Program Structures

    Explanations for the Example Program

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 31/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Calculation of the filling height Dependency of the filling height from the load-independent current, which the BERO provides can be depicted as a straight line with negative inclination. This correlation is illustrated in Figure 4-2: Correlation BERO current – Filling height.

    Figure 4-2: Correlation BERO current – Filling height

    The following mathematical equation can be derived from the graphic:

    hF = hmax – [(IBERO – Imin) · Δh/ΔI + hmin];

    hF: current filling height (cm) (“PARAMETERS“.filling_level) hmax: Distance BERO – container bottom (= 100 cm)

    (“PARAMETERS“.distance_BERO_bottom) IBERO: current BERO output current (mA) [local variable # I] Imin: min. current value (= 4 mA) Δh: Level rise of the detecting range (= 85 cm) ΔI: Current rise of the detecting range (= 16 mA)

  • Function Principles and Program Structures

    Explanations for the Example Program

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 32/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    hmin: Distance BERO – Maximum level (= 15 cm)

    The realization occurs in network 2 of function FC 12.

    4.2 The structure of the STEP7 program Figure 4-3: Structure of the STEP7 program

    The block architecture of the STEP7 operating system ensures the structuredness of the program.

  • Function Principles and Program Structures

    Explanations for the Example Program

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 33/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Table 4-1: Used software blocks

    Block Explanation

    OB 1 Organization block (called by the operating system) for the cyclic program processing. Calls user function FC 12 after the “re-start_delay_time“ has elapsed (see explanation on OB100).

    OB 100 Organization block (called by the operating system) which is processed during restart of the CPU. This block ensures... 1. by setting the memory bit “trigger_restart_delay“, that after a

    restart, the evaluation of the BERO signal is performed with a delay (10sec). This prevents the software, when switching on the power supply, from detecting a non-existent level violation due to the ready delay of the BEROs (see Table 2-6: Specification data of Sonar BERO 3RG6233-3LS00)3. The set memory bit “trigger_restart_delay“ starts the “re-start_delay_time“ in OB1.

    2. that the time stamp of the last restart is displayed in the respective fields on the “Limit Violation“ screen at the touch panel until an actual limit underrun or overrun occurs.

    FC 12 This user function block is the main program of the application. It contains the following realized features: • Evaluation BERO signal • Detecting, processing and acknowledging the level violations • Detecting the current filling sections • Realizing of the blinking marks. A detailed description is provided below this table.

    DB 10 User data and parameter FC105 The library function “Scale“ from the “TI-S7 Converting Blocks“

    folder of the Standard Library converts an integer into a real value, which in physical units is scaled between bottom and a top limit value. See FC105 online help.

    SFC 1 System function (implemented in the CPU) for reading the CPU clock. See SFC1 online help.

    SFC 20 System function (implemented in the CPU) for copying a memory area. In this application, SFC20 is used to transfer the restart time stamps from the start information of OB100 to the DB10. See SFC20 online help.

    3 The power-up delay of the BEROs used in this application is so low, that when the power for BERO and controller is simultaneously switched on, the level detection delay might not be necessary.

  • Function Principles and Program Structures

    Explanations for the Example Program

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 34/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    4.3 FC 12 (MAIN) in detail

    The detailed description refers to the STEP7 project of which all symbols and comments were created in English.

    The color assignment of the networks corresponds to that of the flow chart in Figure 2-5: Flowchart of the core functionality.

    Table 4-2: Detailed description of FC 12

    NW Explanation

    1 Release

    A logic 1 at E 0.0 releases the processing of the block. 2 Calculating the Filling Level

    The called function SCALE (FC105) converts the integer value 0…27648 from PEW 752 , which corresponds to the BERO current, into a REAL variable 4.0…20.0 (local variable # I). According to the relationship

    hF = hmax – [(IBERO – Imin) · Δh/ΔI + hmin]

    the filling height (hF) is calculated. See chapter 4.1. 3 Detect Limit Violation

    • Unconditional resetting of the digital outputs (in AB 4), which characterize the current level section. This also deletes the level marks at the touch panel.

    • If he current filling level (“PARAMETERS“.filling_level) is below filling level 1 (“PARAMETERS“.comparision_level [1]), the program goes to jump label “LOW“ in network 5.

    • If he current filling level (“PARAMETERS“.filling_level) is above filling level 8 (“PARAMETERS“.comparision_level [8]), the program goes to jump label “HIGH“ in network 5.

    Addressing of filling levels 1 and 8 is performed via pointer.

  • Function Principles and Program Structures

    Explanations for the Example Program

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 35/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    NW Explanation

    4 Detect Range of the Actual Value

    • Indicator length A5.1 ("Q_level_below_MIN") and A5.2 ("Q_level_above_MAX") for a limit value violation are reset automatically.

    • The level section in which the current filling height currently moves is detected. To do this, the current level (“PARAMETERS“.filling_level) is successively compared with 8 filling heights (“PARAMETERS“.comparision_level [n]) until the current section has been determined. Digital output A 4.n (n = 0…6) is set accordingly. Addressing of the 8 filling levels is performed in a loop via pointer.

    5 Processing Limit Violation

    This network is linked to if a limit violation has been detected in network 3.

    • During level underrun… 3. the indicator output A 5.1 ("Q_level_below_MIN") is set. 4. the ("ALARM_LOW_LEVEL") bit representing the blinking mark

    is set. 5. the display “Last Restart“ is switched to display “Last Underrun“ in

    touch panel screen “Limit Violation“ (resetting "no_low_level_violation").

    6. time stamp SFC 1 (READ_CLK) is written to DB 11 at the moment of level underrun ("PARAMETERS".timestamp_low_level) and so displayed in the touch panel screen “Limit Violation“.

    • During level overrun… 7. the indicator output A 5.2 ("Q_level_above_MAX") is set. 8. the ("ALARM_HIGH_LEVEL") bit representing the blinking mark

    is set. 9. the display “Last Restart“ is switched to display “Last Overrun“ in

    touch panel screen “Limit Violation“ (resetting "no_high_level_violation").

    10. time stamp SFC 1 (READ_CLK) is written to DB 11 at the moment of level overrun ("PARAMETERS".timestamp_high_level) and so displayed in the touch panel screen “Limit Violation“.

    6 Acknowledgement

    A level violation displayed at the touch panel by means of blinking marks and at the controller by means of blinking digital output A 5.0, must be acknowledged. The alarms only disappear if alarm bits "ALARM_LOW_LEVEL" or "ALARM_HIGH_LEVEL" are reset via input E 0.1 "I_acknowledge" – as far as the level is back in the permitted range.

    Pressing the “Acknowledge“ button in the touch panel screen “Display Filling Level“ has the same function as network 6.

  • Function Principles and Program Structures

    Explanations for the Example Program

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 36/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    NW Explanation

    7 Blinking of Alarm Display

    The blinking function of the blinking marks and of output A 5.0 ("Q_toggle_ALARM") is realized by means of an AND logic connection of the respective alarm bit with the 1Hz clock memory bit (M 0.5)4 (“blinking“). Output A 5.0 blinks at level underrun or overrun.

    4 The clock memory bit is activated and addressed at the CPU Properties in HWConfig. In order to reach a steady blinking of the blinking marks at the Touchpanel, a transmission cycle of 100s was defined for the blinking marks “BLINK_ALARM_LOW“ and “BLINK_ALARM_HIGH“ in WinCC flexible. The other variables are transmitted 1x per hour.

  • Function Principles and Program Structures

    Explanations for the Example Program

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 37/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    4.4 The variables at the touch panel

    The figure below shows the correlation between the data of the controller and the HMI screens.

    Figure 4-4: Control data in the HMI screens

  • Function Principles and Program Structures

    Modifications to the Example Program

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 38/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    5 Modifications to the Example Program

    Here you will find information on … • how the BERO properties can be adjusted to your requirements.

    • how to change the runtime language on the TP170A.

    5.1 Changing the BERO properties

    Programming device / programming software SONPROG For an optimal adjustment of the Sonar BERO to your requirements, the following parameters of the BERO used here can be changed and permanently stored in BERO, using the SONPROG programming device:

    • Lower and upper limit of the analog characteristic

    • End of blind zone

    • End of sensing range

    • Analog characteristic, rising or falling

    • Analog output 0...20 mA or 4...20 mA

    • Mean value generation

    • Attenuation

    • Temperature compensation

    • Reaction rate Figure 5-1: Programming device SONPROG

    The SONPROG programming device connects you to the COM port of your development system (PG/PC). The SONPROG programming software of the same name must have been installed on this system. A free of charge Download is available on the internet (see /8/). Further information on SONPROG is also available on the Internet /9/.

  • Function Principles and Program Structures

    Modifications to the Example Program

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 39/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Note Install the SONPROG programming software, even it you don't intend to use it at present. Its user interface and online help give you a good overview over the functionality of SONPROG and Sonar BEROs.

    Liquid container differs from that in the user example Proceed as follows:

    10. Use SONPROG to change the curve of the BERO so that the detecting range corresponds to that of your liquid container.

    11. Modify the calculation of the current filling height in FC12, NW2 according to the formula in Table 4-2: Detailed description of FC 12.

    12. In the “Define Levels“ touch panel screen you adjust filling heights 1…8 to your requirements by entering new values.

    5.2 Changing the runtime language (TP170A) The texts for the TP170A are configured in German and in English. Without change in the WinCC flexible project the texts are displayed in English. To change the language, proceed as follows:

    13. Open WinCC flexible (see point 3 of Table 6-3: Load the application software into the panel)

    14. Open the "Languages and Fonts" Editor

    15. Deactivate the checkbox for "English" and activate the checkbox for "German". As a result, the languages exchange their lines. The selected language is always displayed on top. Figure 5-2: WinCC flexible – “Languages and Fonts” Editor

    16. Save the project with and load it to the touch panel (see Table 6-3: Load the application software into the panel).

  • Structure, Configuration and Operation of the Application

    Installation and Commissioning

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 40/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Structure, Configuration and Operation of the Application

    Content This part leads you step by step through the structure, important configuration steps, commissioning and operation of the application.

    6 Installation and Commissioning

    Here you will find information on … the hardware and software to be installed, and the steps necessary for commissioning the example.

    6.1 Installation of hardware and software

    This chapter describes the hardware and software components to be installed. The description and manuals as well as delivery information contained in the delivery scope of the respective products, should be followed in any case.

    Installation of the hardware For details on the hardware components, please refer to chapter Table 2-3: Hardware components. All components can be supplied with 24V DC via the PS307 load power unit. For the hardware configuration, follow the instructions listed in the table below:

    Table 6-1: Setup of the hardware

    No. Instructions Note 1. On the profile rail arrange the following

    hardware components from the left to the right and screw them down: Power Supply (PS), CPU 314C-2 DP;

    2. Screw the front connectors into the two slots.

    3. Bolt together CPU and rack.

  • Structure, Configuration and Operation of the Application

    Installation and Commissioning

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 41/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    No. Instructions Note 4. Connect the BERO to the analog input AI 0

    (power connection) in the left front connector. • black Signal • blue M • brown L+

    The pin assignment is printed on the inside of the cover.

    5. Wire the power supply (L+, M) for the used

    DI/DO part of the CPU (right front connector).

    The pin assignment is printed on the inside of the cover.

    6. Connect input E 0.0 (enable) – if necessary via a switch – to L+.

    7. Connect input E 0.1 (acknowledgement) – if necessary via a button – to L+.

    8. Install the BERO 100cm above the container bottom and screw-fix the connection cable.

    9. Wire the power supply of the TP170A. 10. Use the Profibus cable to connect the MPI

    of the S7-CPU to the IF1B interface of the TP170A.

    On the CPU use a connector with PG socket to enable the additional connection of your development system (PG, PC). The cable from Table 2-3: Hardware components fulfills this requirement.

    11. Set the DIP switches on the rear of the TP170A to DP/MPI mode.

    12. Connect the MPI of the CPU to the MPI of your PG/PC.

    Plug the MPI cable on the CPU leading to the PG/PC in the PG socket of the PROFIBUS connector.

    Note Further information on setting up an S7-300 automation system is available in /3/.

  • Structure, Configuration and Operation of the Application

    Installation and Commissioning

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 42/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Installation of the standard software It is assumed that the software specified in Table 2-4: Standard software components is installed on your PG/PC. If you use a PC or notebook as development system, it is required that it is equipped with a communications processor (e.g. CP5512 PC card for notebooks).

    6.2 Installation of the application software Requirements:

    17. The hardware installation is completed.

    18. All components are supplied with voltage.

    19. The CPU is switched to STOP with the mode switch.

    Loading the application software to the CPU

    Table 6-2: Loading the application software to the CPU

    No. Instructions Note 1. Set the PG/PC interface.

    In the control panel of your development system, open the “Set PG/PC Interface” dialog box.

    If the interface has already been set, continue with point 5.

    2. Select the following settings: • Access Point of the Application:

    S7ONLINE (STEP7) CPxxxx(MPI)

    • Interface Parameter Assignment Used: CPxxxx(MPI)

    The CP type depends on the development system used. If the above access point is not included in the list box, create it via the entry (also in the “ Access Point of the Application ” list box). Then click the “Properties…” button.

  • Structure, Configuration and Operation of the Application

    Installation and Commissioning

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 43/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    No. Instructions Note 3. Enter the MPI address of the

    development system (in this application the address “0”) and the other bus parameters as shown in the figure on the right. Quit the dialog box with "OK".

    4. Click “OK” to close the “ Set PG/PC Interface ” window and exit the control panel.

    5. Open the SIMATIC Manager. 6. Extract the project:

    7. Select the project "BID11609935_Abstand_Fuellstand_V20.zip" via the File > Retrieve... menu

    8. Select a target directory for the extracted project folder of the same name.

    9. After extracting, you are asked in the SIMATIC Manager whether you want to open the project. Answer with “Yes”.

    The figure on the right shows the extracted project.

    7. Select the SIMATIC station and load the project to the S7-CPU via the “PLC -> Download” menu or the corresponding button.

  • Structure, Configuration and Operation of the Application

    Installation and Commissioning

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 44/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Load the application software into the panel Table 6-3: Load the application software into the panel

    No. Instructions Note 1. Make sure that the transfer settings

    on the TP170A are correct. Click the “Config” button in its start menu to display the “Transfer Settings” screen form. Make the settings as shown in the screen shot on the right and close the dialog box with “OK”.

    2. In the start menu of the panel – to

    which you have now returned – click the “Transfer” button.

    This takes you to the transfer mode of the panel.

    3. In the development system, open the WinCC flexible project “Filling_Level” via the context menu (right mouse button) as shown on the right.

    4. Select Project > Transfer > Transfer Settings or click the corresponding button.

  • Structure, Configuration and Operation of the Application

    Installation and Commissioning

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 45/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    5. Make the settings as shown in the screen shot below.

    Click “Transfer” to start the data transfer. Answer the question “Do you want to overwrite the existing password list on the device?” (at least) when transferring your configuration for the first time with “Yes”. After the end of the transfer, the touch panel switches to the start screen defined in WinCC flexible (Figure 2-2: Display Filling Level (start picture)).

    Note The above table of steps describes the loading of the TP170A via MPI. However, the configuration can also be transferred to the panel serially. For more information please refer to /4/ and /5/.

    6.3 Startup Requirements: 20. The hardware and software installation as described in chapters 6.1

    and 6.2 is completed. 21. The filling level is in the permitted range (10…0.80 cm).

    22. Filling level detection is enabled (E 0.0 = 1).

    Table 6-4: Commissioning of the simulation

    No. Instructions Response

    1. Switching ... 2. the power supply on, 3. CPU to RUN.

    After a delay time of 10 s the touch panel shows the following screen. The level display (values and bars) correspond to the current filling level.

  • Structure, Configuration and Operation of the Application

    Installation and Commissioning

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 46/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    No. Instructions Response

    2. Press the “Last Level Violation“ button to change to the according screen.

    The time stamp of the last restart is displayed in the top as well as the bottom half of the screen.

    3. 4. Press the “Back“ button to return to the filling level display.

    5. Press the “Define Levels“ button to change to the according screen.

    The level mark is in the section of the current filling level.

    4. Change the filling level: 10cm < filling level

  • Structure, Configuration and Operation of the Application

    Installation and Commissioning

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 47/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    No. Instructions Response

    5. Reduce the filling level to < 10cm. This gives you the following view contents:

    6. Increase the filling level to > 80cm. This gives you the following view contents:

  • Structure, Configuration and Operation of the Application

    Installation and Commissioning

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 48/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    No. Instructions Response

    7. Bring the filling level back to the permitted range and acknowledge the level violation with the “Acknowledge“ button in the “Display Filling Level“ screen.

    The blinking marks in the “Display Filling Level“ and “Define Levels“ screens disappear. The contents of the “Limit Violation“ screen remain unchanged.

  • Structure, Configuration and Operation of the Application

    Installation and Commissioning

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 49/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    No. Instructions Response

    8. Select the “Define Levels“ screen and change, for example, the filling height 4 to 45 cm by touching the respective I/O-box.

    A key pad for value input appears.

    Complete your entry with .

    9. Vary the filling height in the 30…50cm range.

    The level display (Level mark in the “Define Levels“ screen) corresponds with the changed level range limit.

  • Appendix and List of Further Literature

    Literature

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 50/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    Appendix and List of Further Literature

    7 Literature

    7.1 References on hardware and software of this application

    This list includes documents/entries referred to in this application.

    Table 7-1: References on hardware and software of this application

    Title

    /1/ Siemens A&D Customer Support http://www.ad.siemens.de/support

    /2/ Reference to this entry http://support.automation.siemens.com/WW/view/en/11609935

    /3/ Operating Instructions S7-300, CPU 31xC and CPU 31x: Installation http://support.automation.siemens.com/WW/view/en/13008499

    /4/ Operating Instructions TP 170micro, TP 170A, TP 170B, OP 170B (WinCC flexible) http://support.automation.siemens.com/WW/view/en/19082123

    /5/ User’s manual WinCC flexible 2005 Compact / Standard / Advanced http://support.automation.siemens.com/WW/view/en/18796010

    /6/ FAQ 1070096 Which connectors and cables do I need to connect an OP/PG to an S7-controller? Is there a standard cable? http://support.automation.siemens.com/WW/view/en/1070096

    /7/ FAQ 22445076 Information on STEP7 V5.4 http://support.automation.siemens.com/WW/view/en/22445076

    /8/ SONPROG programming software http://www.automation.siemens.com/simatic-sensors/html_00/support_tools_naeherungsschalter.htm

    /9/ Information on SONPROG http://www.automation.siemens.com/simatic-sensors/html_00/naeherungsschalter_sonprog.htm

    A&D Mall (http://mall.automation.siemens.com), search word “SONPROG“ /10/ Operating instruction Sonar-BERO M18

    http://support.automation.siemens.com/WW/view/en/6008111

  • Appendix and List of Further Literature

    Literature

    Application Sonar BERO Entry ID: 11609935

    V 2.0 24th April 2006 51/50

    Cop

    yrig

    ht ©

    Sie

    men

    s A

    G 2

    006

    All

    right

    s re

    serv

    ed

    BID

    xyz_

    Abs

    tand

    _Fue

    llsta

    nd_V

    20_e

    .doc

    7.2 Further Literature

    This list is by no means exhaustive and only gives a selection of appropriate sources.

    Table 7-2: Further Literature

    Title

    /11/ Hans Berger

    Automatisieren mit STEP7 in AWL und SCL [Automation with STEP7 in STL and SCL]

    Publicis Corporate Publishing ISBN 3-89578-242-4

    Book presentation: http://books.publicis-erlangen.de/de/produkte/techinhan/auto/index.cfm?bookid=5816

    /12/ Frank Ebel Siegfried Nestel

    Festo Didactic GmbH & Co. KG

    Sensors for handling and processing technology Proximity sensors, Textbook FP 1110 As at 09/2003

    http://www.festo-didactic.com/didactic/media/mm/download/093045_web.pdf