60
s Contents SFC Visualization 1 Configuration 2 Operating and Monitoring the SFC 3 Appendix A Index SIMATIC SFC Visualization for S7 Manual Edition 01/2004 A5E00287355-01

SIMATIC SFC Visualization for S7 - Siemens AG · 1 SFC Visualization 1.1 SFC Visualization (SFV) You can use the software package "SFC Visualization" to configure SFC visualization

  • Upload
    others

  • View
    73

  • Download
    1

Embed Size (px)

Citation preview

s

Contents

SFC Visualization 1 Configuration 2 Operating and Monitoring the SFC 3 Appendix A Index

SIMATIC

SFC Visualization for S7 Manual

Edition 01/2004 A5E00287355-01

Copyright © Siemens AG 2004 All rights reserved

The reproduction, transmission or use of this document or its contents is not permitted without express written authority. Offenders will be liable for damages. All rights, including rights created by patent grant or registration of a utility model or design, are reserved. Siemens AG Bereich Automation and Drives Geschaeftsgebiet Industrial Automation Systems Postfach 4848, D- 90327 Nuernberg

Disclaimer of Liability

We have checked the contents of this manual for agreement with the hardware and software described. Since deviations cannot be precluded entirely, we cannot guarantee full agreement. However, the data in this manual are reviewed regularly and any necessary corrections included in subsequent editions. Suggestions for improvement are welcomed. ©Siemens AG 2004 Technical data subject to change.

Siemens Aktiengesellschaft A5E00287355-01

Safety Guidelines

This manual contains notices intended to ensure personal safety, as well as to protect the products and

connected equipment against damage. These notices are highlighted by the symbols shown below and

graded according to severity by the following texts:

! Danger indicates that death, severe personal injury or substantial property damage will result if proper precautions are not taken.

! Warning indicates that death, severe personal injury or substantial property damage can result if proper precautions are not taken.

! Caution indicates that minor personal injury can result if proper precautions are not taken.

Caution

indicates that property damage can result if proper precautions are not taken.

Notice

draws your attention to particularly important information on the product, handling the product, or to a particular part of the documentation.

Qualified Personnel

Only qualified personnel should be allowed to install and work on this equipment. Qualified persons

are defined as persons who are authorized to commission, to ground and to tag circuits, equipment, and

systems in accordance with established safety practices and standards.

Correct Usage

Note the following:

! Warning This device and its components may only be used for the applications described in the catalog or the

technical description, and only in connection with devices or components from other manufacturers

which have been approved or recommended by Siemens.

This product can only function correctly and safely if it is transported, stored, set up, and installed correctly, and operated and maintained as recommended.

Trademarks

SIMATIC®, SIMATIC HMI® and SIMATIC NET® are registered trademarks of SIEMENS AG.

Third parties using for their own purposes any other names in this document which refer to trademarks

might infringe upon the rights of the trademark owners.

SFC Visualization for S7 A5E00287355-01 iii

Contents

1 SFC Visualization 1-1

1.1 SFC Visualization (SFV) ................................................................................1-1 1.2 SFC Basic Settings ...........................................................................................1-3

2 Configuration 2-1

2.1 Configurations for the SFC Visualization ..........................................................2-1 2.2 Configuring SFC Block icons ............................................................................2-2 2.3 Configuring SFC Faceplates.............................................................................2-4 2.4 Adjusting Faceplates.........................................................................................2-5 2.5 Preparations for Configuring the Controls.........................................................2-6 2.6 Configuring the "PCS 7 SFC Control" Status Display.......................................2-6 2.7 Configuring the "PCS 7 SFC MultiChart Control" Status Display .....................2-9 2.8 Configuring an SFC Button .............................................................................2-13 2.9 Configuring the SFC Browser Selection .........................................................2-13 2.10 Using Functions for Own Scripts (SFC API Calls) ..........................................2-14 2.11 OS Server and OS Client ................................................................................2-14 2.11.1 What You Should Know About the OS Server and the OS Client ..................2-14

3 Operating and Monitoring the SFC 3-1

3.1 User Privileges ..................................................................................................3-1 3.2 Control and Monitor SFC via Faceplate............................................................3-1 3.3 Faceplate SFC Chart, "Standard" view.............................................................3-2 3.4 Faceplate "SFC Chart", "Messages" view ........................................................3-3 3.5 Faceplate"SFC instance", "Actual values" view................................................3-4 3.6 Faceplate "SFC Instance", "Prepared Values" view .........................................3-7 3.7 Faceplate "SFC Instance", "Messages" view....................................................3-7 3.8 Faceplate "SFC Instance" ,"Batch" view...........................................................3-8 3.9 Operating and Monitoring the SFC via the SFC Status Display ......................3-9 3.10 PCS 7 SFC Control .........................................................................................3-10 3.11 PCS 7 SFC MultiChart Control .......................................................................3-11 3.11.1 Table of Operating States ...............................................................................3-14 3.12 Visualization via an SFC Selection Button in the Button Set

or via SFC Browser Selection in the Display ..................................................3-15 3.13 Information and Operator Control in the Detail Window .................................3-16 3.14 Setting the Operating Mode ............................................................................3-17 3.15 Setting the Operating State.............................................................................3-17 3.15.1 Operating State Logic for SFC (SFC-OSL).....................................................3-18 3.15.2 Diagram of the State Transitions for SFC-OSL...............................................3-20 3.15.3 Operating State Logic for Sequence Paths (Sequence Path OSL) ................3-21 3.15.4 Diagram of the State Transitions for Sequence Path OSL .............................3-22 3.16 Setting the Step Control Mode........................................................................3-23 3.17 Setting the Runtime Options ...........................................................................3-24 3.18 Acknowledge Operator Requests and Step Errors .........................................3-24

Contents

SFC Visualization for S7 iv A5E00287355-01

3.19 The Properties Dialog Boxes ..........................................................................3-25 3.19.1 Properties Dialog Box of the Sequence ..........................................................3-26 3.19.2 Properties Dialog of the Start Condition..........................................................3-26 3.19.3 Properties Dialog Box of the Step...................................................................3-27 3.19.4 Properties Dialog Box of the Transition ..........................................................3-28 3.20 Messages ........................................................................................................3-29

A Appendix A-1

A.1 SFC System variable ....................................................................................... A-1 A.2 SFC API Functions........................................................................................... A-1

Index

SFC Visualization for S7 A5E00287355-01 1-1

1 SFC Visualization

1.1 SFC Visualization (SFV)

You can use the software package "SFC Visualization" to configure SFC visualization in WinCC, and operate and monitor SFC charts / instances in the WinCC runtime system.

What is SFC?

SFC (Sequential Function Chart) is a sequential control system for process flow control.

The sequential control system switches from one state to the next in a fixed, conditional sequence.

Note: In this manual, we shall generally refer to the SFC charts and instances as SFCs, unless these objects need to be distinguished in the respective context.

What are the Features of the SFC Engineering System?

The engineering system allows you to create SFC charts/type/instances, compile them, and load them into the AS. It also allows you to test and commission them.

In order to be able to use the SFCs in the runtime system, you must import them into the runtime system from the engineering system (including selected charts), using the "AS-OS-Engineering" software package. It imports the SFC charts together with their OS comments and messages. Certain mechanisms are installed with the messages, which permit direct access to the SFC chart that a message relates to.

You may also:

• Configure the display of SFCs

• Configure global operator authorizations for the SFCs and specific user privileges per SFC

• Place objects in the WinCC display for calling the SFCs.

Further information can be found in the "SFC Sequential Function Chart" an SIMATIC STEP 7 User Manuals and in the respective Online Help.

SFC Visualization

SFC Visualization for S7 1-2 A5E00287355-01

What does the Runtime System Offer for SFC?

The runtime system lets you monitor and operate any number of SFCs simultaneously.

Note:

• Configuration is not possible during runtime operation.

• You can also download configuration data to the runtime system while the OS is active. This may cause temporarily inconsistent visualization, since the SFCs must first be downloaded to the AS, whereas the OS is loaded in the last step. Potential inconsistency is thus unavoidable within these periods.

SFC Visualization

SFC Visualization for S7 A5E00287355-01 1-3

1.2 SFC Basic Settings

WinCC Explorer Settings

In the WinCC-Explorer you can configure general settings for the display of the SFC charts/instance in the runtime system. These changes may relate to specific objects, or globally to all SFCs displayed.

Global Settings

The global settings for the display of the SFCs concern the sequence topology, the colors used, and the privilege levels. In the WinCC Explorer, open the "SFC Properties" dialog by first selecting "SFC" and then clicking the right-hand mouse button to select the menu item "Open".

For the sequence topology you may determine the size of the objects and the distance between them in the detail and overview windows.

You may choose colors to vary the display of states of steps, transitions, and the selected objects.

You may change the privilege levels for operations if you require levels other than the default levels ("Monitoring", "Process Operation" and "Advanced Process Operation"). These apply to all the SFCs of the WinCC project concerned, if not assigned on SFC specific privilege levels. When compiling the OS, the SFC specific privileges are retained if the select the scope "Changes".

In order to give a user privileges for operations in the SFC visualization, the corresponding global or area-specific privilege levels for the user must be set in the User Administrator.

If no users have been configured, all operations are possible without restriction. In this case, the "Privilege levels" tab is not available.

Object-Specific Settings (on Server only)

For each SFC, you individually set

• The update cycle as well as

• The standard display, meaning with which the SFC is to be opened (overview or detail window) and

• The operator privilege levels.

The available charts are displayed in the detail window of the WinCC Explorer when "SFC" is selected. The dialog box for the SFC chart selected is opened via the right-hand mouse button and the "Properties" menu command.

If required, you can also delete the SFCs no longer required in WinCC. These SFCs continue to exist in the AS database afterwards, meaning that they are also available again in WinCC after the next OS compilation.

SFC Visualization

SFC Visualization for S7 1-4 A5E00287355-01

SFC Visualization for S7 A5E00287355-01 2-1

2 Configuration

2.1 Configurations for the SFC Visualization

Within a WinCC display you can place objects that open an SFC during runtime operation. These objects may be a Block icon, "PCS 7 SFC Control" / "PCS 7 SFC MultiChart Control" objects, arbitrary graphics objects (for example, rectangles), or Windows objects (for example, buttons).

Preparation

• Transfer the SFC charts and instances using the SIMATIC Manager menu command "Options > OS > Compile...".

• Then you can carry out the Preparations for Configuring the Controls

Note

The "@PCS 7 SFC Panel Control" und "@PCS 7 SFC SP Control" control supplied with SFC Visualization are released for the internal controls required in SFC Visualization but not for use in WinCC pictures.

You can configure the following objects for opening the SFC chart:

SFC Block icons

SFC Faceplates

PCS 7 SFC Control

PCS 7 SFC MultiChart Control

SFC Button

SFC Browser Selection

You can use functions of the SFC Visualization in order to create your own scripts. Please refer to:

Using Functions for own Scripts.

Configuration

SFC Visualization for S7 2-2 A5E00287355-01

2.2 Configuring SFC Block icons

SFC Block icons

The templates for the Block icons for the SFC chart "@SFC_RTS" and the instance of an SFC type "@SFC_TYPE" are supplied in the faceplate "@@PCS 7Typicals.pdl". All changes such as the creation of multiple type versions must be copied to this picture and be saved under the name "@PCS 7Typicals.pdl". Detailed information is found in the "PCS 7 Programming Blocks " Manual.

In this picture, you can create an addtional Block icon for each SFC type per Copy and Paste. Then call the Properties of each block and replace the value (e.g. @SFC_TYPE) with the name of the corresponding SFC type under "General" for the attributes "StructureType" and "type".

Creating Block icons

You can create the Block icons for your OS picture in two different ways:

• Automatically via the PH. This way, the corresponding Block icons are automatically inserted into the picture and the parameter assignments are performed properly for all the existing SFC charts. Refer to the PH online help: "Automatic Generation/Update of Block icons for OS pictures"

• Place in WinCC, in the in the Graphics Designer and configure with the Dynamic Wizard.

Procedure in WinCC

1. Copy the corresponding Block icon from the template to your current picture.

2. Adjust the "Structure Type" and "type" property to the type name (not necessary for Block icon for SFC chart)

3. Select the Block icon and then double-click the entry "Connect faceplate to reference point" in the "Default Dynamics" tab of the "Dynamic Wizard" window. The Dynamic Wizard opens.

4. On the "Set Options" page, click on "...". The "Variables - Project:" dialog box opens.

5. In the WinCC variables, open the "List of all Variables" and double-click on the corresponding variable for the chart or instance in the right-hand window. The dialog box is closes; the Dynamic Wizard contains the entry of the variable name.

6. Click on "Next". The next page shows what the Wizard is now going to generate.

Configuration

SFC Visualization for S7 A5E00287355-01 2-3

7. Click on "Apply". You have completed the configuration of the Block icon and you can use it to call the corresponding Faceplate during runtime.

Configuration

SFC Visualization for S7 2-4 A5E00287355-01

2.3 Configuring SFC Faceplates

SFC Faceplates

The system provides two different faceplate templates for the visualization of the corresponding SFC instances of the SFC types and SFC charts during runtime:

• The version "@pg_@sfc_rts.pdl" is used to visualize SFCs.

• The version "@pg_@sfc_type.pdl" is used to visualize SFC instances of an existing SFC type. This faceplate takes interface elements configured in the properties dialog into account (e.g. setpoints, run modes).

In addition to the display objects (type name/instance name, comment, group display,..) created with the standard tools of WinCC, an OCX is available for operator control and monitoring of the operating status and (for an SFC instance) an OCX for the operator control and monitoring of the setpoint values. These OCX are also used in SFC Visualization.

The meanings of the elements contained in the Faceplate (all levels) are described in:

Control and monitor SFC via Faceplate

Conguration:

The Faceplates are already configured before they are supplied. All you have to do is customize them.

You can also create your own Faceplates from the template. However, you have to use the available OCX operator control and monitoring of the operating status and the setpoint values (for an SFC instance).

You will find a detailed description of the configuration of Faceplates in the "PCS 7 Programming Blocks" manual.

Configuration

SFC Visualization for S7 A5E00287355-01 2-5

2.4 Adjusting Faceplates

You can adjust the views "Actual values" (@pg_@sfc_type_actualsp.pdl) und "Prepared values" (@pg_@sfc_type_prepare.pdl) accordingly in the Graphics Designer.

1. Open the picture "@pg_@sfc_type_actualsp.pdl" bzw. "@pg_@sfc_type_prepare.pdl " in the Graphics Designer.

2. In the picture, double-click on the OCX area. The dialog box "Properties of "@PCS 7 SFC SP Control" is opened.

3. In the "General" tab, you can define whether the columns of the setpoint values are to be editable or write-protected for the operator with the option 'Operate on view "Actual values"'. Note: This option is available and operatable in the views properties "Actual values" and for "Prepared values", however, they refer exclusively to the view "Actual value".

4. In the "Colors" tab, you can modify the font colors and background of the corresponding OCX elements.

Configuration

SFC Visualization for S7 2-6 A5E00287355-01

2.5 Preparations for Configuring the Controls

You can prepare your control configuration by measures simplifying the insertion of these objects in the graph.

1. Open the required picture in the Graphics Designer.

2. Select the "Controls" tab from the object view.

3. In the object view, select "Add/Remove" via right-click. The "Select OCX " dialog box opens.

4. In the list, select:

- PCS 7 SFC Control

- PCS 7 SFC MultiChartControl

5. Exit the dialog box with "OK"

The object view now contains both Controls and can be inserted directly from there to the object view via drag and drop.

2.6 Configuring the "PCS 7 SFC Control" Status Display

The states of an SFC can be displayed in a graphics display by an SFC Control function which is assigned to this chart. This Control is also called the status screen (just like the SFC MultiChart Control). The status display must be placed in a graphics display in WinCC Graphics Designer and configured as described below.

1. Placing the PCS 7 SFC Control in the Graphics Display

In the Graphics Designer open the desired graphics display.

- When you have completed your preparations for Configuring the Controls, you can drag and drop the "PCS 7 SFC Control" from the "Controls" object view to the picture.

If the object view does not yet contain the Controls:

Select the entry in the "Smart Objects" toolbar. Open a frame in the graphics display for the object to be displayed. The selection list of all the installed "Controls" is then displayed automatically. Select "PCS 7 SFC Control".

Configuration

SFC Visualization for S7 A5E00287355-01 2-7

Operating Mode

SFC Name

Step Control Mode SFC Status Group display

SequenceStatus

Sequencer"Step error"and "Operatorrequest"Message

Step Name

RuntimeSFC View

Note: You can find detailed information (for runtime operation) in the following table.

Function Description

Operating Mode During WinCC runtime the operating mode (MANUAL or AUTO) of the SFC is displayed here.

Step Control Mode In runtime mode the current step control mode is displayed here: "T" = Transition, "C" = Confirmation by operator, "T and C" = Transition and confirmation by operator, "T or C" = Transition or confirmation by operator, "T/T and C" = Step-specific confirmation by operator.

SFC Name During WinCC runtime the names of the assigned SFCs (chart name or instance name) are displayed here.

SFC Status During WinCC runtime the status of the SFC is displayed here: Ready, starting, active, closing, error (closing), closed, stop, holding, resuming, error, hold (error), resume (error), aborting, aborted, stopping, stopped.

Group display In WinCC runtime mode, - instead of "OFFLINE" - the group messages (for all sequencers) are displayed here: "Step error" and "Operator request"

. The fields are empty if no message exists. The SFC and the corresponding details are opened by clicking on the message.

"Step error" and "Operator request" Message

In WinCC runtime mode, "Step error" and "Operator request" messages for the active sequence are shown here. If these events currently do not exist, the corresponding field is empty. Click on the message to open the SFC and display the details.

Step Name In runtime mode of WinCC the name of the current step is displayed here. If several steps are active (for example, in a parallel branch), the name of the first active step is displayed, followed by the characters " ,... ".

Runtime In runtime mode of WinCC the current runtime of the current step is displayed here. If several steps are active (for example, in a parallel branch), the runtime of the first active step is displayed.

Configuration

SFC Visualization for S7 2-8 A5E00287355-01

Function Description

Sequencer In WinCC runtime mode, the name of the active sequencer is displayed here.

Sequence Status In WinCC runtime mode, the status of the active sequencer is displayed here: Ready, active, holding, aborted, closed.

SFC View In WinCC runtime mode, you can click on this button to open the current SFC in the displayed view mode. You can select the "Overview" and the "Section" view when configuring the control.

2. Configuration

In order to carry out configuration open the properties dialog box by double-clicking on the SFC Control. In the "General" tab card specify whether the SFC is to be opened as an "Overview" or "Section" window. The corresponding button in the SFC Control is labeled correspondingly.

Use the "Assign SFC" command button to use a further dialog box in which all the SFCs of this OS are listed. Select the desired chart and then close the dialog box by clicking on "OK". The current SFC name is entered under "Connected SFC" and is also displayed in the Control after the properties dialog box has been closed by clicking on "OK".

Options in the further tab cards: You can configure the display of the SFC Control individually. In the "Colors" tab card you can use the color toolbar to change the existing colors for certain elements (for example, title bar, window background, etc.).

Note: Configuration by double-clicking on the Control is the most comfortable method. You can naturally also configure the status display by using the Dynamic Wizard – as in previous versions.

Configuration

SFC Visualization for S7 A5E00287355-01 2-9

2.7 Configuring the "PCS 7 SFC MultiChart Control" Status Display

The "PCS 7 SFC MultiChart Control" can be used to monitor and operate several SFCs. This Control is also called the status screen (just like the SFC Control). As in the "SFC Control" the "SFC MultiChart Control" is inserted into a display and the parameters configured during the configuration process.

1. Placing the PCS 7 SFC MultiChart Control in the Graphics Display

In the Graphics Designer open the desired graphics display.

- When you have completed your preparations for Configuring the Controls, you can drag and drop the "PCS 7 SFC Control" from the "Controls" object view to the picture.

If the object view does not yet contain the Controls:

Select the entry in the "Smart Objects" toolbar. Open a frame in the graphics display for the object to be displayed. The selection list of all the installed "Controls" is then displayed automatically. Select "PCS 7 SFC Control". The Control is displayed in accordance with the size of the opened frame. If you do not open the frame completely, not all the columns are visible. In this case a horizontal scroll bar is inserted so that the contents can be scrolled into the visible area during runtime operation.

Note: In order to obtain a better overview the Control is displayed in two sections here. The figure below shows the left-hand and right-hand sections of the Control while the frame is opened completely.

Detailed information (for runtime operation) can be obtained by clicking on the individual columns in the display (cursor changes to a "hand").

Sequencer

Group Message Runtime Transition

"Step error" and "Operator request" Message

Comment

Display

Left-hand section

Configuration

SFC Visualization for S7 2-10 A5E00287355-01

Note: You can find detailed information (for runtime operation) in the following table.

Function Description

Line Number The configured sequence can be recognized on the basis of the line number. In runtime mode of WinCC the column is sorted in ascending or descending numerical order whenever you click on the column header.

SFC This column shows the name of each SFC, including the naming element of the PH (if it exists). In WinCC runtime mode, the name also starts with the symbol indicating the current operating mode. See Table of Operating States. The table is sorted to the operating modes by clicking on the column header. The sorting order is determined by the alphabetical order of the symbol names (e.g. aborted, completed, idle, held etc. ) The SFC overview is opened by clicking it.

Group Message In runtime mode of WinCC the "Operator request" and "Step error" are displayed here. The fields are empty, if there are no displays. When you click on the display the chart is opened and the corresponding chart section is displayed. If an operator request or an step error does not exist currently, the respective field is empty. If you click on the column header, the entries are sorted. Order: Lines with displays, lines without displays. If you click again, in the reverse order.

Parameter Assignment Error

In WinCC runtime mode, a "Parameter assignment error" is displayed here. If no messages exist, this fields is empty. The table is sorted to the operating modes by clicking on the message. Sorting order: rows with messages, rows without messages; click again to invert the sorting order again.

Operator Error In WinCC runtime mode, the message for an "Operator error" is displayed here. If no messages exist, this field is empty. The table is sorted to the operating modes by clicking on the message. Sorting order: rows with messages, rows without messages; click again to invert the sorting order.

Operating Mode In WinCC runtime, the SFC operating mode (MANUAL or AUTO) is displayed here. The mode can be changed via a drop-down menu. The table is sorted to the operating modes by clicking on the message. Sorting order: rows with "AUTO" entry, rows with "MANUAL" entry; click again to invert the sorting order.

Enable In runtime mode of WinCC this entry indicates whether an enable for changing over to the other operating mode exists for the respective chart. In the “MANUAL” mode, the option can be set or reset by clicking on it. If you click on the column header, sorting is carried out. Order: Set option, unset option. If you click again, in the reverse order.

Step Control Mode In runtime mode the current step control mode is displayed here: "T" = Transition, "C" = Confirmation by operator, "T and C" = Transition and confirmation by operator, "T or C" = Transition or confirmation by operator, "T/T and C" = Step-specific confirmation by operator. The mode can be changed by means of a combo box. If you click on the column header, sorting is carried out in alphabetic order.

Commands In WinCC runtime mode, you can control a selected SFC by means of commands. The button functions:

Start or Resume, Abort, Hold, Restart.

Configuration

SFC Visualization for S7 A5E00287355-01 2-11

Sequencer

Group Message Runtime Transition

"Step error" and "Operator request" Message

Comment

Display

Right-hand section

Note: You can find detailed information (for runtime operation) in the following table.

Function Description

Sequencer In WinCC runtime mode, the name of the active sequencer is shown here. The name of the active sequencer starts with the symbol indicating the operating state (of the sequencer). See Table of Operating States The table is sorted to the operating modes by clicking on the message. The sorting order is based on the alphabetical order of the symbol names (e.g. aborted, completed, idle, held, run).

"Step error" and "Operator request" Message

In WinCC runtime mode, "Step error" and "Operator request" messages for the active sequence are shown here. If these events currently do not exist, the corresponding field is empty. Click on the message to open the SFC and display the details. The table is sorted by clicking on the column header. Sorting order: rows with messages, rows without messages; click again to invert the sorting order.

Step In WinCC runtime mode the name of the active step is displayed here. I f several steps are active (e.g. in a parallel branch), the name of the first active step is displayed, followed by the " ,... " characters. The steps status symbol is displayed at the beginning of the name. You can click on the SFC to open the detail view and display the active step in the center of the window. The table is sorted by clicking on the column header according to the step states.

Sorting order: INACTIVE not executed , INACTIVE executed , ACTIVE ,

HELD , ERROR ; click again to invert the sorting order.

Comment In WinCC runtime mode, the step comment is displayed here. Click on the column header to sort the table in alphabetical order.

Runtime In WinCC runtime mode, the actual runtime of the step is displayed here. Click on the column header to sort the table in numerical order.

Configuration

SFC Visualization for S7 2-12 A5E00287355-01

Function Description

Transition In runtime mode of WinCC the name of the current transition is displayed here. If several transitions are active (for example, in an alternative branch), the name of the first active transition is displayed, followed by the characters " ,... ". The symbol of the result is displayed before the transition name (colored line). When you click on it, the chart is opened in detail mode and the active transition in the chart is displayed centered. If you click on the column header, sorting is carried by active and inactive transitions. In the case of active transitions, also by the result.

Display In runtime mode of WinCC you can visualize a selected SFC chart in the selected "Section" or "Overview" mode by using these command buttons .

2. Configuration

In order to carry out configuration open the properties dialog box by double-clicking on the SFC MultiChart Control.

In the "General" tab card you assign the desired SFC charts to the Control or delete them from it.

Assignment: The dialog box for selecting the SFCs is opened by using the

command button. Select the desired SFC and then close the dialog box by clicking on "OK". Repeat this procedure for every SFC which you want to include in the SFC MultiChart Control. A line is created for every SFC with those columns which provide information on the chart in runtime operation. Please also refer to PCS 7 SFC MultiChart Control

Deleting: Select an SFC no longer required in the properties dialog box and

use the command button to delete it.

Sorting: You can change the sequence at a later point for the selected SFCs.

A selected SFC can be moved up or down by using the command buttons.

Title: For the SFC MultiChart Control you can enter a title which identifies it uniquely in runtime operation.

Options in the further tab cards: You can configure the display of the SFC Control individually. In the "Colors" tab card you can use the color toolbar to change the existing colors for certain elements (for example, title bar, window background, etc.) In the "Fonts" tab card you can specify the font, the type style and the font size.

Configuration

SFC Visualization for S7 A5E00287355-01 2-13

2.8 Configuring an SFC Button

You can also configure a graphics object to select an SFC. This object serves as a representative for the SFC chart. Unlike an SFC status display, however, it does not receive any information on the current status of the SFC. Such an object could be, for example, a button.

The procedure is basically the same as for the configuration of the SFC Control:

1. Select the "Button" object in the "Windows Objects" window and open a frame in the graphics display by dragging the mouse.

2. Enter the further settings (text input for labeling, font, operating privilege, etc.) in the subsequent configuration dialog box and close it by clicking on "OK".

3. In the Dynamic Wizard double-click on the "Configure SFC button" entry.

4. In the next dialog step, choose the mouse action that is to start the SFC which is then assigned in the following step.

5. The "SFC Browser" is called up. In the browser select the SFC that is to be assigned to the button.

6. In the subsequent "Set Option" dialog box choose the display in which the SFC is to be opened ("Overview" or "Section").

7. Click on "Finish" to complete the configuration.

2.9 Configuring the SFC Browser Selection

In order to select SFCs you can place an object in the graphics display which calls up the SFC browser during runtime operation.

The procedure for configuring the SFC browser selection is:

1. In the Graphics Designer, select the desired object from the Object Palette and draw a frame in the graphic picture.

2. In the Dynamic Wizard, double-click on the entry "Configure SFC Browser".

3. Click on "Next" to skip the description page.

4. In the subsequent dialog box, select the mouse action you want to use in opening SFC.

5. Click on "Finish" to complete and finish the configuration.

Configuration

SFC Visualization for S7 2-14 A5E00287355-01

2.10 Using Functions for Own Scripts (SFC API Calls)

You can use prepared scripts in the WinCC Graphics Designer in order to assign certain actions to objects.

SFC Visualization offers a whole number of functions of which the most important are contained in these prepared scripts.

However, the SFC Visualization functions can also be used in your own scripts. To do so, the header file "sfccli.h" has to be read in (# include "sfccli.h").

The most import functions are described under SFC API Functions.

General Information on the Functions

• If a BOOL value is provided, TRUE = success and FALSE = error.

• Normally those functions which have "LPOHIO_ERRORSTRUCT IpdmError" as a parameter, can be called with "(void*)0". In this case the error is not evaluated.

• If you require a window handle, the window of the "parent" should be specified for the window to be generated. "NULL" is also allowed as the assignment. In this case, the desktop is used as the "parent" of the new window.

2.11 OS Server and OS Client

2.11.1 What You Should Know About the OS Server and the OS Client

What is an OS Server?

An OS Server is connected to the AS, receives process data and, in multiuser systems, usually has no operator control and monitoring functions. The OS Server holds all configuration data you can modify here.

What is an OS Client?

An OS-Client is an operator station that contains its own project and is used during runtime for operator control and monitoring. The client itself does not have its own SFCs and process connection. The client can assign and monitor the SFCs on the OS servers, but cannot modify these.

Configuration

SFC Visualization for S7 A5E00287355-01 2-15

How are OS Server Data Accessed?

Server project data are offered to the client via reference lists (packages). Client access to server data is possible only after the package has been created and loaded.

The same goes for SFC Visualization, the actual data will not be exported , but rather the references to the SFCs. A new creation and upload of packages is thus not required after an SFCs has been modified. A new package is generated and uploaded to the client only after an SFC was deleted, added or renamed.

Further information is found in the "Process Control System PCS 7 Operator Station" Manual.

Configuring the SFC Visualization

The WinCC Explorer of the Client allows configuration of the display and operations, as described under "SFC Basic Settings".

The basic SFC settings that exist for the individual server projects are of no relevance to the Multi-Client. If no configuration is carried out, the default settings for the Multi-Client apply.

Just like the server project, the Multi-Client project permits the positioning of objects in graphics displays, where the objects are assigned to SFC charts which they open (also refer to "Objects for Opening of SFC Charts").

Note Regarding Configurations in Server Projects

• Configurations for the SFC visualization that were carried out in graphics displays (for example, SFC selection buttons, SFC status display) will also work on the Multi-Client.

• A server project can be configured at the client. The procedures are described in the engineering manual " Process Control System PCS 7 Operator Station".

Permanent Operability for Clients

The SFC Visualization supports "permanent operability" for clients. As soon as a default server has been configured at the client, this is used as the server, irrespective of whether the server is currently the MASTER or on STANDBY. In case of a redundancy changeover the SFC Visualization reacts in accordance with the behavior defined at the WinCC.

Configuration

SFC Visualization for S7 2-16 A5E00287355-01

SFC Visualization for S7 A5E00287355-01 3-1

3 Operating and Monitoring the SFC

3.1 User Privileges

If no users have been configured, all operations are possible without restrictions. Otherwise, depending on the privilege levels configured for the SFC visualization, and on the user that has logged on,

• Buttons are activated and deactivated, and

• Operations are checked prior to execution. Depending on the outcome of the check, operations are either accepted or rejected.

3.2 Control and Monitor SFC via Faceplate

You can operate the SFC chart and the SFC instance via the Faceplate.

• The Faceplate for the SFC chart has two views:

- "Standard" view

- "Message" view

• The Faceplate for the SFC instance has four views:

- "Current values" view

- "Prepared values" view

- "Messages" view

- "Batch" view

Operating and Monitoring the SFC

SFC Visualization for S7 3-2 A5E00287355-01

3.3 Faceplate SFC Chart, "Standard" view

Faceplate SFC chart, "Standard" view

The Faceplate contains

- The Overview row with the elements for the Group Display, Message Acknowledgment, Message Suppression, Batch Assignment and Views selection.

- The operator and display components of the SFC

You will find the meaning of the fields and buttons in the description of the Faceplate "SFC instance", "Actual values" view under 1 and 2.

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-3

3.4 Faceplate "SFC Chart", "Messages" view

This view contains the elements of the "Standard" view and the message window in addition.

Message window in the SFC chart Faceplate

Meaning of the buttons:

• a Show message list

• b Show long-term archive

• c Acknowledge singe message

• d Acknowledgment of all visible messages

• e Print page log

• f Show first message

• g Show last message

• h Show next message

• i Show previous message

Operating and Monitoring the SFC

SFC Visualization for S7 3-4 A5E00287355-01

3.5 Faceplate"SFC instance", "Actual values" view

SFC instance Faceplate, "Actual values", view

The following are represented (from left to right):

• 1 Overview row:

- PCS 7 Group Display: alarm, warning, step errors, operator request

- Message acknowledgment

- Message suppression

- Batch assignment (shows whether a block is assigned to BATCH)

- SFC representation (detail / overview)

- View selection

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-5

• 2 Operation and monitoring component of the SFC:

The fields of the first row:

- State display and name of the SFC status

- State display and name of the active sequencer

- State display and name of the held sequencer

- Field with a drop-down list for displaying and modifying the control modes

The fields of the second row:

- The current operating mode (HAND / AUTO)

- "CONTINUOUS" state flag for a smooth switchover for example, in SIMATIC BATCH to avoid having to turn off the SFC being used when changing from one recipe operation to another. Display if the output QCONT = 1.

- Status display "READY T.C.", when the SFC is not self-terminating (SELFCOMP = 0) and waits for the "Complete" command in the active state (display if READY_TC=1).

- The display for an operator request: (or empty field)

- The display for an interconnection error (or empty field)

- The display for a step error (or empty field)

- The display for an operator error (or empty field)

- The Confirm All button

The Buttons:

- For the selection of the operation mode "Manual" or "AUTO"

- For enabling the switchover to "AUTO" . Start (only active in the "Prepared values" view)

- Hold

- Resume

- Cancel

- Complete

- Stop

- Restart

- Reset

The selection box for enabling and disabling the runtime options, "command output", "cyclic operation", "timeout watchdog".

Operating and Monitoring the SFC

SFC Visualization for S7 3-6 A5E00287355-01

• 3:

The position text is for displaying the current position within the sequencer. It consists of a number and an assigned text. The text is displayed in the SFC Faceplate.

• 4:

The note text contains information for the operator. The user can acknowledge this with the "O" button.

• 5:

The row show the active control strategy. The control strategy cannot be changed here (the control strategy selection is only possible in the "Prepared Values" view).

• 6:

The setpoint and actual values assigned to the selected control strategy are displayed in this table.

- Setpoint name A setpoint value can consist of more than one value. (In the picture sample of setpoint "sw6" with additional values "Material" and "Batch ID").

- Setpoint value The current setpoint values are displayed here. The setpoint values can be edited if you activated the option "Operate on view "active setpoints" in the control Properties during configuration. During editing the values of the configured upper and lower limit are also showed.

- Actual value The values of the actual value output are displayed here.

- Unit The names for the unit are displayed here.

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-7

3.6 Faceplate "SFC Instance", "Prepared Values" view

The view is identical to the "Actual values" view. Here, you can change the control strategy and the setpoint values.

In this view, the edited changes are applied the next time you start the sequencer.

3.7 Faceplate "SFC Instance", "Messages" view

This view contains the elements of the "Actual values" view, described in 1 and 2 (see there). Here, the message window is displayed instead of the elements listed from 3 to 6.

Message window in the SFC instance Faceplate

Meaning of the buttons:

• a Display message list

• b Display long-term archive

• c Acknowledge single message

• d Acknowledge all visible messages

• e Print page log

• f Display first message

• g Display last message

• h Display next message

• i Display previous message

Operating and Monitoring the SFC

SFC Visualization for S7 3-8 A5E00287355-01

3.8 Faceplate "SFC Instance" ,"Batch" view

This view contains the elements of the "Actual value" view, as described under 1 and 2 (see there). Here, the Batch window is displayed instead of the elements listed under 3 to 6.

Batch window in the SFC instance Faceplate

Meaning

• In the "Batch control" field:

- The "Release" option shows whether the SFC is release for BATCH.

- "Assigned" shows whether the SFC is assigned to BATCH ("Assigned" can only be set if "Release" is also set).

• In the "Batch" field:

- "Name" shows the current product name from BATCH

• "Step" shows the current step number from BATCH

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-9

3.9 Operating and Monitoring the SFC via the SFC Status Display

SFC Status Display

By selecting a graphical display that contains a status display configured for the SFC you can obtain an overview of the status of an SFCs (PCS 7 SFC Control). In the case of "PCS 7 SFC MultiChart Control" you can monitor several SFCs and also change (operate) certain parameters.

PCS 7 SFC Control

PCS 7 SFC MultiChart Control

Information on Detailed Information of the Status Displays: The detailed information of the status display (click on the display element) can be obtained on the displays of the configuration Configuring the Status Display "PCS 7 SFC Control" and Configuring the Status Display "PCS 7 SFC MultiChart Control".

Operating and Monitoring the SFC

SFC Visualization for S7 3-10 A5E00287355-01

3.10 PCS 7 SFC Control

The following current information is displayed:

Heading • Chart name of the corresponding SFCs (chart or instance name *)

1st line • Mode (MANUAL / AUTO)

• Abbreviation for the step control mode ("T", "C", "T and C", "T or C", "T/T and C").

• SFC status (chart or instance); see Table of Operating States

• Group display for step error "S" (if it exists, otherwise empty).

• Group display for operator request "O" (if it exists, otherwise empty).

2nd line • Name of the active sequencer

3rd line • Operating status of the active sequencer; see Table of Operating States

• Display for step error "S" (if it exists, otherwise empty).

• Display for operator request O" (if it exists, otherwise empty).

4th line • Step: Name of the first **) active step.

5th line • Runtime: Actual runtime of the first **) active step.

• Button for the SFC visualization: "Overview" or "Section".

*) Note: If the text ## Initialization error ## is displayed instead of the chart name, this SFC Control has a chart assigned to it which has been deleted in WinCC. If the chart still exists in the AS project, you can transfer it back to the WinCC database by means of a new AS-OS transfer. Otherwise you have to assign another SFC chart to the SFC Control.

**) In a parallel branch several steps can be active simultaneously.

You can change to the detail display of the SFCs by clicking on the " Section" button, as it was configured in this example (or change to the overview display, if the "Overview" key has been configured).

If "S" is displayed, the properties dialog box of the step is also opened. A mouse click on "S" opens the detail display of the SFC and centers the active step with the error acknowledge button If "O" is displayed, the properties dialog box of the transition is also opened. A mouse click on "O" opens the detail display of the SFC and centers the active transition with the acknowledge button of the operator request.

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-11

3.11 PCS 7 SFC MultiChart Control

The SFC MultiChart Control allows you to operate and monitor several charts simultaneously. (In order to obtain a better overview the Control is displayed in two sections here). Due to the configured length of the Controls in our example it is provided a scroll bar. The first view shows the details with the scroll bar on the left-hand side, the second with the scroll bar on the right-hand side. The #, SFC, S and O columns are always visible, regardless of the scroll bar position.

Details on the left

Columns Content Function

# Line number Display for sorting.

SFC Name of the SFC (incl. naming element of the PH)

Double-click opens the SFC overview SFC.

Symbol for the operating mode; see Table of Operating States

Display

S Group display of step errors (if exist, otherwise empty field)

A click opens the section view of the SFC and aligns the active step via the error acknowledge key.

O Group display of user requests (if exist, otherwise empty field)

A click opens the section view of the SFC and aligns the active transition via the error acknowledge key of the OS..

Parameter assignment error

Display of parameter assignment errors (if exist, otherwise empty field)

Display

Operator error

Display of operator errors (if exist, otherwise empty field)

Display

Operating mode

"AUTO" or "MANUAL" Allows mode changeover via selection in the drop-down list.

EA - Enable Auto

Options field for enabling "AUTO" mode

Allows setting or resetting of the enable signal.

Step control mode

Abbreviation for the step control mode ("T", "C", "T and C", "T or C", "T/T and C")

Allows step control mode changeover via selection in the drop-down list.

Sequencer Name of the current sequencer. Display

The name of the active sequencer starts with the mode symbol (sequence). See Table of Operating

Display

Operating and Monitoring the SFC

SFC Visualization for S7 3-12 A5E00287355-01

Columns Content Function States.

S Display of "Step error" A click opens the section view of the SFC and aligns the active step via the error acknowledge key.

O Display of "Operator request" A click opens the section view of the SFC and aligns the active transition via the error acknowledge key of the OS.

Right-hand section

Columns Content Function

Step Name of the first active step A click opens the section view of the SFC and aligns the first active step.

Symbol for the step status INACTIVE not executed

Display

INACTIVE executed

ACTIVE

STOPPPED

ERROR

Comment Comment of the first *) active step Display

Runtime Runtime of the first *) active step Display

Transition Name of the first **) active transition A click opens the section view of the SFC and aligns the first active Transition

Symbolic view of the result (colored line)

*) In a parallel branch several steps can also be active simultaneously **) In an alternative branch several transitions can also be active simultaneously.

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-13

Command Buttons

• A selected line can be moved up or down by one line by clicking on the

command buttons.

• A selected SFC chart can be controlled by means of commands.

The command buttons (inactive here) have the following function (from left to right):

Start or Resume, Abort, Hold, Restart.

• You can open a selected SFC by using the "Section" or "Overview" command buttons in the selected display mode.

Information on the Display

• If a line which only contains the SFC name is displayed in gray in the SFC MultiChart Control, this is an SFC which no longer exists in the WinCC database, meaning that it was deleted here and not transferred during the last OS compilation. Remedy: If the chart still exists in the AS project, you can transfer it back to the WinCC database by means of a new AS-OS transfer. Otherwise you have to assign another SFC to the line in the SFC MultiChart Control or delete the line.

• If you select one or more lines, the selection is reversed after approx. 30 seconds.

• The "#", "Control", "E" and "C" columns are fixed, meaning that they always remain visible during horizontal scrolling.

• When you click on a column header, the table lines are sorted in ascending or descending order.

• The sorting order of symbols is derived from the alphabetical order of their names (e.g. aborted, completed, idle, held, run).

• A sorting which is changed during runtime operation is not persistent. The configured display mode is restored when the display is re-selected.

Operating and Monitoring the SFC

SFC Visualization for S7 3-14 A5E00287355-01

3.11.1 Table of Operating States

Symbol Status Meaning

Aborting Abort status after an abort command.

Aborted Abort status closed; waiting for reset or start

command.

Active Normal operation after the start sequence.

Hold Hold status; waiting for resume command.

Hold (Error)

Error status closed if no more errors are queued; waiting for resume command.

Holding Hold status after hold command.

Closing Closing status after a close command or implicit

closing.

Closed Closed state; waiting fir reset or start command.

(leer) Ready Basic state; waiting for start command.

Error Error status after an error has occurred.

Error (closing)

Error status during closing.

Resuming Resume status after resume command.

Resuming (Error)

Resume status after resume command.

Stopped Stop status closed; waiting for reset command.

Starting Start status after a start command.

Stopping Stop status after a stop command.

Only operating states displayed in bold letters apply to sequencers.

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-15

3.12 Visualization via an SFC Selection Button in the Button Set or via SFC Browser Selection in the Display

An SFC can also be visualized and interacted with in the runtime system as described below.

An SFC is visualized and interacted with as follows:

1. Click on this button in the button set, or on an object configured in the display that selects the SFC Browser.

The SFC Browser is displayed with a list of all SFCs (also the servers in the case of an OS client).

You can select an SFC from the list displayed and visualize it by clicking on the "OK" button.

2. Click on the name of the desired SFC.

Depending on the setting in the WinCC-Explorer, the SFC selected is displayed in the overview or in the detail window. In the following example the display is in the form of an overview window. This always displays the entire SFC. Exception: Very large charts are displayed on a maximum of half the screen and have a scroll bar. The currently active sequence is displayed if it exists, otherwise the first sequence.

When the overview window is open, the current state of the SFC is displayed in color. The assignment of the colors to the respective states can be configured freely and is specified globally for all SFC in the WinCC-Explorer. An info bar below the title bar shows the name of the currently active step. This bar is empty, if no step is active, for example, after the SFC has been executed.

3. You can obtain a detail view of the SFC by clicking in the overview window on the desired position. The area surrounding the click position is displayed in the detail window. You can modify this area by resizing or scrolling the detail window.

The SFC windows are displayed in the working area and are always on top.

Operating and Monitoring the SFC

SFC Visualization for S7 3-16 A5E00287355-01

3.13 Information and Operator Control in the Detail Window

Information in the Title Bar

The title bar of the detail window has the following structure:

<Plant Hierarchy\\SFC Name> : <SFC Status> <S> <O> <Sequence name> : < Sequence status> <S> <O> AS status : <AS status>

The individual components of the title bar reflect the respective circumstances.

Possible SFC and sequencer states are found in the table of operating states

The AS have the following significance:

STOP/Cancel • The connection to the AS is disrupted

• The AS is switched off

• The AS is in Stop, the connection to the AS is O.K., the SFCs will be updated.

RUN The AS is in RUN, the connection to the AS is O.K., the SFCs will be updated.

Operator control

The following operations are possible when the detail window is displayed:

Via Faceplate

Setting Operating Mode

Setting Operating State

Setting Step Control Mode

Setting Runtime Options

Acknowledge Operator Requests and Step Errors

The Properties Dialogs

You can switch to the overview display with the "Overview" button.

If the SFC contains several sequences, you can switch between the respective sequences using the tab at the lower edge of the detail window.

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-17

3.14 Setting the Operating Mode

The mode of operation determines how the execution of the SFC is to be controlled.

SFC recognizes the following operating modes:

• AUTO (process mode) - the execution is controlled automatically.

• MANUAL (interactive mode) - the execution is controlled by the operator.

The changeover from "MANUAL" to "AUTO" can be carried out after having been

enabled by the enable button , or without this enabling.

Changing over from "Auto" to "Manual" is possible after an enable at the SFC in the AS, or, with an appropriate privilege level, without that enable (forced manual switch).

Depending on the operator's privilege and whether an enable has been issued, the changeover will either be permitted or refused, and different messages will be displayed.

3.15 Setting the Operating State

The commands in the control and displays section (or in PCS 7 SFC MultiChart Control) allow you to set or modify the SFC chart's operating state.

Buttons Command Meaning

Start / Resume

Initiates a startup sequence by changing to the status "Starting" or a resume sequence by setting the "Resuming" or "Resuming (Error) status. Note: The resume function associated with the Start button is only contained in MultiChart Control. You have to use the "Next" button in all other displays. In the detail window or on the "Actual Value" page of the Faceplate for SFC instances, the "Start" button is only operable if neither the control strategy nor the setpoint values were configured. Otherwise, Start will take place on the "Prepared Values" page of the Faceplate because there must be a prior assignment of a control strategy and the setpoint values.

A step that is marked as target is activated directly in the current sequence.

Abort Initiates an abort sequence by changing to the "Aborting" status

Hold Initiates a hold sequence by changing to the "Hold" status.

Restart Initiates a startup sequence by changing to the "Starting" status The following commands are additionally available in the control and display section of the

detail window and Faceplates:

Resume Initiates a resume sequence by setting the "Resuming" or "Resuming (Error) status.

Close Initiates an abort sequence by changing to the "Closed" status

Stop Initiates an abort sequence by changing to the "Stopped" status

Reset Switches to the "Ready" status.

Operating State Logic of the SFC

Operating State Logic for the Sequencers

Operating and Monitoring the SFC

SFC Visualization for S7 3-18 A5E00287355-01

3.15.1 Operating State Logic for SFC (SFC-OSL)

The current operating state of the SFC-OSL can be changed for the following events:

• Commands (start, resume, hold, etc.) in the operating modes "MANUAL" or "AUTO".

• External signals (inputs of the SFC, commands of an other SFC, etc.).

• Internal signals (commands of own sequence paths, from test mode or SFC visualization).

• Implicit state change.

The operating state logic of an SFC is defined by the diagram of the state transitions:

Information on diagram:

The SFC-OSL contains some state transitions which were retained in order to ensure compatibility to older projects. These are displayed as dashed blue lines in the diagram.

The numbers in the diagram are the identifiers for the individual operating states whose meaning is listed in the following tables.

Operating states (SFC-OSL)

No. Status Meaning

1 Idle Basic state. Waiting for start command. 2 Starting Start processing after start command. 3 Run Normal processing after start processing has been completed. 4 Completing Termination processing after terminating command or implicit termination. 5 Error (completing) Error processing during the termination processing. 6 Completed Termination processing finished. Waiting for reset or start command. 7 Holding Hold processing after hold command. 8 Held Hold processing terminated. Waiting for resume command. 9 Resuming Resume processing after resume command. 10 Error Error processing at an error. 11 Held (error) Error processing terminated and no error active. Waiting for resume

command. 12 Resuming (error) Resume processing after resume command. 13 Aborting Abort processing after abort command. 14 Aborted Abort processing finished. Waiting for reset or start command. 15 Stopping Stop processing after stop command. 16 Stopped Stop processing terminated. Waiting for reset command.

The following tables describe the transitions between the states (Source State No. / Destination State No.) as well as their triggers. X = Possible from several states.

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-19

State transitions through commands (SFC-OSL)

Source/Target

Command Meaning

X/2 Start Trigger start processing by changing to the state "Starting".

3/4 Complete Trigger terminate processing by changing to the state "Completing".

2/7 3/7

Hold Trigger hold processing by changing to the state "Holding".

8/9 11/12

Resume Trigger resume processing by changing to the state "Resuming" or "Resuming (error)".

X/10 4/5

Error Trigger error processing by changing to the state "Error" or "Error (completing)".

X/13 Abort Trigger abort processing by changing to the state "Aborting".

X/15 Stop Trigger stop processing by changing to the state "Stopping".

X/2 Restart Trigger start processing by changing to the state "Starting".

X/1 Reset Change to the state "Idle".

Operating and Monitoring the SFC

SFC Visualization for S7 3-20 A5E00287355-01

3.15.2 Diagram of the State Transitions for SFC-OSL

Aborting

from all states(except Idle,

Aborting, Aborted)

Start

ErrorHolding

Resuming(Error)

Resuming

Resume /Start

STARTING

Completing

Stopping

from all states(except Idle,

Aborting, Aborted,Stopping, Stopped)

Err

orError

Starting

Idle

Hold

Error(completing)

Err

or

Start

Run

1

2

3

4

13 15

14 16

7 10

8 11

9 12

5

Error

States exited due to events

State transitions implicitly exited

Events: commands / conditions /external signals / internal signals

Implicit state changes triggered by SFC whenan active sequencer is to be processed or nosequencer is to be processed

States adapted from OSL for SFC V5.

Events: Error

Legend:

Completed

Res

tart

Held(Error)

Resume/ Start

SELFCOMP=1 SELFCOMP=0and

Completing

Res

et

Abort Stop

Start only if CONT = 1

Aborted Stopped

Aborted

6

Held

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-21

3.15.3 Operating State Logic for Sequence Paths (Sequence Path OSL)

The processing of sequence paths is controlled by the sequence path OSL.

The operating state logic of the sequence path is defined by the state transitions for sequence path OSLs.

The sequence path OSL is executed irrespective of the SFC-OSL when a sequence path is executed. This means that the sequence path has a state which differs from the SFC state. The SFC-OSL can, for example, be in the "Holding" state, whereas the sequence path OSL is in the "Active" state (through the processing of the sequence path to the "Holding" state. The processing of the sequence path OSL is subordinate to the SFC-OSL, so that a state change in the SFC-OSL as a rule causes a state change in the sequence path OSL.

The states of the sequence path OSL

No. Status Meaning

1 Idle Basic state. Waiting for start command.

2 Run Normal operation.

3 Completed Normal processing finished. Waiting for reset or start command.

4 Held Hold processing terminated. Waiting for resume command.

5 Aborted Abort processing finished. Waiting for reset or start command.

State transitions through commands (sequence path OSL)

The commands for the sequence path OSL are internal commands of the SFC run-time system which are only available to the operator in the test mode (Debug > Sequence Path Execute Commands > ...).

The following tables describe the transitions between the states (Source State No. / Destination State No.) as well as their triggers. X = Possible from several states.

Source/ Target

Command Meaning

X/2 Start Trigger sequence path processing by changing to the "Active" state.

2/4 Hold Hold sequence path processing by changing to the "Held" state.

4/2 Resume Resume sequence path processing by changing to the "Run" state.

4/2 Restart Restart sequence path processing by changing to the "Active" state.

X/5 Abort Abort sequence path processing by changing to the "Aborted" state.

Operating and Monitoring the SFC

SFC Visualization for S7 3-22 A5E00287355-01

3.15.4 Diagram of the State Transitions for Sequence Path OSL

Hold

Start

Start

Start

Abort

completed

Idle

Run

Completed

1

2

3

45

States exited due to commands

Operator commands

Implicit state changes triggered by SFC

Legend:

Aborted HeldResume

Restart

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-23

3.16 Setting the Step Control Mode

The step control mode determines the step switching behavior of the sequential control system. The step control mode modifies the behavior of transitions whose conditions have been prepared or fulfilled.

If required, a button is displayed in all step control modes other than "T" if there is a current request for user intervention.

Changing the step control mode is possible in all states of operation.

In this combo box you can set the following step control modes:

Step Control Mode

Meaning

T Transition: The sequential control system runs under process control (i.e., automatically). If a transition condition is fulfilled, switching deactivates the predecessor steps and activates successor steps.

C User interaction: The sequential control system runs exclusively under interaction with the operator. Transition conditions do not have to be fulfilled. A request for user intervention is issued for all successor transitions of each active step. Switching takes place after the operator has intervened.

T and C Step control by transition and user interaction: The sequential control system runs process-controlled and under interaction with the operator. If the transition condition to a successor of an active step is fulfilled, a request for user intervention is issued. Switching requires user intervention.

T or C Step control by transition or user interaction: The control flow of the sequential control system is based on the process or on user interaction. A request for user intervention is issued for every successor transition of an active step only after switching has taken place after the intervention.

T / T and C Step specific confirmation by operator: The "Confirmation" label is set or reset step-specifically in the properties dialog box of the step. The sequential control system runs:

Under process control at steps without the "Confirmation label". Every fulfilled successor transition condition of an active step without user intervention switches to the next one without confirmation (corresponds to step control mode "T").

Under user control at steps with a "Confirmation label". Every fulfilled successor transition condition of an active step with "confirmation" sets a user intervention request and switches to the next transition after confirmation (corresponds to step control mode "C").

Minimum Execution Time:

In the step control modes "C" and "T or C", the minimum execution time for a step can be circumvented by operator intervention.

Operating and Monitoring the SFC

SFC Visualization for S7 3-24 A5E00287355-01

3.17 Setting the Runtime Options

The runtime options provide you with further ways of influencing the sequential control system's behavior. The individual options can be combined. In the runtime system, the following options for the execution can be set:

• Command output

• Cyclic operation

• Timeout watchdog

Execution option Meaning

Command output At Command output "on" the actions of active steps are executed.

At Command output "off" the actions of active steps are not executed.

Cyclic operation At Cyclic operation "on" the "Starting" step is activated automatically after the "OFF" step has been deactivated. A sequence to be processed in "OFF" state is closed immediately in cyclic mode, i.e. only the start and end steps will be processed.

At Cyclic operation off the sequential control system remains in OFF state. As long as no request to exit this state is issued, the "OFF" state is continuously processed in each cycle. Note: This also applies to states which can be exited only by means of an instruction.

Timeout watchdog At Timeout watchdog on the active time of each step under processing is compared with its maximum execution time. If the time is exceeded, a step error is reported back to WinCC. In addition, an acknowledge button for the step error is displayed in the SFC chart.

At Timeout watchdog off no comparison takes place between the active time and maximum execution time.

3.18 Acknowledge Operator Requests and Step Errors

The (group acknowledgement) button allows you to acknowledge current intervention requests and step errors collectively, without having to resort to individual acknowledgements (acknowledgement at the buttons of the steps "S" or of the transitions "O").

Note: In case of a step runtime error the step is returned to the state which it had before the error occurred (for example, active = "green") after the error has been acknowledged.

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-25

3.19 The Properties Dialog Boxes

The Properties dialog box is the detailed display of a sequence, step or a transition. This dialog box shows information specific to the selected object (sequence/step/transition).

The dialog boxes for steps and transitions can be displayed separately or in a combined display. In the combined display the dialog box for the step includes the properties of the successor transition. In this case, the title bar also contains the name of the transition.

The combined display is shown when you click on the "Transition >>" button in the Properties dialog box for the step. Return to the step-only display by clicking on the "Step <<" button.

The information shown is identical in both display variations. The only difference is in the arrangement of the buttons.

Automatic Trace

By setting the Update option you can activate an automatic trace. It automatically displays the current properties after each switching event, depending on the chart's execution. This means that the display of the properties follows the respective active step or the respective active transition.

If the active step or the active transition are located outside the window display during the execution of the chart, the chart is automatically shifted so that the step or transition under observation are within the window's display area. The objects that are currently under observation are shown on the chart as selected.

Note: The automatic trace works even when no property window is open. It is then automatically positioned for the active sequence and active step.

The following description of the properties dialog boxes is based on the separate display of step and transition.

Properties Dialog Box of the Sequence

Properties Dialog Box of the Start condition

Properties Dialog Box of the Step

Properties Dialog Box of the Transition

Operating and Monitoring the SFC

SFC Visualization for S7 3-26 A5E00287355-01

3.19.1 Properties Dialog Box of the Sequence

Open the SFC detail view in which you want to display a sequence properties dialog.

Click on "Sequence Properties" to open the dialog box.

Note: A separate dialog can be called up for the "start conditions" using the "Start condition" button.

"General" tab:

This tab shows

• the name of the current sequencer. The frame color indicates the transitional result/state and is updated continuously.

• the comment of the sequencer.

• the priority of the sequencer.

The priority determines which SFC sequencer is started if the start condition has been met for more than one sequencer.

Note: If sequencers are assigned an identical start condition and priority, the sequencer to the extreme left of the chart will be started first.

Register "Preparation" / "Post-Processing":

This tab shows the preparation or post-processing actions for the current sequence.

These are the actions which should be executed for cyclic processing of the SFC

• prior to the execution of the sequence (preparation)

• after the execution of the sequence (post-processing)

3.19.2 Properties Dialog of the Start Condition

In this dialog box, you will see the conditions that cause the sequence to start.

• The values and conditions display corresponds to the transition display.

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-27

3.19.3 Properties Dialog Box of the Step

Procedure

Activate the detail window for the SFC in which you want to display the Properties dialog box of a step.

Now click on the desired step in order to open the dialog box.

"General" Tab Card

The runtimes, the "Confirmation" option, the comments and the state of the step are displayed (read-only). If no values were configured for the runtimes (time = 0), the specific fields display "- - -".

The state of the step is displayed as text in the title bar, and by the appropriate symbol in the dialog box (to the left of the comment).

Status Meaning Symbol Symbol

normal at target step

INACTIVE, not processed

This step has not been executed yet

n.a.

INACTIVE has been processed

This step is no longer being processed

ACTIVE The step is being processed.

HOLD The step has been paused.

ERROR The step is in the error state (timeout).

"Initialization", "Execution", "Termination" Tab Cards

For each individual action of the step the configured assignments are displayed.

Operations in the Properties Dialog Box of the Step

The following operations are possible within the dialog box:

• Close the dialog box with the "Close" button

• Acknowledge a step error with the "S" button

• Select the previous or next active step with " S <- " / " -> S "

• Display the properties of the transition to successor with the " Transition >> " button

Operating and Monitoring the SFC

SFC Visualization for S7 3-28 A5E00287355-01

• Set / reset option: "Target step"

by setting the "Target Step" option the current step is marked as target (identifier: at the left next to the step). In "Active" state of the sequence the target step cannot be set. This means,

- the starting point of the closed sequencer at the next "Start" instruction is the marked target step and not the start step.

- the sequencer in "Hold" state is resumed at the target step by means of a "Resume" instruction and after the interrupted steps have been processed without error.

Marking of the target step is relevant only to the next "Start" or "Resume" instruction. This mark is deleted during a CPU restart or change from "MANUAL" to "AUTO" mode.

Note:

It is possible to select multiple steps as target (e.g. in parallel branches). The user acts on his own responsibility to select the target steps in a proper way so as to ensure their processing without the formation of locks or loops.

When using "programmed target steps", the user-specific target steps will be deleted in the relevant sequences.

• Option: set / reset "Update" for activating or deactivating the automatic trace

3.19.4 Properties Dialog Box of the Transition

Procedure

Activate the detail window for the SFC in which you want to display the Properties dialog box of a transition.

Now click on the desired transition in order to open the dialog box.

The Boolean operators of the transition logic are displayed along with the field for the comparison values (left and right) and the conditions (middle). The dialog field consists of two pages with a total of 16 lines for conditions and a three-stage transition logic. On the first page, 2 x 5 conditions are combined by the Boolean operators, and a further 2 x 3 conditions on the second page. Next to the last operator, there is an "arrow" button to toggle between the two pages.

The results of logic operation of the Boolean operators are visualized as colored connecting lines of varying thickness. A wide green line indicates "fulfilled", a thin red line indicates "not fulfilled", and a thin black line indicates "inactive".

Operating and Monitoring the SFC

SFC Visualization for S7 A5E00287355-01 3-29

Transition State

State Meaning Color

INACTIVE The transition is not being processed. Gray

NOT FULFILLED The transition condition is not fulfilled. Dark red

FULFILLED The transition condition is fulfilled. Dark green

Operations in the Properties Dialog Box of the Transition

The following operations are possible within the dialog box:

• Close the dialog box with the "Close" button

• Acknowledge intervention request with the "O" button

• Select the previous or next active transition with the "← / →" button

• Option: set / reset "Update" for activating or deactivating the automatic trace

3.20 Messages

General

The following messages are generated in the AS during the runtime of an SFCs:

• Operator requests for transitions

• Step errors

• Status messages relating to the CFC status. Only the step error messages need to be acknowledged.

Only the step error messages require acknowledgment.

Generation of the Process Messages

The messages are generated generically. In addition, mechanisms are stored with the messages. These permit direct access to the SFC that a message relates to.

When an SFC standard display is integrated into a graphical display, the messages of the SFC concerned are integrated into the hierarchy of the group display.

Operating and Monitoring the SFC

SFC Visualization for S7 3-30 A5E00287355-01

Process Messages in the Runtime System

The messages regarding intervention requests for transitions and step errors are displayed and archived by the WinCC reporting system.

From the message system it is possible to call up the detail window of the SFC chart for an SFC message (Loop In Alarm button), including the Properties dialog box of the respective step and of the transition.

Process Messages in the Runtime System

When a process operation for an SFC is executed an operation message is generated and included in the operation list.

SFC Visualization for S7 A5E00287355-01 A-1

A Appendix

A.1 SFC System variable

The following variables are required by SFC Visualization for operating and monitoring SFCs:

Variable Is required for...

<S7-Programm>#AsRead

Reading data from AS <S7 Program>

<S7-Programm>#AsWrite

Writing data from the AS <S7 Program>

@SFCDeltaLoaded Change load of the OS. If the variable has the value = 1, the data will be reloaded from the ES for the SFC Visualization.

A.2 SFC API Functions

• BOOL SFCAbout(HWND projWnd, LPOHIO_ERRORSTRUCT lpdmError);

Opens the Info about SFC Visualization (version info).

Example: SFCAbout(NULL, (void*)0);

• BOOL SFCSetProperties(HWND projWnd, LPOHIO_ERRORSTRUCT lpdmError);

Opens the SFC Properties dialog box (read only) (dimensions, colors, privilege levels).

Example: SFCSetProperties(NULL, (void*)0);

• BOOL SFCSetChartProperties(HWND projWnd, LPCSTR chartName, LPOHIO_ERRORSTRUCT lpdmError);

Opens the Properties dialog box for a specific chart (read only) (comment, last change, updating cycle, standard view).

Parameters: chartName(in) Name of the chart, for example, "SFC1"

Example: SFCSetChartProperties(NULL, "SFC1", (void*)0);

Appendix

SFC Visualization for S7 A-2 A5E00287355-01

• BOOL SFCOpenSection(LPCTSTR chartName, left, LONG top, LONG width, LONG height, LPOHIO_ERRORSTRUCT lpdmError);

Opens the specified chart as a detail window.

Parameters: chartName(in) Name of the chart, for example, "SFC1"

left(in), top(in), width(in), height(in) Pixel coordinates of the rectangle in which the SFC windows may move

Example: SFCOpenSection("SFC1", left, top, width, height, (void*)0);

• BOOL SFCOpenOverview(LPCTSTR chartName, left, LONG top, LONG width, LONG height, LPOHIO_ERRORSTRUCT lpdmError);

Opens the specified chart as an overview window.

Parameters: chartName(in) Name of the chart, for example, "SFC1"

left(in), top(in), width(in), height(in) Pixel coordinates of the rectangle in which the SFC windows may move

Example: SFCOpenOverview("SFC1", left, top, width, height, (void*)0);

• BOOL SFCRtBrowser(LPCSTR* pChartName, LPCSTR* pTagName, LONG left, LONG top, LONG width, LONG height, BOOL alwaysOnTop);

Calls up the Runtime PackageBrowser and returns the selected chart, if appropriate with the server prefix, for example, "OS1_KH1234D::SFC1"

Parameters: pChartName(out) Name of the chart, for example, "SFC1"

pTagName(out) TagName of the chart, for example, "SFC1" (used for the group display)

left(in), top(in), width(in), height(in) Pixel coordinates of the rectangle in which the SFC windows may move

alwaysOnTop(in) 1, if the Browser is to always remain on top (recommended), otherwise 0

Example: SFCRtBrowser(&chartName, &tagname, left, top, width, height, 1);

Appendix

SFC Visualization for S7 A5E00287355-01 A-3

• BOOL SFCSaveWorkspace(LPCSTR pWsName);

Saves all the currently opened SFC windows user-specifically under the workspace (screen combination) "pWsName_user.SSM".

Parameters: pWsName(in) Name of the workspace

Example: SFCSaveWorkspace("TestLayout1");

• BOOL SFCRestoreWorkspace(LPCSTR pWsName);

Restores all the SFC windows saved by using SFCSaveWorkSpace under the workspace "pWsName_user.SSM".

Parameters: pWsName(in) Name of the workspace

Example: SFCRestoreWorkspace("TestLayout1");

• BOOL SFCDeleteWorkspace(LPCSTR pWsName);

Deletes the specified workspace from the hard disk.

Parameters: pWsName(in) Name of the workspace

Example: SFCDeleteWorkspace("TestLayout1");

• BOOL SFCCloseAllWindows();

Closes all the open SFC windows.

Example: SFCCloseAllWindows();

• BOOL SFCGetStepName(LPCSTR pChartName, LONG stepnumber, LPTSTR pStepName, LONG length);

(Function is only used with V5 projects) Provides the step name for the step number of a chart.

Parameter: pChartName(in) Chart name stepnumber(in) Step number pStepName(out) Step name length(in) Length of the step name

• BOOL SFCGetStepNameV6(LPCSTR pChartName, LONG lSequenceNumber, LONG stepnumber, LPTSTR pStepName, LONG length);

Provides the sequence name for the step number of a chart.

Parameter: pChartName(in) Chart name lSequenceNumber(in) Sequence number stepnumber(in) Step number pStepName(out) Step name length(in) Length of the step name

Appendix

SFC Visualization for S7 A-4 A5E00287355-01

• BOOL SFCGetSequenceName(LPCSTR pChartName, LONG lSequenceNumber, LONG pSequenceName, LONG length);

Determines the sequence name based on the sequence number.

Parameter: pChartName(in) Chart name lSequenceNumber(in) Sequence number pSequenceName(out) Sequence name length(in) Length of the sequence name

• BOOL SFCGetChartProp(LPCSTR pChartName, LPTSTR pChartComment, LONG length);

Determines the chart comment.

Parameter: pChartName(in) Chart name pChartComment(out) Chart comment length(in) Length of the comment

• BOOL SFCGetSequenceProp(LPCSTR pChartName, LONG lSequenceNumber, LPTSTR pSequenceComment, LONG length);

Determines the sequence comment.

Parameter: pChartName(in) Chart name lSequenceNumber(in) Sequence number pSequenceComment(out) Sequence comment length(in) Length of the comment

• BOOL SFCGetStepProp(LPCSTR pChartName, LONG lSequenceNumber, LONG stepnumber, LPTSTR pStepComment, LONG length);

Determines the step comment.

Parameter: pChartName(in) Chart name lSequenceNumber(in) Sequence number lStepNumber(in) Step number pStepComment(out) Step comment length(in) Length of the comment

SFC Visualization for S7 A5E00287355-01 Index-1

Index

A Acknowledge Operator Requests

and Step Errors........................................ 3-24 Adjusting Faceplates...................................... 2-5

C Configurations for the SFC Visualization ....... 2-1 Configuring an SFC Button .......................... 2-13 Configuring SFC Block icons ......................... 2-2 Configuring SFC Faceplates.......................... 2-4 Configuring the "PCS 7 SFC Control"

Status Display............................................ 2-6 Configuring the "PCS 7 SFC MultiChart Control"

Status Display............................................ 2-9 Configuring the SFC Browser Selection....... 2-13 Control and Monitor SFC via Faceplate......... 3-1

D Diagram of the State Transitions

for Sequence Path OSL ........................... 3-22 Diagram of the state transitions

for SFC-OSL ............................................ 3-20

F Faceplate "SFC Chart" "Messages" view...... 3-3 Faceplate "SFC Instance" "Batch" view ........ 3-8 Faceplate "SFC Instance" "Messages" view. 3-7 Faceplate "SFC Instance"

"Prepared Values" view ............................. 3-7 Faceplate SFC Chart "Standard" view.......... 3-2 Faceplate "SFC instance"

"Actual values" view................................... 3-4

I Information and Operator Control

in the Detail Window ................................ 3-16

L Line Number ................................................ 2-10

M Meaning of the operating states................... 3-14 Messages ........................................... 3-29, 3-30

O Operating and Monitoring the SFC Chart

via the SFC Status Display.........................3-9 Operating state logic for sequence paths .....3-21 Operating states ...........................................3-14

meaning....................................................3-14 Symbols....................................................3-14

OS-Client......................................................2-14 OS-Server ....................................................2-14

P PCS 7 SFC Control ......................................3-10 PCS 7 SFC MultiChart Control .....................3-11 Preparations for Configuring the Controls ......2-6 Properties Dialog Box of the Sequence........3-26 Properties Dialog Box of the Step ................3-27 Properties Dialog Box of the Transition ........3-29 Properties Dialog of the Start Condition .......3-26

R Runtime..........................................................2-7

S Sequence path BLZ......................................3-21 Setting the Operating Mode..........................3-17 Setting the Operating State ..........................3-17 Setting the Runtime Options.........................3-24 Setting the Step Control Mode .....................3-23 SFC API Functions........................................ A-1 SFC Basic Settings ........................................1-3 SFC System variable..................................... A-1 SFC Visualization (SFV) ...............................1-1 SFC-OSL......................................................3-20 Step Name .....................................................2-7 Symbols of the operating states ...................3-14

T The Properties Dialog Boxes........................3-25

U User Privileges ...............................................3-1 Using Functions for Own Scripts

(SFC API Calls) ........................................2-14

Index

SFC Visualization for S7 Index-iv A5E00287355-01

V Visualization via an SFC Selection Button

in the Button Set or via SFC Browser Selection in the Display............................ 3-15

W What You Should Know About the

OS Server and the OS Client ...................2-14