Zenon - PLC Diagnosis

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

© 2010 Ing.

Punzenberger COPA-DATA GmbH

All rights reserved.

Distribution and/or reproduction of this document or parts thereof in any form are permitted solely with
the written permission of the company COPA-DATA. The technical data contained herein has been
provided solely for informational purposes and is not legally binding. Subject to change, technical or
otherwise.
1. Welcome to COPA-DATA help ...................................................................................................... 1

2. PLC Diagnosis ................................................................................................................................. 2

3. S7 Graph .......................................................................................................................................... 3
3.1 Changeover from ActiveX CD_Graph7Diag.ocx to screen of type S7 Graph .............................. 3
3.2 Prerequisite for automatic import ................................................................................................ 4
3.3 Import data from S7 Graph project .............................................................................................. 5
3.4 Screen S7 Graph ........................................................................................................................... 8
3.5 Filter for screen switch ............................................................................................................... 10
3.6 Function Analyze S7 Graph heuristics ....................................................................................... 11
3.7 Description of the operands analysis ......................................................................................... 12
3.7.1 1. Finding the disturbed step ........................................................................................ 12
3.7.2 2. Selection of the processed transition........................................................................ 12
3.7.3 3. Finding the missing operands ................................................................................... 13

4. straton Monitoring Viewer ......................................................................................................... 14


4.1 Requirements ............................................................................................................................. 14
4.2 Integration of ActiveX in a zenon screen .................................................................................. 15
4.3 Display the ActiveX in a zenon screen during runtime ............................................................. 17

iii
If you miss any information in this help chapter or have any suggestions for additions, please feel free to
contact us via e-mail: [email protected] (mailto:[email protected]).

If you have concrete questions relating to your project, please feel free to contact the support team via
e-mail: [email protected] (mailto:[email protected])

If you realize that you need additional licenses or modules, please feel free to contact the sales team via
e-mail: [email protected] (mailto:[email protected])

1
With the PLC Diagnosis program details of a PLC can be displayed directly in a screen of the control system.
Depending on the PLC different functionalities are available. At the moment the S7 Graph (on page 3) functional
chart analysis for the display of functional chart information of S7 PLCs and the straton Monitoring Viewer (on
page 14) for the display of all programs being executed in the straton (on page 14) Runtime (Soft PLC) are
available.

In the Runtime the currently active steps from the PLC are displayed graphically. Alarm information can be directly
transferred to the alarm administration.

2
You have the possibility to create a screen of the type S7 Graph in zenon. In this screen you can display
the functional chart, the active step, the name of the functional chart, the number of the functional
chart etc. of a S7 control with S7 Graph programming.

The functionality of the ActiveX CD_Graph7Diag.ocx has been taken over by the screen S7 Graph and
the function Analyze S7 Graph heuristics. In order to change from ActiveX to the screen and the
function or to display S7 Graph in zenon, carry out the following steps:

1. If you have not already done it, carry out the S7 Graph import so that the required variables and
files are created.

2. Create screen of the type S7 Graph.

3. Create screen switch functions to screen S7 Graph. Enter the respective variables and files (see
also Filter for screen switch (on page 10)).

4. If you need the heuristics, create the function Analyze S7 Graph heuristics and enter the
respective variables and files (see also Function Analyze S7 graph heuristics (on page 11)).

 Buttons LD and FBD are now distinct control elements

 Heuristics is detached from the actual display. Thus heuristics needs a function of its own.

 Button forward and back make it possible to navigate step-by-step through the step detail view.

3
Even though importing is extensively automatic, some preparatory work has to be done in the S7 Graph
project in order to make the import of functional charts possible in zenon. The following prerequisites
are necessary:

You must make sure that the configuration of the data block is correct.

Make the following settings in tab Translate/Save:

Interface description Individual structures / Load in AS

Run capability Standard FC necessary

Make the following settings in tab Message:

Message handling Message with ALARM_SQ / ALARM_S

For each functional chart to be imported a current source must be generated. This is done in the S7
Graph editor via File -> Generate source. Take care that the name of the source has to match the FB name
of the functional chart. So for a functional chart in the function block 12 the name of the source must be
FB12 (or fb12).

In order to make the allocation of the function block of the functional chart to the according instance
data block (Instance-DB) possible, you may not change the default setting (DB name = FB name).

4
Right-click entry Variables in the project manager. Select menu entry Extended
import/export from the context menu and Import S7 Graph project.... You can also
reach the context menu by selecting the node Variables and right-clicking on the project manager
detail view.

Select the appropriate driver that is used for communication with the PLC in the following dialog and
confirm your selection with OK.

Info
The settings you make in this dialog are saved. When you open the dialog again, all
settings you made are displayed again.

The following settings are available.

S7 project file Select the desired project file (*.s7p).

Target driver The driver you have selected before is displayed there. You
cannot change it there.

5
Instance DB variable Creates variables of the type USINT which depicts the instance
data block of the functional chart. All status information is
communicated with the help of this variable.

Alarm-S variable Creates a variable of the type UDINT which is used for
evaluating the Alarm-S value of the functional chart. It is used
for the evaluation of the disturbed functional chart with the
help of the heuristics.

Message variable Creates an internal variable of type STRING which displays the
status of the heuristics.

Reaction matrix Creates a numeric reaction matrix. The reaction matrix serves
for the linking with the Alarm S variable. Thus an alarm is
triggered in zenon by the Alarm S variable.

Alarms must be acknowledged If you activate this checkbox, all alarms created by the reaction
matrix must be acknowledged.

Separator Define the character which will be positioned between the


nomenclature and the name of the functional chart.

Internal nomenclature Uses the internal nomenclature for the created objects.

Example: S0 (for net address = 0)

WinCC nomenclature Uses the WinCC nomenclature for the created objects.

Example: S7 program

Combined Uses both the internal and the WinCC nomenclature for the
names of the created objects. A dot is used as a separator.

6
Confirm the dialog with Execute.

Select the desired stations (CPU) in the following dialog. The dialog supports multi-select. You can select
several functional charts at once if you press and hold Ctrl or Shift while making your selection.
Enter the net address for the communication. Confirm this dialog with OK. An analysis of the S7 project
is carried out. Depending on the size of the project, it can take some time.

In the next dialog select the functional charts which you want to import. The dialog supports multi-
select. You can select several functional charts at once if you press and hold Ctrl or Shift while
making your selection. If no source is found for a functional chart, it is displayed in the Comment with

7
the entry !! Source missing !!. These functional charts cannot be imported. Confirm the dialog
with OK. The import is carried out and the respective objects are created in zenon. The source of the
functional chart (*.gr7) and the symbolism of the functional chart (*.seq) are imported as well. The are
saved in the zenon Editor under Files -> Others -> S7 Graph.

The screen of the type S7 Graph supersedes the functionality of the ActiveX CD_Graph7Diag.ocx. If you
select Control elements -> Default, you receive the following screen.

The following control elements are available for this screen.

Active steps Display of the active step or steps from the engineered
functional chart.

Whole functional chart (not default) Display of the whole engineered functional chart.

8
Active functional chart There the name of the active functional chart is displayed.

Active step number The number of the active step is displayed here.

Active step name There the name of the active step is displayed.

Symbol table Here, the respective address and attendant symbol name is
displayed in two columns.

Switch LD/FBD With the help of this button you can switch between notations
LD and FBD.

Step forward With the help of this button you jump to the next step in the
individual display.

Step back With the help of this button you jump to the previous step in
the individual display.

9
If you use function screen switch to the screen S7 Graph, the following dialog is displayed.

S7 graph source Select the the file (*.gr7) which has been generated by the S7
Graph import. This file contains the full logics (steps, transitions,
surveillances etc.).

Symbol allocation file Select the the file (*.seq) which has been generated by the S7
Graph import. This file contains the assignment of absolute
operands (equals physical address) to symbolic operands or
symbolism (equals logical identifier).
Example:

Input "E 1.0 = pushbutton 1"

Instance DB variable zenon variable which displays the instance data block of the
functional chart. All status information is communicated with
the help of this variable.

10
Representation type Select if you would like the display as a contact plan (COP) or as
a function plan (FUP).
If you configure the Switch COP/FUP button in your
screen, you can switch between the two display types in
Runtime.

Line width [Pixel] Define the line width in pixels of the connection line between
the elements.

Font Select the desired font from the drop-down list for all labels in
screen S7 Graph.

Colors Define the colors for the high level and low level states and for
the symbols. Click on the respective colored rectangle in order
to change the color.

This function makes it possible to carry out the S7 Graph heuristics without the screen S7 Graph being
active. Thus for example an analysis can be carried out by a S7 PDiag error message via an Alarm S
variable.

The following properties are available.

S7 graph source Select the the file (*.gr7) which has been generated by the S7
Graph import. This file contains the full logics (steps, transitions,

11
surveillances etc.).

Symbol allocation file Select the the file (*.seq) which has been generated by the S7
Graph import. This file contains the assignment of absolute
operands (equals physical address) to symbolic operands or
symbolism (equals logical identifier).
Example:

Input "E 1.0 = pushbutton 1"

Instance DB variable zenon variable which displays the instance data block of the
functional chart. All status information is communicated with
the help of this variable.

Message variable Variable of type STRING which displays the status text of the
heuristics.

In order to make clear, which step is disturbed and which operand in the transitions is responsible, the
message variable is filled with a telling message. This message is generated in the following steps:

3.7.1 1. Finding the disturbed step


If the sent alarm variable is of the type UDINT, it contains the number of the disturbed step in case of an
error. Thsi can be used for further evaluations. If only a BOOL variable is sent, the first actie step, which
is disturbed at the moment, is used.

3.7.2 2. Selection of the processed transition


If in the disturbed step there are several transitions to following steps, only the transition with the
lowest transition number is evaluated.

12
3.7.3 3. Finding the missing operands
The disturb cause which was detected in this way is displayed with the help of the message variable. The
content of this variable is updated when you execute function Analyze S7 Graph heuristics.

In order to find the missing operands in the defined transition the condition tree is processed
hierarchically. This can be demonstarted best in the FUP display (see example illustration belo). The
following cases are distinguished on finding an operator:

All paths are traced, which at the time of the evaluation are not fulfilled (i.e. red in the illustration).

For each path thefulfilment level, the proportion of fulfilled inputs and the total number of inputs, is
calculated. Then only those paths are traced, that have the highest fulfilment level. If thee are several
paths with the same fulfilment level, the first one is used.

With this method a possible small but nevertheless - with high probability - meaningful number of
operands is found, which can be important for the next step.

In the example illustration this method would only find the operand M102.2, because this is the smallest
possible number of operands, which is necessary to change the disturbed transition to undisturbed.

13
Info
This tool visually displays and evaluates straton programs. With the Monitoring Viewer
actions in the straton Runtime can directly be displayed in a screen in zenon.

As of zenon 6.20 SP3 the ActiveX X5Monitoring.ocx which carries out the straton program display is
installed in the zenon program folder and registered in the operating system. For earlier zenon versions
you must carry out the installation and registration manually.

At the moment this module is only available for the PC version of zenon.

A licence for the PLC Analysis is needed for using the straton Monitoring Viewer.

The Wizard stratonMonitoring Builder has to be executed in the straton Workbench, before the straton
Monitoring Viewer can display the current program code. The Wizard is executed in the straton
Workbench under Tools - Create Monitoring Application.

This Wizard has to be licensed.

Different proeprties can be changed in the Wizard, e.g. the authorization for viiewing programs or
forcing variables can be defined (locked, password protected, open).

The Wizard creates a <ProjektName>.K5m file and save it in the zenon project folder.

14
In the zenon Editor select the dynamic element ActiveX and draw it in a zenon screen in the desired size.
Now a dialog for the selection of the ActoveX control opens. Select X5Monitoring Control and click on
Properties.

In the following dialog enter the path of the file, which has been created with the Monitoring Builder
and set the communication parameters:

15
Info
If now paths have been changed, while the Monitoring Builder Wizards was
running, the monitoring file is in the SQL directory of the zenon project. Find out
the GUID (e.g. by checking the straton project properties in zenon) and browse for
the *.K5m file. You can normally find it in the standard path.

C:\ProgramData\COPA-DATA\SQL\<GUID>/FILES/straton/<straton
Project Name>/<straton Project Name.K5m>.

Info
For the Connection settings only use IP addresses and no computer names! If the
straton Runtime runs on the same computer as zenon, enter 127.0.0.1 for the
localhost.

Separated with a colon (:) enter the Runtime port of the straton Runtime after the IP
address. Usually it is 1200.

16
Confirm the two dialog with OK. After creating the zenon Runtime files and starting the zenon and
straton Runtime, the PLC code is displayed in the according zenon screen:

Depending on the authorization defined in the Monitoring Builder Wizard programs can only be seen or
also values can be forced.

17

You might also like