securing the message events of panels www.otomasyonegitimi.com

Upload: wwwotomasyonegitimicom

Post on 14-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    1/32

    Tool for Control Technology

    Securing of Message Events according to the

    Bit Message Procedure of Operator Panels

    Securing the Message Events of Panels

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    2/32

    Table of Contents

    Securing the Message Events of Panels

    V1.0 07/06/06 2/32

    Copyrig

    ht

    Siemens

    AG

    2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    Beitr

    ags-I

    D:

    23637924

    ForewordThe functional examples/tools are functional and tested automationsolutions based on A&D standard products for simple, fast and inexpensiveimplementation of automation tasks for automation technology. Everyfunctional example/tool represents a frequent subtask of a typical customerproblem constellation within automation technology.

    Apart from a list of all required hardware and software components and adescription of the way they are connected to each other, the functionalexamples/tools include the tested and commented code. This ensures thatthe functionalities described here can be reset in a short period of time andthus also be used as basis for individual expansions.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    3/32

    Table of Contents

    Securing the Message Events of Panels

    V1.0 07/06/06 3/32

    Copyrig

    ht

    Siemens

    AG

    2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    Beitr

    ags-I

    D:

    23637924

    Table of ContentsTable of Contents ......................................................................................................... 31 Automation Function...................................................................................... 41.1 Overview........................................................................................................... 4

    1.2 Advantage / customer benefit ........................................................................... 52 Required Hardware and Software Components .......................................... 62.1 Overview of the downloads............................................................................... 73 Function Principle .......................................................................................... 83.1 The message buffer in panels .......................................................................... 8

    3.2 Display of the message events......................................................................... 9

    3.3 Solution........................................................................................................... 104 Method of Function ...................................................................................... 144.1 Description of FB120 Manage Event............................................................ 14

    4.2 Description of FC121 Display_Events.......................................................... 17

    4.3 Synchronizing date/time on the panel............................................................. 205 Parameterization........................................................................................... 215.1 Program adaptation on function block FB120................................................. 236 Operating Instructions ................................................................................. 27

    6.1 Introduction..................................................................................................... 27

    6.2 Testing the functional example....................................................................... 277 Warranty, Liability and Support .................................................................. 32

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    4/32

    Automation Function

    Securing the Message Events of Panels

    V1.0 07/06/06 4/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    1 Automation Function

    1.1 Overview

    One range of operator control and monitoring devices are the panels forlocal operator control and monitoring. In the various product andperformance classes e.g. micro panels, SIMATIC panels, mobile panels ormulti panels messages are entered in a message buffer and displayed via amessage window.

    This functional example is suitable for automation solutions with operatorcontrol and monitoring devices, which only have a temporary messagebuffer where the number of stored messages is not sufficient or the panel

    does not have an additional memory card.It provides you with a solution to store the messages in a SIMATIC in linewith the bit message procedure and display it again on the panel via a userdialog. In this connection the number of stored messages (messagehistory) is parameterizable. This ensures for example that after a powerfailure the messages can still be displayed on the panel.

    The following figure shows the principle of the functional example and wasrealized for demonstration with the panels TP270 and TP170A.

    Figure 1-1

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    5/32

    Automation Function

    Securing the Message Events of Panels

    V1.0 07/06/06 5/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    1.2 Advantage / customer benefit

    The message history is displayed on the panel after a power failure

    No additional memory card in the panel to archive messages isnecessary

    Saving the message history of several panels is possible in oneSIMATIC

    The memory depth of the message history (number of messages) isparameterizable

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    6/32

    Required Hardware and Software Components

    Securing the Message Events of Panels

    V1.0 07/06/06 6/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    2 Required Hardware and Software Components

    The following components were used to realize the functions and describethem in the following document.

    Hardware components

    Table 2 -1

    Component Qty. MLFB / Order Number Note

    Programming deviceSIMATIC Field-PG,1.2 GHZ

    1 6ES7 -711-3CB30-0XA0 Or other PGs

    Load current supplyPS307

    120/230V AC: 24VDC/2A

    1 6ES7307-1BA00-0AA0 Any PS withsufficient powerspecifications can beused here.

    CPU 317-2 PN/DP 1 6ES7317-2AJ10-0AB0 Or any othercomparable CPU

    SIMATIC S7-300,simulator module

    1 6ES7 374-2XH01-0AA0 Optional

    SIMATIC TP270 6 inchtouch panel STN colordisplay

    1 6AV6 545-0DA10-0AX0 Panel withconfiguration ofmessage lists

    SIMATIC Touch Panel

    TP170A, Blue ModeSTN-Display

    1 6AV6 545-0BA15-2AX0 Panel without

    configuration ofmessage lists

    Network structure

    This figure shows the network configuration created for the example.

    Figure 2-1

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    7/32

    Required Hardware and Software Components

    Securing the Message Events of Panels

    V1.0 07/06/06 7/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    Software components

    Table 2-2

    Component MLFB / Order Number Note

    PC operating systemWindows 2000 SP3 orWindows XP ProfessionalEdition SP2

    - Ordering viaMicrosoft

    SIMATIC S7, STEP 7Professional Edition 2004SR4, Version 5.3

    6ES7810-5CC08-0YA5

    SIMATIC WinCC flexible2005 Advanced SP1

    6AV6 613-0AA15-2AX0 Programming tooldependant on the

    choice of panel

    2.1 Overview of the downloads

    Download of the required files

    You can download the files of this functional example from the same website from which you downloaded this document.

    The following file must exist on your computer after the download.

    Dearchive the file using the SIMATIC Manager and then you can open andedit the project.

    Table 2-3

    No. File name Note

    1. 23637924_Save_Display_Message_V01.zip Contains the loadablefunctional example withthe WinCC flexibleprojects

    Note For editing the panel configuration (SIMATIC HMI stations) the softwarepackage WinCC flexible is required.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    8/32

    Function Principle

    Securing the Message Events of Panels

    V1.0 07/06/06 8/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    3 Function Principle

    3.1 The message buffer in panels

    The message buffer is a memory area in the main memory of the panelsthat stores message events (failure or status messages) in chronologicalorder. This buffer is a circulating buffer and saves a number of messagesdepending on the panel type, e.g. the TP170A with 128 messages or theTP270 with 512 messages. Each message event is saved to the messagebuffer with the following information:

    Message number

    Time stamp with time and date

    Identification of the eventsK for incoming messagesG for outgoing messagesQ for acknowledged messages

    Message text

    The value of the message variable at the time of the incoming ofoutgoing message

    This kind of information can be displayed on the panel with the standardoperating element message display/message window.

    The message buffer holds only a limited number of buffered messages andis deleted after a power failure at the panel.Therefore this buffer is called a temporary message buffer.Devices of the 270 series onwards are able to store the messages inarchive files independently from the power supply. This requires anadditional memory card.The new generation of control and monitoring devices (panels), as forexample the OP/TP277 or the Mobile Panel 177 are now equipped with aretentive message buffer.

    Message procedureMessages can be generated with the bit message procedure or themessage number procedure. In this functional example the bit messageprocedure is used for reading and displaying the messages on the controland monitoring device (panel).

    The SIMATIC defines a bit message buffer or range pointer for this. In theconfiguration tool WinCC flexible the error texts are generated underMessages > bit messages for this area.

    The panel cyclically polls the automation system whether the message bithas changed or not. If the SIMATIC reports a change the respectivemessage is generated. The message receives the panel time stamp.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    9/32

    Function Principle

    Securing the Message Events of Panels

    V1.0 07/06/06 9/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    3.2 Display of the message events

    To display the message events the panel provides a message display, amessage window and a message indicator. This is the standard solutionthat is dependant on the message buffer of the relevant panel type.

    Message display

    A message display is configured for a certain screen and can displayseveral messages at the same time. The following figure shows theconfigured message display for this functional example.

    Figure 3-1

    Message window

    A message window is configured in the template for the screens and thuspart of all screens of a project. The message window can be closed and re-opened event controlled. The additional message indicator object is agraphical symbol that is automatically displayed when a message isgenerated. The following figure shows the message window with anacknowledge button and the message indicator.

    Figure 3-2

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    10/32

    Function Principle

    Securing the Message Events of Panels

    V1.0 07/06/06 10/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    3.3 Solution

    The screens shown above (message window, message display) use theinternal message buffer of the operating devices as data source. Thereforethe screens can only show the maximal number of buffered messages,whereas the oldest message will be overwritten in case of an overflow.An individual message screen (service screen) was configured for thisfunctional example, whereas the messages event stored in a data moduleof the SIMATIC are used as a data source. For this purpose the objectsavailable in the configuration tool WinCC flexible were used.

    Graphical IO boxes with graphics list

    Symbolic IO boxes with message lists

    Output boxes

    and user-specific buttons for scrolling the screens

    The number of screens that you can see in this dialog (service screen) isdependant on the parameterizable memory depth for the messages on thefunction block. The next figure shows the user-specific screen with its scrolloptions. For the two panels one service screen each was configured for thisproject. Service screen 1 shows the messages of the TP270 panel andservice screen 2 shows the messages of the TP170A panel. In the exampleboth service screen are callable from each panel.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    11/32

    Function Principle

    Securing the Message Events of Panels

    V1.0 07/06/06 11/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    Figure 3-3

    The graphical symbols of the status display comply with the eventidentification of the message window.

    Table 3-1

    Messagesymbol

    Code Meaning

    3 Symbol for the incoming message (K)

    2 Symbol for the outgoing message withacknowledgement (KQ)

    1 Symbol for outgoing message (G)

    Show latest entry

    Jump to the end of the circulating buffer

    Scroll down one entry

    Scroll up one entry

    Jump to the beginning of the circulating buffer

    Message line: text from

    the message list

    Read pointer of FC121.Points to the first messageon the display. Only formonitoring.

    Write pointer of thecirculating buffer. Onlyfor monitoring.

    Exit image

    Message number

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    12/32

    Function Principle

    Securing the Message Events of Panels

    V1.0 07/06/06 12/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    Saving the message events

    The block (FB120) in the functional example checks cyclically whether thechanges occur in the bit message area or in the acknowledged messagesarea.

    Figure 3-4

    When a message bit changes the following information is generated andsaved to the data block message buffer.

    The message number consisting of the bit position of the message bitand settable offset.

    The time stamp consisting of time and date read from the CPU.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    13/32

    Function Principle

    Securing the Message Events of Panels

    V1.0 07/06/06 13/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    The identification of the event

    K for incoming messagesG for outgoing messagesQ for acknowledged messages

    The incoming message K and the outgoing message G aregenerated by a value comparison old-new in the instance DB.The acknowledged message Q is generated from the acknowledgedmessages area.

    Note The message text and the accompanying variable of a message text are

    not saved to the SIMATIC.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    14/32

    Method of Function

    Securing the Message Events of Panels

    V1.0 07/06/06 14/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    4 Method of Function

    4.1 Description of FB120 Manage Event

    The function block FB120 with the instance DB 120 are called in theorganization block OB1. It is used to register the incoming, outgoing and onthe panel acknowledged messages and handles a maximum of 512different message events. From the status states of the bit message areaor the area indicator, the message events are saved to a messagestructure in the data block DB123 (event buffer).

    Call of FB120 in OB1

    Figure 4-1

    Mandatory parameter

    Mandatory parameter

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    15/32

    Method of Function

    Securing the Message Events of Panels

    V1.0 07/06/06 15/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    Parameters of FB120

    Table 4-1

    Name Type Data type Comment

    iBufferDB IN BLOCK_DB Buffer DB for messages

    iEntries IN INT Number of messages stored in the circulatingbuffer. Dependant on the size of the data block.The DB in this example is parameterized for 512messages.

    iEvents IN ANY Pointer to the message bits of the failure message(bit message area PT_Fault_message).

    The any-pointer must always be stated as the datatype Boolean together with the number of bits.

    iAcks IN ANY Pointer to the acknowledge bits (PT_Acknowledge)

    The any-pointer must always be stated as the datatype Boolean together with the number of bits.

    iOffsetno IN WORD Option for adjusting the error number in theconfiguration tool WinCC flexible (bit messages andtext list numbers)Standard setting = 0

    iNextEvent IN BOOL State of the next event in the buffer

    iPrevEvent IN BOOL State of the previous event in the buffer

    oEntryNo OUT INT Number of messages in the buffer / currentlyoEventNo OUT INT Message number (EventID)

    oEventYear OUT BYTE Time stamp for message / year

    OEventMonth OUT BYTE Time stamp for message / month

    OEventDay OUT BYTE Time stamp for message / day

    OEventHour OUT BYTE Time stamp for message / hour

    OEventMin OUT BYTE Time stamp for message / minute

    OEventSek OUT BYTE Time stamp for message / second

    OEventMilli OUT WORD Time stamp for message / millisecond

    oEventState OUT BOOL Message status: come in = TRUE:gone out = FALSE

    oEventQState OUT BOOL Acknowledgment bit / acknowledged = TRUEnot acknowledged = FALSE

    oOverRun OUT BOOL Overflow bit; buffer is full

    oAct_EntryNo OUT WORD Current write pointer of the event buffer. Necessaryfor displaying the most current message on thepanel.

    Note The parameters marked in color must be connected to sensible entries,the remaining parameters are optional.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    16/32

    Method of Function

    Securing the Message Events of Panels

    V1.0 07/06/06 16/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    IN-Parameters: iBufferDB for specifying the Event Buffer

    This parameter specifies the data block in the CPU for buffering themessages. In this example it is Event Buffer DB123 or DB122. This iswhere the message events are saved together with the message structure(UDT2 Event). To buffer a maximum of messages the structure was set to10 bytes, whereas the time stamp of the data type DATE_AND_TIMEuses 8 of the available 10 bytes.

    The figure shows an excerpt of the circulating message buffer in the CPU.

    Figure 4-2

    Figure 4-3

    Structure of the data word MsgNo_State

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    17/32

    Method of Function

    Securing the Message Events of Panels

    V1.0 07/06/06 17/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    4.2 Description of FC121 Display_Events

    The function FC121 is called in the organization block OB1 after thefunction block FB120 and is responsible for displaying the messages in theservice screen of the TP/OP-Panel.The FC reads the message structure of 3 messages from the circulatingbuffer DB (Event Buffer) and copies it to the to the auxiliary data block forexample DB125 (DB_display_OP_1). This data block is necessary fordisplaying the messages and for controlling the scroll functionality on theTP/OP panel.The service screen displays three messages at the same time. The scrollbuttons are used to navigate within the circulating buffer and display themessage history.

    In the configuration tool WinCC flexible the function set bit was configuredfor every scroll button, to set the respective scroll bits in the data blockwhen the button is used. The function evaluates the scroll bits and performsone of the following actions:

    Jumps to the start of the circulating buffer and copies the first threemessages to the auxiliary data block.

    Moves up one entry in the circulating buffer and starting from thisposition copies three messages to the auxiliary data block.

    Moves down one entry in the circulating buffer and starting from thisposition copies three messages to the auxiliary data block.

    Jumps to the end of the circulating buffer and copies the first threemessages to the auxiliary data block.

    Copies the latest and the two following messages from thecirculating buffer to the auxiliary data block.

    All information stored in the auxiliary data block by this procedure isdisplayed in the service screen on the TP/OP panel.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    18/32

    Method of Function

    Securing the Message Events of Panels

    V1.0 07/06/06 18/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    Call of FC121 in OB1

    Figure 4-3

    Parameters of FC121

    Table 4-2

    Name Type

    Data type Comment

    iEntryNo IN INT Current write position of the circulating buffer.Must be connected to the respective FB120, outputparameter oAct_EntryNo.

    iEntries_max IN INT Number of messages stored in the circulatingbuffer. Must comply with the respective FB120, IN-parameter iEntries.

    iEntries_BufferDB IN BLOCK_DB Specification of the buffer DB (Event Buffer) for thestored messages of the respective FB120

    iOP_DisplayDB IN BLOCK_DB DB number for displaying the messages on thepanel

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    19/32

    Method of Function

    Securing the Message Events of Panels

    V1.0 07/06/06 19/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    IN-Parameters: iOP_DisplayDBfor specifying the Event Buffer

    This parameter specifies the data block for displaying the messages on thepanel. In this example it is DB125 DB_display_OP_1 for the TP270 panelor DB124 DB_display_OP_2 for the TP170A panel. The following figureshows the structure and the connection the WinCC flexible objects.

    Figure 4-4

    Figure 4-5

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    20/32

    Method of Function

    Securing the Message Events of Panels

    V1.0 07/06/06 20/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    4.3 Synchronizing date/time on the panel

    When the message window or message display is used, date and time ofthe message event is read from the panel and stored in the messagebuffer. As this example shows both display options and the self generatedservice screens, date and time of the panel must be updated with date/timeof the CPU.The standard function block SFC1 in the SIMATIC provides the values fordate and time.

    In the configuration tool WinCC flexible menu under Communication >Connections > Range pointer the data range for the update is configured.With the data range set, the transfer of date and time from control device to

    operating device is activated in minute intervals. The following figure showsthe setting in the configuration tool.

    Figure 4-6

    Note Make sure that date and time in the CPU are correct. Corrections can bemade with the menu option PLC > Diagnostic/Setting > Set Time....

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    21/32

    Parameterization

    Securing the Message Events of Panels

    V1.0 07/06/06 21/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    5 Parameterization

    This chapter describes the connection of the most important parameters.We will also provide advice on configuring the function blocks for yourindividual automation task.

    Current parameterization in the SIMATIC

    In OB1 function blocks for two control and monitoring devices (TP270,TP170A) are configured. The functions can also be used for othercomparable panels.

    For the TP270 the following settings were made on the FB120:- 16 bit messages of the memory word MW200 are monitored.

    - The acknowledgement area for the messages triggered by theacknowledgement button in the message window is the memory wordMW210.

    - The data block DB123 is used as an event buffer (circulating buffer forstoring the messages) with a memory depth of 512 message entries.

    - The parameter iOffsetno has the default value 0. This means: Theerror numbers in WinCC (bit messages, text lists) were configuredwithout an offset and start with the number one.

    Example: The message bit M201.0 corresponds to the messagenumber 1 in the SIMATIC and in WinCC flexible and the message bitM200.7 corresponds to message number 16.The error number in the SIMATIC can therefore be adapted in case thenumber band in WinCC does not start with the error number one. Forthe bit messages the numbering must be sequential and without gaps.

    - Input E0.0 and E0.1 are evaluated as a positive edge and specify thenext or the previous message entry for the output parameters (flag areaMW20-MW34) of the block.

    - The memory word MW10 on the output parameter is used for theconnection with the function FC121. The current write indicator is

    transferred.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    22/32

    Parameterization

    Securing the Message Events of Panels

    V1.0 07/06/06 22/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    The following figure shows the connection of the two blocks. For the correct

    display of the messages it is necessary that parameters marked in red havethe same value.

    Figure 5-1

    The parameterization of the operator control and monitoring device TP170Acorresponds to the above connection with other appropriate parameters.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    23/32

    Parameterization

    Securing the Message Events of Panels

    V1.0 07/06/06 23/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    5.1 Program adaptation on function block FB120

    In case the number of messages or the memory depth of the messagehistory is not sufficient for the individual automation task or you needshorter process cycles or take up less memory then the program can beadapted as follows.

    Change the number of messages

    With this block a maximum of 512 message bits can be processed. Tochange the number follow the step-by-step instructions.

    Note The number of messages processed in a cycle depends on theparameter iEvents (any pointer: For example P#M200.0 Bool 16). Inthis case 16 message per cycle.

    Step-by-step instructions

    Table 5-1

    Step Instruction

    1. Use the LAD/STL/FBD Editor to open the function block FB120.

    2. In the variables overview click on static data and adapt the variables staEvent andstaAck.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    24/32

    Parameterization

    Securing the Message Events of Panels

    V1.0 07/06/06 24/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    Step Instruction

    3. Save the block and generate or update the instance data block. There are severaloptions to do this, for example:

    Highlight the block folder in the SIMATIC Manager and select the menuoption Edit > Check block consistency....Translate the program using the function Program > Translate all.

    New generation using the instruction: File > Check and update accesses inthe LAD/STL/FBD Editor of block OB1.

    In the SIMATIC Manager select the menu option Insert > S7 Block > DataBlock > using the parameter Instance-DB and specifying the FB. In caseyou want to re-use the same number for the instance DB you must delete itfirst.

    4. Then transfer the FB120 and the instance DB 120 into the automation device.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    25/32

    Parameterization

    Securing the Message Events of Panels

    V1.0 07/06/06 25/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    Adapting memory depth (message history)

    The data block Event Buffer keeps the stored messages with a messagestructure of 10 bytes each. The data block is configures for a maximum of512 messages, meaning a message history of 512 message events isavailable that is saved voltage-safe and can be re-called on the panel aftera potential power failure.To change the message history follow the step-by-step instructions.

    Step-by-step instructions

    Table 5-2Step Instruction

    1. Use the LAD/STL/FBD Editor to open the data block DB 123 (for TP270 panel) orDB 122 (for TP170A) in the declaration view.

    2. Click on the array Events and enter the new value.

    3. Save the block and load it into the automation device.Note: If the value is increased the DB is lengthened by 10 bytes per array.

    Increase the number of bit messages to be monitored

    In this example 16 bit messages are monitored in one cycle by the functionblock FB 120 and if applicable entered as message event in the circulatingbuffer. For the panel TP270 the memory word MW200 is configured and forTP170A the memory word MW202. If you wanted to increase for examplethe number of bit messages on the TP170A from 16 to 32 follow the step-by-step instructions.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    26/32

    Parameterization

    Securing the Message Events of Panels

    V1.0 07/06/06 26/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    Step-by-step instructions

    Table 5-3

    Step Instruction

    1. In the LAD/STL/FBD Editor open the organization block OB1 and scroll tonetwork 3.

    2. Change the IN parameters iEvents and iAcks as follows:

    3. After this change the 32 bit messages (MW202-MW204) are now monitored in onecycle. The any pointer must always be of the data type boolean, others are notpermissible.Note: Since all bit messages are monitored in one cycle (loop control) the numberof bit messages also influences the cycle time of the OB1.

    4. Add the additional bit messages in the WinCC project and update the TP170Apanel and the automation device.

    P#M 202.0 BOOL 32

    P#M 212.0 BOOL 32

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    27/32

    Operating Instructions

    Securing the Message Events of Panels

    V1.0 07/06/06 27/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    6 Operating Instructions

    6.1 Introduction

    In this example the panels TP270 and TP170A have been configured withthe configuration tool WinCC flexible substitutional for the products of theoperator control and monitoring devices. The functions of the SIMATICblocks can be tested with both devices. The TP170A was specificallyselected to show that this solution can also be used for panels without theconfiguration of dynamic message lists. The difference is that thegenerated service screen shows only the error number instead for thecomplete message text. The remaining information like date, time andstatus of the message event are displayed immediately.

    6.2 Testing the functional example

    With the following step-by-step instructions testing the example is quick andeasy. The instructions describe the test with the TP270 touch panel.

    Table 6-1

    Step Action

    1. Configure the hardware according to chapter 2 and load the STEP 7 programs intothe CPU. Then transfer the WinCC project for the TP270 onto the operator control

    and monitoring device.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    28/32

    Operating Instructions

    Securing the Message Events of Panels

    V1.0 07/06/06 28/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    Step Action

    2. In case there is no TP270 available you can use WINCC flexible to start the runtimeversion on your computer and test the functionalities of the TP270.The do this the Runtime software must be installed on your computer.

    3. In the SIMATIC Manager open the variables table VAT_1 and set the message bitM200.0 and M201.0. to signal status 1.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    29/32

    Operating Instructions

    Securing the Message Events of Panels

    V1.0 07/06/06 29/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    Step Action

    4. On setting the message bits the failure messages 1 and 9 are displayed on thepanel TP 270. You will see the messages in the following screens:

    Automatically in the message window

    in the message display

    in service screen 1

    5. You can see the messages in the various WinCC objects.

    Message window

    Message display

    User service

    screen

    Acknowledgementbutton

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    30/32

    Operating Instructions

    Securing the Message Events of Panels

    V1.0 07/06/06 30/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    Step Action

    6. Acknowledge both messages by using the acknowledge button in the messagewindow.Is the message window closed, open it by clicking on the message indicator.

    7. Service screen 1 looks as follows.

    To view the second acknowledged message scroll the message one down.

    8. Now set the signal status for both bit messages back to 0 in the variables tableVAT_1. In the message display you can see the identification KQG and themessage indicator is closed. In the service screen 1 you can also view the outgoingmessages.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    31/32

    Operating Instructions

    Securing the Message Events of Panels

    V1.0 07/06/06 31/32

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    Step Action

    9. Now switch the power for the panel off and on and the temporary message bufferin the panel is deleted. In service screen 1 the message history still exists.

  • 8/2/2019 Securing the Message Events of Panels Www.otomasyonegitimi.com

    32/32

    Warranty, Liability and Support

    Securing the Message Events of Panels

    Copyrig

    ht

    Siemens

    AG2006Allrig

    htsreserve

    d

    23637924

    _Securing

    _the

    _Message

    _Even

    ts_

    of_Pane

    ls_

    V10

    _e.d

    oc

    23637

    924

    7 Warranty, Liability and Support

    Note The Functional Examples/Tools are not binding and do not claim to becomplete regarding the configuration and equipping and any eventuality.The Functional Examples/Tools do not represent customer-specificsolutions. They are only intended to provide support for typical tasks. Youare responsible for ensuring that the described products are correctlyused. These Functional Examples/Tools do not relieve you of theresponsibility in safely and professionally using, installing, operating andservicing equipment. In using these Functional Examples/Tools, yourecognize that Siemens cannot be held liable for any damage/claimsbeyond the liability clause described. We reserve the right to make

    changes to these Functional Examples/Tools at any time without priornotice. If there are any deviations between the recommendationsprovided in this tool and other Siemens publications e.g. Catalogs thecontents of the other documents have priority.

    We accept no liability for information contained in this document.

    Any claims against us - based on whatever legal reason - resulting from theuse of the examples, information, programs, engineering and performancedata etc., described in this application example shall be excluded. Such anexclusion shall not apply in the case of mandatory liability, e.g. under theGerman Product Liability Act (Produkthaftungsgesetz), in case of intent,gross negligence, or injury of life, body or health, guarantee for the qualityof a product, fraudulent concealment of a deficiency or breach of acondition which goes to the root of the contract (WesentlicheVertragspflichten). However, claims arising from a breach of a conditionwhich goes to the root of the contract shall be limited to the foreseeabledamage which is intrinsic to the contract, unless caused by intent or grossnegligence or based on mandatory liability for injury of life, body or health.The above provisions do not imply a change in the burden of proof to yourdetriment.

    Copyright 2006 Siemens A&D. It is not permissibleto transfer orcopy 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]

    mailto:[email protected]:[email protected]