Vous êtes sur la page 1sur 14

C o v can you visualize the current status of How theeCPU on the WinCC flexible operator r

panel?

s flexible WinCC

h FAQ e August 2009 et

Service & Support


Answers for industry.

Question

This entry originates from the Service & Support Portal of Siemens AG, Sector Industry, Industry Automation and Drive Technologies. The conditions of use specified there apply (www.siemens.com/nutzungsbedingungen). Go to the following link to download this document. http://support.automation.siemens.com/WW/view/de/35538370

Question
How can you visualize the current status of the CPU on the operator panel?

Answer
Follow the instructions and notes listed in this document for a detailed answer to the above question.

Visualize the current status of the CPU V1.0, Entry ID: 35538370

Contents

Contents
Cover sheet ......................................................................................................... 1 1 1.1 1.2 1.3 1.4 1.4.1 1.4.2 1.4.3 1.4.4 2 2.1 2.2 2.3 2.4 Procedure for up to WinCC flexible 2008............................................. 4 Introduction........................................................................................... 4 Operator panels supported .................................................................. 5 Settings / configuration in STEP 7 ....................................................... 6 Configuration in WinCC flexible ........................................................... 6 Define area pointer............................................................................... 7 Create tags and status displays ........................................................... 7 Configure message window ................................................................. 9 Configure scheduler and create status display .................................... 9 Procedure as from WinCC flexible 2008 SP1 .................................... 12 Introduction......................................................................................... 12 Operator panels supported ................................................................ 12 Display "System Messages" editor .................................................... 12 Configure the CPU status .................................................................. 12

Visualize the current status of the CPU V1.0, Entry ID: 35538370

Procedure for up to WinCC flexible 2008

1
1.1

Procedure for up to WinCC flexible 2008


Introduction
The configuration in this FAQ can be used for a reliable status display of the CPU. The classic rhomboid displays in I/O fields or the brief system messages are often not enough to reliably indicate the status of the controller. The following configuration permits you to have three statuses displayed. CPU in "RUN" CPU in "STOP" No connection to the CPU

CPU in "RUN"
Figure 1-1

clock memory

area pointer coordination systemwarnings

Using the clock memory, a check is made as to whether the CPU is in "RUN" status. As long as this clock memory can be displayed on the panel, you can reliably confirm the "RUN" status. CPU in "STOP"
Figure 1-2

clock memory

area pointer coordination systemwarnings

The "Coordination" area pointer signals that the operator panel is ready to communicate in the controller program.

Visualize the current status of the CPU V1.0, Entry ID: 35538370

Procedure for up to WinCC flexible 2008

Figure 1-3

The life bit is inverted by the operator panel at intervals of approx. one second. By querying this bit in the controller program you can check whether there is still a connection to the operator panel. Thus you can determine whether the CPU is only in "STOP" mode or is not available. No connection to the CPU (power failure)
Figure 1-4

Copyright Siemens AG 2009 All rights reserved 35538370_CPU_Status_anzeigen_e.doc

clock memory

area pointer coordination systemwarnings

System messages provide information on the operating modes of the operator panel and controllers. System messages 140000 ("Connection established") and 140001 ("Connection disconnected") indicate whether or not the operator panel still has a connection to the CPU.

1.2

Operator panels supported


All panels that support the "Coordination" area pointer.

Note

The operator panels OP 73micro, TP 170micro, TP 177micro and TP 170A cannot use the "Coordination" area pointer.

Visualize the current status of the CPU V1.0, Entry ID: 35538370

Procedure for up to WinCC flexible 2008

1.3

Settings / configuration in STEP 7


Set the clock memory range in the HW Config.
Figure 1-4

With the clock memory you can determine on the operator panel whether the CPU status "RUN" is active. The clock memory only reaches the operator panel when the CPU is in "RUN" mode. There is no need for any other settings or programming in STEP 7. In the symbol table, you set the marker word for the "Coordination" area pointer.
Figure 1-5

1.4

Configuration in WinCC flexible


Open WinCC flexible ES. The connection to the CPU is set up automatically if you are using an integrated project. If you do not have an integrated project, create a connection.

Visualize the current status of the CPU V1.0, Entry ID: 35538370

Procedure for up to WinCC flexible 2008

1.4.1

Define area pointer


Activate the "Coordination" area pointer and parameterize the address defined above.
Figure 1-6

Copyright Siemens AG 2009 All rights reserved 35538370_CPU_Status_anzeigen_e.doc

1.4.2

Create tags and status displays


Create the following tags under Communication > Tags: Run_error Online_error Coordination Clock memory (internal tag, ULong) (internal tag, ULong) (Connection_1, Word, MW 12) (Connection_1, Byte, MB 10)

Figure 1-7

The following events are configured for the "Coordination" and "Clock Memory" tags.

Visualize the current status of the CPU V1.0, Entry ID: 35538370

Procedure for up to WinCC flexible 2008

Coordination Under Events > Change value, you set the value of the internal tag "Online_error" to 0 and raise the value of the internal tag "Run_error" to 1.

Figure 1-8

Clock memory Under Events > Change value, you set the value of the internal tag "Online_error" to 0 and raise the value of the internal tag "Run_error" to 0.

Figure 1-9

The configuration sets the internal tag "Run_error" approximately every second. However, the CPU's clock memory resets this immediately. This means that the CPU is in "STOP" mode when the "Run_error" tag has a value greater than 1. This behavior is displayed in the "Visibility" animation as shown in the following figure.
Figure 1-10

Visualize the current status of the CPU V1.0, Entry ID: 35538370

Procedure for up to WinCC flexible 2008

Create a text field without animation on layer 1 for the "RUN" status. The text field remains in the foreground until one of the others becomes active.
Figure 1-11

Note

Configure the displays differently. It is not mandatory to use a text field for display. You must simply ensure that the same animations are configured on the display object.

1.4.3

Configure message window


Configure a message window as shown in the figure below. In the next section, tasks are configured in the scheduler for opening and closing the message window dialog. Using DialogOpen and DialogClose you can determine whether the CPU is offline.
Figure 1-12

Copyright Siemens AG 2009 All rights reserved 35538370_CPU_Status_anzeigen_e.doc

1.4.4

Configure scheduler and create status display


Create three tasks in your "scheduler" and configure them as shown in the figure below. DialogClose DialogOpen Cycl_1min

Visualize the current status of the CPU V1.0, Entry ID: 35538370

Procedure for up to WinCC flexible 2008

Figure 1-13

DialogClose Configure the "Increase Value" function in the taskbar and link it to the internal tag "Online_error" (Online_Fehler). The value should then be increased by 1.
Figure 1-14

DialogOpen Configure the "Increase Value" function in the taskbar and link it to the internal tag "Online_error" (Online_Fehler). The value should then be increased by 1.
Figure 1-15

DialogOpen

Configure the "Set Value" function in the taskbar and link it to the internal tag "Online_error" (Online_Fehler). The value should then be set to 2.
Figure 1-16

With these links you can tell whether the CPU is offline.

10

Visualize the current status of the CPU V1.0, Entry ID: 35538370

Procedure for up to WinCC flexible 2008

The message window opens and closes as soon as the message "Connection disconnected" appears and the value increases by 1 each time. The "Cycl_1min" task then sets the value to 2. NOTE The events When dialog is opened and When dialog is closed can only be used as from WinCC flexible 2008. If you are using an earlier version of WinCC flexible, you can leave out this step. The STOP status of the CPU is displayed later in Runtime. However, this takes up to one minute and which is significantly longer than with WinCC flexible 2008.

Configure another I/O field with the status "CPU offline" and animate the visibility as shown in the figure below.
Figure 1-17

Copyright Siemens AG 2009 All rights reserved 35538370_CPU_Status_anzeigen_e.doc

Now place all three I/O fields on top of each other. You can configure this in your template to have the CPU's status display shown permanently.

Visualize the current status of the CPU V1.0, Entry ID: 35538370

11

Procedure for up to WinCC flexible 2008

2
2.1

Procedure as from WinCC flexible 2008 SP1


Introduction
As from WinCC flexible 2008, you can implement the "Incoming" event. When a system message has been triggered and is shown in the message display, the "Incoming" event occurs. You can configure functions or scripts for this event. When the system message is triggered, the functions or scripts configured are executed.

2.2

Operator panels supported


OP 77B, xP 177B, xP 277, MP 377, Mobile Panel 277, Mobile Panel 277 IWLAN, Mobile Panel 277F IWLAN, WinCC flexible Runtime

2.3

Display "System Messages" editor


The "System messages" editor is not displayed by default in WinCC flexible. You activate the "System messages" editor under

"Tools > Settings... > Workbench > Settings for project window > Display all entries".

2.4

Configure the CPU status


Once display of the system messages has been enabled, you must now assign an event to the messages. In the project window you select "Messages" and then the "System messages" editor. The system messages are arranged in numerical order in the "System messages" editor. There are several options for implementing the "Incoming" event for the system messages. In this example, the connection is visualized with a circle. The circle is red when the connection is disconnected. The circle changes its color to green when the connection is established. Proceed as follows to visualize the CPU status.

12

Visualize the current status of the CPU V1.0, Entry ID: 35538370

Procedure for up to WinCC flexible 2008

Table 2-1 No. 1. Procedure Establish the connection to your CPU in WinCC flexible.

Change the connection settings accordingly for your configured network. Pay attention to correct assignment of addresses, slot and subrack. 2.
Copyright Siemens AG 2009 All rights reserved 35538370_CPU_Status_anzeigen_e.doc

Create an internal tag.

3.

Open the system messages dialog and find the message numbers -140000 (Connection established: %1, Station %2, Rack %3, Slot %4) and -140001 (Connection disconnected: %1, Station %2, Rack %3, Slot %4). For alarm number 140000 you use the "Set Value" function to set the value of the internal tag created to 1 and to 0 for alarm number 140001.

Visualize the current status of the CPU V1.0, Entry ID: 35538370

13

Procedure for up to WinCC flexible 2008

No. 4.

Procedure Configure a circle and animate this under "Appearance".

14

Visualize the current status of the CPU V1.0, Entry ID: 35538370