simatic d7-sys cfcdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other...

145
s Contents, Foreword Basic software CFC SFC Index STEP 7 option packages for D7-SYS SIMATIC D7-SYS Manual Edition 03.2003

Upload: trinhkien

Post on 13-Oct-2018

234 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

sContents, Foreword

Basic software

CFC

SFC

Index

STEP 7 option packagesfor D7-SYS

SIMATIC D7-SYS

Manual

Edition 03.2003

Page 2: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Siemens Aktiengesellschaft

This Manual contains notices which you should observe to ensure your own personalsafety, as well as to protect the product and connected equipment. These notices arehighlighted in the Manual by a warning triangle and are marked as follows according tothe level of danger:

! DANGER indicates an imminently hazardous situation which, if not avoided, will result in death orserious injury.

! WARNING indicates a potentially hazardous situation which, if not avoided, could result in death orserious injury.

! CAUTION used with the safety alert symbol indicates a potentially hazardous situation which, if notavoided, may result in minor or moderate injury.

CAUTION used without safety alert symbol indicates a potentially hazardous situation which, if notavoided, may result in property damage.

NOTICE used without the safety alert symbol indicates a potential situation which, if not avoided,may result in an undesireable result or state.

Note the following:

This device and its components may only be used for the applications described in thecatalog or the technical description, and only in connection with devices or componentsfrom other manufacturers which have been approved or recommended by Siemens.

SIMATIC and SIMADYN D are registered trademarks of Siemens AG.

Third parties using for their own purposes any other names in this document which referto trademarks might infringe upon the rights of the trademark owners.

Safety guidelines

Correct usage

Trademarks

Copyright SIEMENS AG 2003 All rights reserved Disclaimer of liabilityThe reproduction, transmission or use of this document or itscontents is not permitted without express written authority.Offenders will be liable for damages. All rights, including rightscreated by patent grant or registration of a utility model or design,are reserved.Siemens AGA&DFrauenauracher Straße 8091056 Erlangen

We have checked the contents of this manual for agreement withthe hardware and software described. Since deviations cannot beprecluded entirely, we cannot guarantee full agreement.However, the data in this manual are reviewed regularly and anynecessary corrections included in subsequent editions.Suggestions for improvement are welcomed.

Siemens AG 2003Technical data subject to change.

Page 3: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS iiiEdition 03.2003

ForewordThis Manual explains the principle use and functions of the STEP 7automation software with the main focus on the appropriate technologicaland drive control components T400, FM 458-1 DP, SIMADYN D,SIMATIC TDC or D7-SYS.

This Manual addresses programmers and commissioning engineers.General knowhow regarding automation technology is required in order tounderstand the contents of the Manual

This Manual is valid for SIMATIC D7-SYS Version 6.0.

If you have questions relating to the use of the products described in theManual, which cannot be answered here, then please contact your localSiemens office. You can also call the Hotline:

• Tel.: +49(9131) 98-5000

• Fax: +49(9131) 98-1603

• e-mail: [email protected]

Appropriate training courses are available in order to make it easier to getto know the SIMADYN D automation system. Please contact the centralTraining Center in D-Erlangen (I&S IS INA TC):

• Tel.: +49(9131) 7-27689, -27972

• Fax: +49(9131) 7-28172

• Internet: www.siemens.de/sibrain

• Intranet: http://info-tc.erlm.siemens.de/

NOTE This user part of the Manual does not include any detailedinformation/instructions with individual descriptions, but is only intendedto provide a basic procedure. More detailed information on the dialogboxes in the software and how they are handled is provided in theappropriate online help.

Purpose of thisManual

Basic knowledgerequired

Validity of theManual

Additional support

Training Center

Page 4: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Foreword

iv STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

This manual is part of the overall documentation for the technological anddrive control components T400, FM 458, SIMADYN D, SIMATIC TDCand SIMATIC D7-SYS:

Title ContentSystem andcommunicationsconfiguring D7-SYS

The first project in a few stepsThis Section provides an extremely simple entry into the methodology whenassembling and programming the SIMATIC TDC/SIMADYN D controlsystem. It is especially conceived for first-time users of a control system.System softwareThis Section provides basic know-how about the structure of the operatingsystem and an application program of a CPU. It should be used to obtain anoverview of the programming methodology, and basis for configuring userprograms.Communications configuringThis section provides you with basic know-how about the communicationpossibilities and how you configure links to the communication partners.Changeover from STRUC V4.x to D7-SYSEssential features are included in this section, which have changed overSTRUC V4.x with the introduction of SIMATIC D7-SYS.

STEP 7 option packagesfor D7-SYS

Basis softwareThis section explains the essential use and the functions of the STEP 7automation software. For first users, it provides an overview on configuring,programming and commissioning a station.When working with the basis software, you can access the online help whichprovides you with support when it comes to detailed questions on using thesoftware.CFCThe CFC language (Continuous Function Chart) allows you to graphicallyinterconnect blocks.When working with the particular software, you can also use the online helpwhich can answer detailed questions regarding the use of theeditors/compiler.SFCConfiguring sequence controls using SFC (Sequential Function Chart) ofSIMATIC S7.In the SFC editor, you generate a sequence chart using graphic resources.The SFC elements of the chart are then positioned according to specificrules.

Hardware The complete hardware spectrum is described as reference in this Manuals.Function blocks These Reference Manuals provide you with an overview of selected function

blocks for the associated technological and drive control components T400,FM 458-1 DP, SIMADYN D and SIMATIC TDC.

Informationoverview

Page 5: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Foreword

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS vEdition 03.2003

As first time user, we recommend that this Manual is used as follows:

• Please read the first section on using the software in order to get toknow some of the terminology and basic procedure.

• Then use the particular sections of the Manual if you wish to carry-outcertain processing steps (e.g. loading programs).

If you have already executed a small project, and have gained someexperience, then you can read individual sections of the Manual in orderto get up to speed about a specific subject.

Can be accessed globally at any time of the day:

Europe / Africa (Nuremberg)Technical SupportLocal time: Mon.-Fri. 7:00 to 17:00Tel.: +49 (0)180 5050-222Fax: +49 (0)9131 98-1603,

+49 (0)911 895-7001 or+49 (0)180 5050-223

E-Mail: [email protected]: +1:00

Europe / Africa (Nuremberg)AuthorizationLocal time: Mon.-Fri. 7:00 to 17:00Tel.: +49 (0)911 895-7200Fax: +49 (0)911 895-7201

E-Mail: [email protected]: +1:00

America (Johnson City)Technical Support andAuthorizationLocal time: Mon.-Fri. 8:00 to 19:00Tel.: +1 (0)770 740-3505

only toll-free from the US:+1 (0)800 241-4453

Fax: +1 (0)770 740-3699E-Mail: [email protected]: -5:00

Asia / Australia (Singapore)Technical Support andAuthorizationLocal time: Mon.-Fri. 8:30 to 17:30Tel.: +65 740-7000

Fax: +65 740-7001E-Mail: [email protected] [email protected]: +8:00

Guide

Automation andDrives, Service &Support

Page 6: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Foreword

vi STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

Page 7: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS viiEdition 03.2003

Contents

Foreword ........................................................................................................................................ iii

1 Basic software ........................................................................................................................1-11.1 Installation and start ..................................................................................................1-21.1.1 System requirements ................................................................................................1-21.1.2 Installing the software ...............................................................................................1-31.1.2.1 Installing from CD-ROM ............................................................................................1-31.1.3 Start ...........................................................................................................................1-4

1.2 User interface ............................................................................................................1-61.2.1 Starting the STEP 7 software....................................................................................1-61.2.2 User interface: Window .............................................................................................1-71.2.3 User interface: Dialog boxes .....................................................................................1-81.2.4 Calling-up the help functions.....................................................................................1-91.2.5 Saving and restoring the window layout .................................................................1-10

1.3 STEP 7 projects and basic handling .......................................................................1-111.3.1 Opening a project example .....................................................................................1-111.3.2 Components to configure the hardware..................................................................1-131.3.3 Components to generate software..........................................................................1-131.3.4 Operator handling philosophy .................................................................................1-141.3.5 Creating and manipulating objects..........................................................................1-151.3.6 Selecting objects in the dialog box..........................................................................1-17

1.4 Creating and handling projects ...............................................................................1-181.4.1 Creating projects .....................................................................................................1-181.4.2 Inserting and configuring stations ...........................................................................1-191.4.3 Programs with and without assigned hardware ......................................................1-201.4.4 Generating software without configured hardware .................................................1-211.4.5 Principle procedure when generating software.......................................................1-221.4.6 Saving projects........................................................................................................1-22

1.5 Configuring and parameterizing modules ...............................................................1-241.5.1 Creating a configuration ..........................................................................................1-241.5.2 General handling.....................................................................................................1-251.5.3 Example ..................................................................................................................1-271.5.4 Arranging modules ..................................................................................................1-271.5.5 Parameterizing modules .........................................................................................1-281.5.6 Linking-in hardware signals to the user program....................................................1-291.5.7 Consistency check, saving and loading ..................................................................1-29

Page 8: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Contents

viii STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.5.8 Working in the configuration table...........................................................................1-301.5.9 Configuring PROFIBUS DP.....................................................................................1-30

1.6 Creating communication connections .....................................................................1-311.6.1 Communications within a station.............................................................................1-311.6.1.1 Communications via $ signals.................................................................................1-311.6.1.2 Communications via virtual connections .................................................................1-331.6.2 Communications with display units .........................................................................1-34

1.7 Loading programs ...................................................................................................1-351.7.1 Online loading..........................................................................................................1-351.7.1.1 Selecting the interface for the online connection ....................................................1-351.7.1.2 Online loading into a CPU.......................................................................................1-361.1.2 Offline loading..........................................................................................................1-371.1.2.1 What you need to know about memory modules and the programming interface .1-371.1.2.2 Selecting the loading interface ................................................................................1-371.1.2.3 Offline loading into a memory module.....................................................................1-38

1.8 Testing programs ....................................................................................................1-391.8.1 Testing programs ....................................................................................................1-39

1.9 Diagnostics ..............................................................................................................1-411.9.1 Diagnostics in the SIMATIC Manager in the offline project view ............................1-421.9.1.1 Transferring diagnostics information .......................................................................1-431.9.1.2 Steps to call-up the module information from the SIMATIC Manager ....................1-441.9.1.3 Evaluating the diagnostics buffer of the diagnostics ...............................................1-441.9.2 Diagnostics in the CFC............................................................................................1-451.9.2.1 Steps to call-up the module status from the CFC ...................................................1-451.9.2.2 Displaying and changing the operating mode.........................................................1-46

1.10 Archiving user programs .........................................................................................1-471.10.1 Archive programs ....................................................................................................1-471.10.2 Archiving projects ....................................................................................................1-481.10.3 De-archiving projects...............................................................................................1-49

1.11 Printing ....................................................................................................................1-501.11.1 Setting-up the printer...............................................................................................1-501.11.2 Starting to print ........................................................................................................1-50

2 CFC 2-12.1 Working with the CFC editor .....................................................................................2-22.1.1 CFC in the STEP 7 environment ...............................................................................2-22.1.1.1 Software requirements ..............................................................................................2-22.1.1.2 Project planning data flow .........................................................................................2-42.1.2 Handling block types .................................................................................................2-52.1.2.1 Importing SIMADYN D block libraries .......................................................................2-52.1.2.2 Inserting block types..................................................................................................2-62.1.2.3 Deleting block libraries ..............................................................................................2-62.1.2.4 Updating SIMADYN D block libraries........................................................................2-72.1.3 Editing block inputs ...................................................................................................2-82.1.3.1 Additional properties of the block I/Os ......................................................................2-82.1.3.2 Inverting inputs ..........................................................................................................2-82.1.3.3 The GLOBAL data type .............................................................................................2-9

Page 9: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Contents

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS ixEdition 03.2003

2.1.4 Block interconnections ..............................................................................................2-92.1.4.1 Interconnecting to global operands...........................................................................2-92.1.4.1.1 $ signals ..................................................................................................................2-102.1.4.1.2 Virtual connections..................................................................................................2-112.1.4.1.3 Virtual connection names........................................................................................2-112.1.4.1.4 OP connections .......................................................................................................2-122.1.4.1.5 Hardware addresses ...............................................................................................2-122.1.4.1.6 Module names.........................................................................................................2-122.1.4.1.7 Name references.....................................................................................................2-132.1.4.1.8 Process interrupts ...................................................................................................2-132.1.5 Run-time properties.................................................................................................2-132.1.5.1 Tasks and run-time groups .....................................................................................2-132.1.5.2 Run-time attributes..................................................................................................2-142.1.6 Operator control and monitoring .............................................................................2-152.1.6.1 Configuring operator control and monitoring attributes...........................................2-162.1.7 Compiling and loading.............................................................................................2-162.1.7.1 Compiling the user program....................................................................................2-172.1.7.2 Loading the user program.......................................................................................2-19

2.2 Brief guide ...............................................................................................................2-222.2.1 The first steps..........................................................................................................2-222.2.2 Creating a project ....................................................................................................2-232.2.3 Starting CFC and inserting blocks ..........................................................................2-252.2.4 Interconnecting blocks ............................................................................................2-272.2.5 Editing blocks ..........................................................................................................2-272.2.6 Compiling and loading into the target system.........................................................2-292.2.7 Monitoring and changing in the test mode ..............................................................2-302.2.8 Generating documentation and closing project ......................................................2-31

2.3 Testing and commissioning.....................................................................................2-332.3.1 Viewing and changing the operating mode.............................................................2-342.3.2 Checking that the configured data and the CPU program match ...........................2-362.3.3 Changing the refresh rate for monitoring ................................................................2-362.3.4 Activating and de-activating the test mode .............................................................2-372.3.5 Module status ..........................................................................................................2-392.3.6 Monitoring block I/O ................................................................................................2-402.3.7 Parameterizing block I/O.........................................................................................2-422.3.8 Creating and deleting interconnections...................................................................2-432.3.9 Inserting and deleting blocks...................................................................................2-442.1.10 Communication interfaces.......................................................................................2-45

2.4 Creating block types................................................................................................2-482.4.1 Creating a user library from charts..........................................................................2-48

2.5 Chart reference data-documentation ......................................................................2-502.5.1 Chart reference data ...............................................................................................2-502.5.1.1 "Cross reference operands" list...............................................................................2-512.5.1.2 "Cross-reference run-time groups" list ....................................................................2-522.5.1.3 "Cross-references block types" list .........................................................................2-52

2.6 Technical data .........................................................................................................2-53

Page 10: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Contents

x STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

2.6.1 Field/name lengths and conventions.......................................................................2-532.1.2 Data types ...............................................................................................................2-54

2.7 Abbreviations...........................................................................................................2-54

3 SFC 3-13.1 Basics of the SFC......................................................................................................3-33.1.1 SFC in the STEP 7 environment [SD] .......................................................................3-33.1.2 SFC and technology hierarchy [SD]..........................................................................3-33.1.3 Setting-up the project structure [SD] .........................................................................3-33.1.4 SFC-Elements ...........................................................................................................3-33.1.4.1 What are chart elements? [SD] .................................................................................3-3

3.2 Tips & Tricks..............................................................................................................3-43.2.1 Generate reference data [SD] ...................................................................................3-43.2.2 Configuring SFC calls [SD]........................................................................................3-4

3.3 Creating Sequential Control Systems (SFC Editor) ..................................................3-63.3.1 Working with Charts ..................................................................................................3-63.3.1.1 Copying charts [SD] ..................................................................................................3-63.3.2 Configuring Sequential Control Systems ..................................................................3-63.3.2.1 Creating a jump [SD] .................................................................................................3-63.3.2.2 Step: Editing addresses [SD] ....................................................................................3-63.3.2.3 Transition: Editing addresses [SD]............................................................................3-83.3.3 Shared Adresses and Permitted Data Types............................................................3-93.3.3.1 Global addresses (operands) [SD]............................................................................3-93.3.3.2 Absolute addressing [SD]..........................................................................................3-93.3.3.3 Symbolic addressing [SD] .........................................................................................3-93.3.3.4 Permissible data types [SD] ......................................................................................3-93.3.4 The Run-Time Properties ........................................................................................3-103.3.4.1 Overview of the run-time properties [SD] ................................................................3-103.3.4.2 Specifying the run sequence [SD]...........................................................................3-103.3.4.3 Installing an SFC chart in a task / deleting from a task [SD]...................................3-103.3.4.4 Run-time attributes for the run-time group and SFC chart [SD]..............................3-113.3.5 Configuruing Messages...........................................................................................3-123.3.5.1 How SFC works with messages [SD]......................................................................3-123.3.6 Compiling Charts.....................................................................................................3-123.3.6.1 Customizing the compiler [SD]................................................................................3-123.3.6.2 Compilation procedure [SD] ....................................................................................3-133.3.6.3 Consistency check [SD] ..........................................................................................3-133.3.7 Downloading User Programs ..................................................................................3-143.3.7.1 Downloading programs [SD] ...................................................................................3-14

3.4 Sequential control systems on the PLC ..................................................................3-163.4.1 Overview of sequential control systems on the PLC [SD].......................................3-163.4.2 How a chart is executed [SD] ..................................................................................3-163.4.3 The operating modes [SD] ......................................................................................3-163.4.4 Chart execution options [SD]...................................................................................3-163.4.5 Behavior of a sequential control system [SD] .........................................................3-173.4.6 The operating states [SD]........................................................................................3-18

Page 11: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Contents

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS xiEdition 03.2003

3.4.7 The commands [SD] ...............................................................................................3-183.4.8 SFC Elements of the PLC .......................................................................................3-193.4.8.1 Phases of a step [SD] .............................................................................................3-193.4.8.2 Processing steps and transitions [SD] ....................................................................3-19

3.5 Using the Control Block...........................................................................................3-203.5.1 The control block [SD].............................................................................................3-203.5.2 Inputs of the control block [SD] ...............................................................................3-203.5.3 Outputs of the control block [SD] ............................................................................3-20

3.6 Documenting Programs ..........................................................................................3-203.6.1 Logs [SD].................................................................................................................3-20

Index...............................................................................................................................................I-1

Page 12: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-1Edition 03.2003

1 Basic software

1.1 Installation and start 1-2

1.2 User interface 1-6

1.3 STEP 7 projects and basic handling 1-11

1.4 Creating and handling projects 1-18

1.5 Configuring and parameterizing modules 1-24

1.6 Creating communication connections 1-31

1.7 Loading programs 1-35

1.8 Testing programs 1-39

1.9 Diagnostics 1-41

1.10 Archiving user programs 1-47

1.11 Printing 1-50

Overview

Page 13: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-2 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.1 Installation and start

This Section will show you how to install the software of the D7-SYSoption package using a setup program. Installation is menu-prompted.Call-up the setup program with the standard procedure, generally usedunder Windows to install software.

1.1.1 System requirements

You require as a minimum, the following platform in order to be able touse this software:

• SIMATIC PG or PC with

− Pentium P133 processor (or higher) and

− RAM memory expansion ≥ 64 MByte (we recommend 128 MByte)

• Color monitor, keyboard and mouse, which are supported byMicrosoft Windows.

− Recommended screen resolution: 1024 x 768 (or higher)

• 160 MByte free memory space on the hard disk, on which the STEP 7basis software was installed (in addition to the memory spacerequirement for STEP 7 basis software and CFC).

• Minimum 1 MB free memory on drive C for setup (setup files aredeleted after installation has been completed).

• Hard disk memory size for the Windows swap file (at least 256 Mbytesminus the size of your PC´s RAM).

• Free memory space on the hard disk for your project data.

• For offline loading of the compiled programs in the memory modulesfor CPUs (optional):

− Plug-in PC card (PCMCIA).In many notebooks and SIMATIC PGs this is already permanentlyinstalled. Appropriate boards can be retrofitted in desktop- or towerPCs (refer to the ”Readme” file)or

− External OmniDrive Professional device (refer to the “readme file”)or

− Device to program Micro Memory Cards (MMC); appropriate slot inSIMATIC PGs (e.g. Field PG) or an external USB prommer (referto the “readme file”).

• For online loading in CPUs and for testing (optional):

− An MPI interface between SIMATIC PG or PC and the station, i. e.either a PC/MPI cable or an MPI module, which is installed in yourunit. This MPI interface is already integrated in several Siemensprogrammers.

Overview

Hardware platform

Page 14: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-3Edition 03.2003

You will require the following software:

• Operating system, Windows 95/98/ME, WindowsNT4.0,Windows 2000 Professional or Windows XP Professional

• Basic STEP 7 software, Version 5.2

• CFC option package, Version 6.0

• Possibly option package SFC, Version 6.0

1.1.2 Installing the software

The supplied software includes a setup program, which automaticallyinstalls the software. You are prompted on the screen at each individualinstallation step.

Before installing D7-SYS, ensure that Windows and STEP 7 and CFC arealready installed.

If required, install these products in the following sequence:

1. Windows

2. Basic STEP 7 software

3. CFC option package

A detailed description for installing and de-installing STEP 7 and CFC isprovided in the product information which is supplied with the softwareproducts.

NOTE It is not possible to install several versions of STEP 7 and its optionpackages in parallel.

1.1.2.1 Installing from CD-ROM

When installing from a CD-ROM, proceed as follows:

1. Insert the CD-ROM in your PC.

2. Start the "Setup" program of the CD-ROM.

3. The setup program then prompts you at all of the other steps .

Please observe the information and instructions in the "Readme" filewhich is opened when installation is beginning.

Software platform

Overview

Prerequisites

Installing/de-installing STEP7-and CFC software

Readme

Page 15: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-4 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

The D7-SYS option package does not require any additionalauthorization.

If you no longer require the D7-SYS software product, or you wish toinstall a new version, then you can de-install it from your PC.

1. To de-install, call-up the application start > settings > Control Panel> software from the start menu of Windows 95/NT.

2. Select "SIMATIC D7-SYS" from the list of installed products.

3. Click on the button "Add/remove", in order to de-install D7-SYS.

1.1.3 Start

After you have installed D7-SYS, you can use the following STEP 7 tools:

• SIMATIC Manager

• HWConfig

• CFC

• SFC (if the option package is installed)

• DOCPRO (if the option package is installed)

After Windows has been started, you will see a symbol for the SIMATICManager on the Windows screen, the entry into the STEP 7 software.

Open the SIMATIC Manager window by double-clicking on the icon. Youcan set-up new projects and process existing projects in the SIMATICManager.

The most important information for handling the SIMATIC Manager isprovided in the online help, which you can call-up via the "Help" menu.Please refer to the of this online help for the most important informationwhich you require when configuring with D7-SYS.

Authorization

De-installation

Overview

SIMATIC Manager

Page 16: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-5Edition 03.2003

The most important STEP 7 applications (among others, the SIMATICManager and the CFC editor) can be directly accessed via the Windowsstart menu in the program group Simatic > (STEP 7).

You will find the most important information on the SIMATIC Manager,HWConfig and CFC in the online help functions of these applications.The help function is accessible via the Help menu or via the F1 key,which is then context-sensitive.

When installation has been completed you will find the userdocumentation in German and English about the start menu of Windows(Start > SIMATIC > Documentation).

You can also separately order user documentation on CD-ROM.

Start menu

Userdocumentation

Page 17: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-6 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.2 User interface

The software to configure and program is configured according to state-of-the-art principles and is therefore essentially self-explanatory.

If you do not have any experience with these types of user interfaces,then the following Section will provide you with information concerningthe most important control elements and the terminology used.

All users with Windows knowhow should get to know starting STEP 7 inthe "Starting STEP 7 software" Section. You don’t have to read the otherSections of this chapter.

1.2.1 Starting the STEP 7 software

After starting Windows, you will find an icon for the SIMATIC Manager onthe Windows screen - which is the entry into the STEP 7 software.

STEP 7 is started the quickest by double-clicking on the "SIMATICManager" icon. The SIMATIC Manager window then opens. From here,you can call-up all of the functions which you installed both in the basissystem as well as the software options.

Alternatively, you can also start the SIMATIC Manager via the "Start"button on the task bar in Windows: You will find the entry under"Simatic").

The SIMATIC Manager is the interface to configure and program with D7-SYS. With it you can:

• set-up projects

• configure and parameterize hardware

• configure hardware networks

• configure CFC charts

SIMATIC Manager is object-oriented, intuitive and can be easily learnt.

You generate automation solutions in the form of "Projects". Beforestarting, get to know the following basic issues:

• the user interface,

• online help,

• several basic handling functions.

Overview

Starting

SIMATIC Manager

Proceeding

Page 18: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-7Edition 03.2003

1.2.2 User interface: Window

The standard components of a window are the title bar and the menu bar

Title barMenu bar

Status line

Function bar

System menu(full display/close etc.)

Active windowtitle

Active fields foricon full display close

Depress F1 in order to obtain Help

SIMATIC Manager

Work area:Contains information which you

can display or process

File View PLC Options Window Help

Fig. 1-1 Window components

The title bar and menu bar are always located at the top edge of thewindow. The title bar contains the window title and the symbols for thewindow control. The menu bar includes all of the menus, which areavailable in the window.

The tool bar contains all of the icons which allow you to quickly access, atthe click of the mouse, frequently used and currently available menucommands. A brief info about the function of a symbol is displayed if youbriefly position the cursor on the icon. An additional explanation isdisplayed in the status line.

If no access is possible in the current configuration, then the icons aregrey.

Context-sensitive information is displayed in the status line.

Overview

Title bar and menubar

Tool bar

Status line

Page 19: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-8 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.2.3 User interface: Dialog boxes

You can enter data in the dialog boxes, which is required to execute aspecific task. The most frequently used components of the dialog boxesare now explained using an example in Fig. 1-2:

Text fieldsto enter text viathe keyboard

Round option fieldsto select one orseveral items

Active fields

Square option fieldsto select oneor several items

Search/replace

CancelSearch HelpReplace Replace all

Search for:A1.0

Replace by:A2.0

Only complete word/complete lineObserve upper/lower case

Search range

from the cursor position upwardsfrom the cursor position downwardscompleteonly marked areas

Only search in

0.all1.components2.components3.components4.components5.components

Search in columnall

Fig. 1-2 Example of a dialog box

If text fields have an arrow pointing downwards, then additional items canbe selected for this particular field. Click on the arrow to display a list- orcombination field. If you then click on an entry in the list- or combinationfield, it is automatically transferred into the text field.

The contents of some dialog boxes is organized in sections to enhancethe transparency. The names of the individual sections are located at theupper edge of the dialog box. In order to retrieve a specific section,simple click on the section name.

Registernames

Module status

Path: test01\program (online)

Diagnos. bufferGeneral Memory Cycle time Stacks CommunicationPerform. dataTime syst.

No. Time Date Event1 09:15:22:842 11.12.95 Power on, buffered2 18:00:22:378 08.12.95 STOP due to power failure

Events:

Module operating mode:CPU operating mode: STOP

Status:

Fig. 1-3 Example of a dialog box under a tab

Entries in thedialog boxes

List fields /combination fields

Register dialogs

Page 20: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-9Edition 03.2003

1.2.4 Calling-up the help functions

The online help provides information precisely at the location you requireit. You can quickly retrieve specific information without having to searchin Manuals. You find the following in the online help:

• Help subjects: Provides various access to help information displays

• Help to the context (F1 key): Displays information on the markedobject or for the active dialog box or window.

• Introduction: Provides a brief overview about the application,essential features and functional scope of an application.

• First steps: Combines the first operator interventions which you mustmake so that you move forwards quickly.

• Using help: Offers a description of the possibilities which you have atyour disposal to find specific information in help.

• Info: Provides information regarding the current version of theapplication.

• Using the Help menu, from any window, you can call-up subjectswhich refer to the current dialog situation.

You can call-up online help in several ways:

• Select a menu command from the help menu in the menu bar.

• Click on the "Help" button in a dialog box. You will then receive helpinformation regarding this dialog box.

• Position the mouse pointer in a window or dialog box on the subjectfor which you require help; then depress key F1 or select the menucommand Help > Help to context.

• Simultaneously press the toggle key and key F1. The mouse pointerchanges into a ?. Click on the element of the window or dialog boxwhere you require specific help.

The three last types are known as context-sensitive help.

A brief help info is displayed for the buttons in the tool bar if you positionthe cursor at an button and keep it briefly there.

Using the menu command Options > Format size in the help window,you can change the format size to "small", "normal" or "large".

Online help

Calling-up onlinehelp

Calling-up shorthelp

Changing theformat size

Page 21: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-10 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.2.5 Saving and restoring the window layout

The STEP 7 applications allow you to save the current window layout andrestoring it at a later time.

If you save the window layout, the following information is recorded:

• position of the main window

• opened projects and the associated window positions

• sequence of windows which may be nested

To save the current window layout, select the menu command Window >Save setting.

In order to restore a saved window layout, select the menu commandWindow > Restore setting.

When restoring a window, only that part of the hierarchy is displayed indetail, in which the object lies which was selected when saving thewindow layout.

Overview

What is saved?

Save windowlayout

Restore windowlayout

Informationregarding theobject hierarchy

Page 22: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-11Edition 03.2003

1.3 STEP 7 projects and basic handling

Projects represent all of the data and programs associated with anautomation solution. They are used to save all of the data and programsassociated with the automation solution in an orderly fashion. The dataassociated with a project, include

• configuring data regarding the hardware structure and parameterizingdata of the modules.

• programs for programmable modules.

The main tasks when creating a project thus involve preparing this dataand creating the programs.STEP 7 does not specify a fixed processing sequence. You can start withany partial task.

The first part of this Chapter describes, use an example, the essentialproject components.

You can display the properties of most of the objects using the menucommand Edit > Object Properties. This gives you an impression of theinformation which is assigned to the object.

Basic handling of objects associated with a project are described in thesecond part of this Chapter, for example, opening, copying and re-naming.

The systematic procedure when setting-up your own project is describedin the Chapter "Setting-up and processing projects".

1.3.1 Opening a project example

To select and open a project included in the scope of supply, pleaseenter the menu command File > Open > user projects or projectexamples.... Then select a project. The project window is then opened.

The project window is sub-divided into two sections. The project structureis displayed in the lefthand half. The contents of the objects, marked inthe lefthand side are displayed in the righthand side.

To display the complete project structure, click on the box with a plussymbol in the lefthand section of the window. You will then obtain ascreen similar to the following:

Overview

Information whenreading

Opening theproject, displayingthe contents

Project window

Page 23: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-12 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

Fig. 1-4 Project window

Several objects in the real world have specific interrelationships with oneanother. These interrelationships from the real world are illustrated whendisplaying the components of a project in the project window using alogical hierarchy.

In Fig. Project window, at the top of the object hierarchy, the"FIBEL_BSP" object is displayed as symbol for the complete project. Itcan be used to display the project properties and is used as container fornetworks (to configure networks), stations (to configure the hardware) aswell as for programs (to generate software). The objects contained in itare displayed to the right in the project window if you highlight the projecticon. The objects at the top of the hierarchy (this also include, in additionto projects, also SIMATIC libraries) allow you to go into the dialog boxesto select objects.

Object_hierarchy

Page 24: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-13Edition 03.2003

1.3.2 Components to configure the hardware

Icons of specific components:

SIMATIC TDC/SYMADYN DMPI network

Fig. 1-5 Specific components to configure the hardware

The symbol for the MPI network represents the central communicationsbus which fulfills the following functions:

• The CPUs of all stations of a project are loaded and arecommissioned with the test functions of the CFC.

• Communications between stations and display units.

The symbol for a station represents the hardware structure of a station. Ifyou highlight a station in the lefthand section of the project window, youwill see the objects it contains in the righthand section of the projectwindow:

• Newly inserted stations only contain the "Hardware" object, which youcan use to start the tool to configure the hardware.

• In already configured stations, the programmable modules (CPUs)are also displayed, which were inserted when configuring the station.

In Fig. Project window, the configured SIMATIC TDC station is shown asan example; this involves a hardware structure (subrack with slots) whichcontains a CPU, designated "D01_P1".

By double clicking on the "Hardware" object in a station, you can start thetool to configure the hardware. This procedure is described in detail in theChapter "Configuring and parameterizing modules".

1.3.3 Components to generate software

The programs are containers for the software of a CPU and serve asstarting point when generating software.

A program contains a "Charts" container. As many CFC/SFC charts asrequired are stored in this container. The CPU program is generatedusing these. A CFC chart is represented on 26 sub-charts - each with sixpages.

Icons

MPI-network

Station

Hardware

Programs

Contents of aprogram

Page 25: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-14 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

Fig. 1-6 Possible components in a program

You were able to get to know the essential objects of a project up to thissection of the Chapter. The next section provides you with informationabout some of the basic activities and handling in conjunction withobjects.

1.3.4 Operator handling philosophy

The graphic user interface is intended to make all operator actions self-explanatory. Thus, you will see objects which you know from your dailywork, e. g. stations, modules, programs.

The actions, which you execute when working with STEP 7, include thegeneration, selection and manipulation of objects such as these.

With conventional tool-oriented handling, you first have to consider whichtool was required to solve a specific task, and then you had to call-up thistool.

The basic procedure for object-oriented handling is to consider whichobject is to be edited, and then to open and edit this object.

For object-oriented handling, it is no longer necessary to know a specialcommand syntax. Objects are represented on the screen using graphicsymbols, which can be opened using menu commands or the mouse.

When opening an object, the suitable software components areautomatically called which are then used to display or process thecontents of the object.

The basic actions when processing objects are now described in thefollowing. Please get to know these, as they are often used.

Read further ...

Goal: Simplehandling

Difference to tool-oriented handling

Read further ...

Page 26: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-15Edition 03.2003

1.3.5 Creating and manipulating objects

The usual object handling involves:

• creating an object,

• selecting an object,

• executing actions with the object (e. g. copying, deleting).

Before first setting-up a new project, you should set the save path forthese objects. To realize this, select the menu command Options >Settings. You can then specify a path name under the tab " General " ofthe dialog box which is displayed, under which the newly-generatedprojects can be saved. C:\Siemens\STEP7\S7proj. is the default path.

You can generate new projects using the menu command File > New >Project. Projects form the top of an object hierarchy tree. All additionalobjects of the hierarchy, if they are not automatically set-up, can begenerated via commands in the Insert menu. The modules of a stationare the exception, which are only set-up when configuring the hardware.

There are several ways of opening an already generated object:

• click twice on the object symbol

• select the object and menu command Edit > Open object

After an object has been opened, you can generate or change itscontents. In this case, a differentiation must be made between

• containers, i. e. objects, which can themselves contain sub-objects(for example, a "Directory" object in Windows Explorer, which in turncan contain sub-directories and files), and

• objects which do not contain any sub-objects, (for example, a "File"object in Windows Explorer).

If you open an object associated with the latter type, its contents aredisplayed in a new window for editing using a suitable softwarecomponent.

Objects, whose contents are being used elsewhere, cannot be changed.

After a container has been opened, the objects already contained in thecontainer are displayed on the screen. You can now set-up additionalsub-objects using the Insert menu, for example, other stations in aproject. Only the commands to insert such objects can be called-up inthis menu, which are permissible in the current container.

Overview

Setting-up the savepath for newprojects

Create objects

Opening objects

Create an objecthierarchy

Page 27: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-16 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

Object properties are object data, which define the objects behavior. Thedialog box to set the object properties is displayed automatically if yougenerate an object for the first time, and you must define its properties.However, the properties can be subsequently changed:

A dialog box is called-up with the menu command Edit > Objectproperties, in which the properties of the selected object can be read orset.

You can cut-out, copy, insert or delete most of the objects just the sameas under Windows. The associated menu commands are provided in theEdit menu.

You can also shift or copy objects using drag & drop. The cursor isdisplayed as a prohibit symbol if you point to an illegal destination/target.

If you copy an object, the complete hierarchy below it is also copied. Thisallows parts of an automation solution to be re-used.

First open the object to display the contents. The print command islocated in the first window menu (e. g. in the "File" menu). The commanddisplays a dialog box where you can set the printer, printer range and thenumber of copies to be printed.

For several dialog boxes, it is possible to print-out part of its contents.These dialog boxes contain a "Print" button. Press the button to startprinting.

You can directly edit or change object names which can be changed viathe object properties.

• Direct editing:If you slowly click twice on the name of a marked object, a boxappears around the text. You can now change the name from yourkeyboard.

• Changing the name via the object properties:Select the required object, and then enter the menu command Edit >Object properties. Change the name in the dialog box. After closingthe properties dialog box, the object is re-named, and displayed withthe new name.

If it is not permissible to change the name of an object, the input field inthe dialog box has a grey background, the actual name is displayed, andit is not possible to enter text.

Setting objectproperties

Cutting-out,copying, inserting

Printing

Re-naming objects

Page 28: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-17Edition 03.2003

1.3.6 Selecting objects in the dialog box

Selecting objects in a dialog box is something which is done in variousoperating steps.

The dialog box is called-up, for example, in the hardware configuration,using the menu commands such as Station > New.../Open... (the"SIMATIC Manager" entry window is an exception).

The following can be selected, illustrated in the "Dialog box to selectobjects" display:

Open

CancelOK Help

Entry:Project

View:Components view

ProjectSearch...

Name:muster

MPI network 1

SIMADYN D program (1)

SIMADYN D station (1)Example

Object name:

Object type: Process all

Online Offline

The hierarchy treeof the object isdisplayed here, whichcan contain sub-objects. The contents of the object

marked on the left aredisplayed here.

Name: The objects of the typespecified under entry isdisplayed here in a list box.You can select a name fromthe list or enter directlyfrom the keyboard.

Entry point: Select the object typehere in which you wish to startthe search. (e. g. “Project“,“Library", but also entries,which permit access todrives or connectedautomation systems).

Object type: You can specify a filtercriteria here for the object list.This allows the number of displayedobjects to be restricted.

Search: Click on thisbutton to search forobjects which are notincluded in the list.

Object name: If you select an object,the object name is entered here.You can also directly enter therequired name.

Online/offline:For SIMATIC TDC/SIMADYN D,only the offline view is possible(project data on the PG/ PC).

Fig. 1-7 Dialog box to select objects

Overview

Calling-up thedialog box

Dialog boxstructure

Page 29: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-18 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.4 Creating and handling projects

This Chapter describes how you create projects and set-up the projectstructure step-by-step.

1.4.1 Creating projects

You can simplify creating a new project by adapting the example includedin the scope of supply (project example) to your particular requirements.

Proceed as follows:

1. Open the project example (refer to STEP 7 projects and basichandling)

2. Save the project example under another name(menu command, File > Save under ... ).

3. Now close the project example; open the copy.

4. Change the name of the sub-objects in this copy so that you canidentify the names.

5. Open the objects in the copy and modify the contents.

This is an extremely easy way to create a project structure.

If the project example is not suitable for you as the starting point, thenyou can create a new project in the SIMATIC Manager by entering themenu command File > New > Project.... Now open the project so thatyou can create the project structure (project hierarchy).

When selecting the processing sequence of a project, you have a highlevel of flexibility. After you have created a project, for example you can

• first configure the hardware (stations) and then generate the softwarefor it (CFC charts), or

• you can start to generate the software independently of a configuredhardware.

If you first wish to configure the hardware, proceed as described inChapter "Creating and handling projects" > "Inserting and configuringstations". After configuring, the programs and chart containers which arerequired to generate the software are already inserted. You can thengenerate the software for the programmable modules.

You can generate the software without first configuring the hardwarewhich can then be realized later. The hardware structure of a particularstation does not have to be defined before entering programs.

Proceed as follows:

Overview

Project example

New project

Alternativeprocedure

Alternative 1: Firstconfiguring thehardware

Alternative 2:First generating thesoftware

Page 30: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-19Edition 03.2003

1. Enter the required software container (programs) into your project(refer to the Chapter "Creating and handling projects" > "Programswith and without assigned hardware").

2. Then generate the CFC charts in the chart containers of theprograms.

3. Now configure your hardware.

4. Now allocate the program to a CPU after you have configured thehardware.

NOTE You can call-up a dialog box using the menu command Options >Settings. Under the "General" tab, you can select, among other things,that when a project is opened, an archive of this project is generated asback-up copy. In this case, select the entry "Archiving automaticallywhen opening project/library" (archiving is described in Chapter"Archiving user programs").

1.4.2 Inserting and configuring stations

In a project, the stations represent the hardware structure and theassociated data to configure and parameterize individual modules.

In order to create a new station in a project, open the project so that theproject window is displayed (if this already hasn’t been done).

1. Select the object.

2. Generate the object for the required hardware using the menucommand Insert > Station.

The following items are displayed in the menu:

• SIMATIC TDC/SIMADYN D station

• SIMATIC 300 station

• SIMATIC 400 station

• SIMATIC H-Station

• SIMATIC PC-Station

• PC/PG

• SIMATIC S5

• Other stations, i. e. not SIMATIC S7/M7, SIMATIC S5

3. Select the station

4. In the project window, click on the "+" in front of the project icon if it isstill not displayed below the station.

Overview

Inserting a station

Page 31: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-20 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

Proceed as follows:

1. Open the station. It contains the "Hardware" object.

2. Open the "Hardware" object. The "HWConfig" window is displayed. Inthis window, you can define the hardware structure, and especially theslot assignment.

3. Define the station structure in the "HWConfig" window. A modulecatalog is available which you can display using the menu commandView > Catalog if it hasn’t already been displayed. First select a rackfrom the module catalog. You can then select the modules which youwish to insert in the rack slots. It is important to note that you mustconfigure at least one CPU.

Further information on configuring is provided in the Chapter "Configuringand parameterizing the hardware" of this Manual.

A program is automatically created as software container for each CPUwhich you created when configuring.

If this object is still not visible in the project window, click on the "+" infront of the station symbol in the project window to display the module,and in the box in front of the CPU to display the program.

Now generate the software. The basic procedure is explained in theChapter "Principle procedure when generating software".

If you wish to use software which was generated independently of yourparticular configuration, then first read the Chapter " programs with andwithout assigned hardware" and "Software generation without configuredhardware".

1.4.3 Programs with and without assigned hardware

The " program" object is used as container for the software ofprogrammable modules from the SIMATIC TDC/SIMADYN D spectrumand the FM 458-1 DP..

Project

D7-SYS programm (no hardware assigned)

SIMADYN D station

SIMADYN D CPU

D7-SYS pogramm (assigned)

Fig. 1-8 Assigned and non-assigned program in the project window

Configuring

Configuring result

Continue withsoftwaregeneration

Overview

Page 32: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-21Edition 03.2003

You can use the programs which were automatically created for pre-configured (assigned programs). Click on the "+" in front of the CPU iconin the project window if this was still not displayed below the program.

You can create programs yourself independently of any special hardwareconfiguration (non-assigned programs). After the hardware has beenconfigured, you can, at a later date, assign a CPU.

1.4.4 Generating software without configured hardware

The project must have been created and the project window opened.

1. Select the project symbol in the project window.

2. Call-up the menu commandInsert > Program > D7-SYS Program

The program is created below the project, i. e. it is not assigned to anyspecial hardware.

You can now generate software in this container, and assign it to a CPU,as subsequently described.

Proceed as follows:

1. Highlight the project icon or click on the plus symbol in front of theproject icon so that the assigned program is visible in the projectwindow if this isn’t already the case.

2. Cut-out the non-assigned program or copy it (menu command Edit >Cut-out or Edit > Copy).

3. Then highlight the CPU which you wish to assign to the program, andinsert it (menu command Edit > Insert).

If there is already a program located there, then it is overwritten after amessage is acknowledged. Alternatively, you can highlight the non-assigned program, and transfer it to the programmable module.

If you erase a CPU, but you still wish to keep the associated program inthe project, then before erasing the module, shift it directly under theproject icon. It then remains there in the project without being assigned toa module. You can assign it as required at a later time.

If you erase a station, whose CPUs are assigned to a program, a dialogbox is displayed. You can now decide as to whether the program shouldalso be erased (deleted), or whether it should be saved in the project(without assigned hardware).

Program withassigned hardware

Program withoutassigned hardware

Inserting theprogramindependently ofthe hardware

Assigning aprogram to a CPU

Buffering programsin the project

Page 33: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-22 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.4.5 Principle procedure when generating software

NOTE Using the menu command Insert > Program > D7-SYS program, youcan create a program directly under the project without having to firstconfigure the hardware. You can later assign the program to a CPU.

Generate the software as follows:

1. Open the program.

2. Open the "Charts" container contained in it.

3. Insert a CFC chart. The menu command is as follows:− Insert > S7 software > CFC

4. Open the chart, insert the blocks in this, interconnect andparameterize these.Information on this procedure is provided in the Manual: "STEP 7,Optionspakete für D7-SYS, Section CFC" as well as online help forCFC.

To document a STEP 7 project, you can arrange all configured data,which was generated using STEP 7, in circuit manuals (menu commandInsert > Project documentation).This function is only available if the DOCPRO option package is installed.

1.4.6 Saving projects

To save a project, you can save a copy of the project under a differentname, or archive the project.

Proceed as follows:

1. Open the project.

2. Select the menu command File > Save under. The "Save projectunder" dialog box is then displayed.

3. At " Path " select the directory in which the project is to be saved.

4. In the "Name" box enter a file name.

5. Close the dialog box with "OK".

NOTE It must be guaranteed that there is sufficient memory space stillavailable on the selected drive. For instance, it is not practical to selecta floppy disk drive to archive a project. To save projects on floppydisks, you must archive these. Archives can be distributed over severalfloppy disks.

Individual projects can be saved in an archive file in a "zipped" form. It ispossible to save "zipped" files on the hard disk or on other portable datamediums (floppy disks).

Procedure

Generating thedocumentation

Overview

Saving under ...

Archiving

Page 34: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-23Edition 03.2003

In order to access components of an archived project, the project mustfirst be de-archived. Archiving is described in detail in the Chapter"Archiving user programs".

You can set the system, so that when a project is opened, an archive ofthis project is generated as back-up copy. Proceed as follows:

1. In the SIMATIC Manager, select the menu commandOptions > Settings. A register dialog is now displayed.

2. Select the "General" tab.

3. Mark the "Archiving automatically when opening project/library" entry.

4. Close the dialog box with "OK".

Automaticarchiving

Page 35: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-24 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.5 Configuring and parameterizing modules

When configuring with STEP 7, you define which modules you will use foryour system, independent of whether they actually exist for yourparticular system or not.

You can copy the configuration as often as you like in other STEP 7projects, and if required modify them. When a station runs-up, the CPUscompare the reference configuration, generated using STEP 7, with theactual configuration of the system. If errors or problems are present, theyare immediately identified and signaled.

When parameterizing, you set the characteristics of the modules. You donot have to actuate a switch on the module, but just simply enter theparameter using STEP 7. The parameters are loaded into the CPU, andtransferred from the CPU to the appropriate modules.

Modules can be very simply replaced, as the parameters, generatedusing STEP 7, are automatically loaded in the new module at run-up.

1.5.1 Creating a configuration

The following provides you with an overview how you configure thestructure of a station, and how to parameterize the modules within thisstructure.

"Configuring" involves locating racks and modules in a station window.Racks are represented using a configuration table, which permits a fixednumber of plug-in modules just like the "real" racks.

"Parameterization" is the following:

Setting parameters for modules which can be parameterized, e. g. a CPUis a module which can be parameterized. The base sampling time is aparameter which you can set.

Proceed as follows when configuring and parameterizing a systemstructure:

Overview

Introduction

Configuring

Parameterization

Procedure

Page 36: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-25Edition 03.2003

Select the rack

Select the modules

Check the consistency of the configuration

Parameterize the modules

Save the configuration

Fig. 1-9 Procedure when configuring and parameterizing

Before you enter a new configuration, you must:

• create a project,

• generated in the project the object to be configured, i. e. a station, and

• you must have selected this station.

The procedure is described in the Chapter "Creating projects".

To call-up the application to configure a station, proceed as follows:

1. Select the "station" object in the project window.

2. Select the menu command Edit > Open Object.The HWConfig user interface is displayed on the screen to configurethe hardware.

As an alternative to steps 1. and 2. you can also click twice on the"Hardware" object in the station.

1.5.2 General handling

You have two dialog windows available to configure an automationsystem.

• With the station window, in which you locate the rack for the stationconfiguration.

• With the "Hardware Catalog" window, from which you can select thenecessary hardware components, e. g. racks, modules and sub-modules.

Before entering anewconfiguration...

Calling-up theapplication

Main componentsof the userinterface

Page 37: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-26 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

• If the "Hardware Catalog" window is not displayed, select the menucommand View > Catalog. You can now display or cancel theHardware Catalog using this menu command.

Independent of a particular station structure, you always configure in thefollowing steps:

1. To open the sub-directory, click on the "+" symbol in the directorylisting of the Hardware Catalog.

2. Mark a hardware component in the "Hardware Catalog" window.

3. Place the selected hardware component in the station window usingdrag & drop.

The "Arrange rack" display shows the essential handling:

Fig. 1-10 Rack layout

General handling

This is how it’sdone

Page 38: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-27Edition 03.2003

As for Windows applications, you can implement the overall configurationin STEP 7 per drag & drop. This example will show you what you must beaware of.

1.5.3 Example

Exactly as you would in your real system, locate the modules in the racksusing STEP 7. The difference: In STEP 7, racks are represented using"Configuration tables", which have as many lines as the number ofmodules which can be inserted in the real racks.

An example for converting a real structure into the configuration table isshown in an example in the following Fig. 1-11.

Configuration table(normal view)

SR12.11

1.1

34

4.156

6.16.26.3

PM5MS5

EB11PM6MS5IT41CS7SS52-MPI

2 MM3

Slot 1 2 3 4 5 6

Structure of a SIMADYN D station

Fig. 1-11 From a structure to a configuration table

1.5.4 Arranging modules

Prerequisite: The station window and "Hardware catalog" window areopen. Proceed as follows:

1. Select the right rack for your particular structure from the sub-directory"racks" in the "Hardware catalog" window.

2. Locate the rack in the station window using drag & drop.

As an alternative to steps 1. and 2., you can also click twice on the rackin the "Hardware catalog" window.

Summary

Procedure

Converting into aconfiguration table

Select and arrangeracks

Page 39: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-28 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

Proceed as follows to locate modules in the racks:

1. Select a module from the "Hardware catalog" window.

2. Place the module into the appropriate rack tier per drag & drop.

As an alternative to steps 1. and 2., you can also mark an empty tier, andthen double click on the module in the "Hardware catalog" window ormark a module and hit the ENTER KEY ↵.

1.5.5 Parameterizing modules

You can set the characteristics of modules which can be parameterized.The module type defines which parameters can be set.

Before you parameterize a module, you must first place the module in therack.

To parameterize a module, proceed as follows:

Double-click on the rack tier with the module, whose parameters you wishto set, or mark the associated module and select the menu commandEdit > Object Properties.A dialog box is displayed with one or several registers with informationand parameters which can be set for the particular module.

You assign module hardware addresses as follows:

1. In the configuration table, click on a module, which has process signalI/O, e. g. a CPU-, I/O- or extension module.

2. Select the menu command Edit > Object Properties and select the"Addresses" tab in the dialog box "Properties".

3. Enter a name for each module connector in the "Symbol" field andacknowledge with "OK". You can change the symbols about thecontrol button To "preset" also with unambiguous names preset.

NOTE Assign unique names within any one station.

You can obtain help information for an active tab if you press F1 withthe "Properties" dialog box open.

Select and arrangemodules

Parameterizing

Prerequisite

Parameterizingmodules

AllocatingI/O addresses

Page 40: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-29Edition 03.2003

1.5.6 Linking-in hardware signals to the user program

Prior to this, you must have assigned I/O addresses (hardwareaddresses) to the module in HWConfig.

Link-in the hardware signals to the user program in the CFC as follows:

1. In the CFC, configure an appropriate I/O block to address thehardware signals of a connector.

2. Select the "AD" input (hardware address) of this block, and select themenu command Insert > Connect to operand. A dialog box opens toenter the hardware address.

3. Select the connector name, defined in HWConfig, in the "Hardwareaddress" list field and acknowledge with "OK".

1.5.7 Consistency check, saving and loading

In this Section you will get to know how to check and save a generatedconfiguration for consistency. However a prerequisite is that the station isparameterized and configured.

To save the configuration use the following menu commandStation > Save or Station > Save and compile.

For Station > Save and compile, the configuration is checked forconsistency, and saved in the current project (as station object).

A consistency check is not made for Station > Save.

NOTE CPU charts for this particular station can only be compiled in the CFC,if the saved hardware configuration has been checked for consistency.

In CFC, the hardware configuration is, together with the compiled userprogram, automatically loaded in the CPUs of the station.

You check the consistency using the menu command Station > Checkconsistency.

• If the configuration is error-free, acknowledge the message "No error"with "OK".

• If the configuration is not error-free, a message appears with a list oferrors. Hit the F1 key to obtain help for the "Check consistency" dialogbox.

Prerequisite

Procedure in CFC

Introduction

Configuration save,

Configuration load

Consistency check

Page 41: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-30 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.5.8 Working in the configuration table

We will now provide you with several tips to simplify working withHWConfig.

If you wish to mark several lines in the configuration table, for example, todelete several modules or insert several modules of the same type, thenproceed as follows:

• Select all lines:

− select the menu command Edit > Select All

• Select associated ranges:

− click on the first line of the range to be marked

− keep the changeover key depressed and click on the last line ofthe range to be marked.

• Selecting several lines:

− depress the CNTRL key, keep it depressed and then click on all ofthe lines which you wish to select

You can shift modules or other components simply per drag & drop toanother legal slot within the station.

1.5.9 Configuring PROFIBUS DP

The communications module can be used both as master as well asslave in a PROFIBUS DP sub-network.

The configuration as slave in a network with an S7 module as master isdescribed in the Chapter "Configure the distributed periphery " of theManual "Configuring Hardware and Communication ConnectionsSTEP7".

SS52 is included in the module catalog of HWConfig under "PROFIBUSDP - SIMADYN".

The PROFIBUS master is configured using the COM PROFIBUS tool ofthe SIMATIC S5 product family.

An FM 458-1 DP is configured as PROFIBUS Master in HW Config asdescribed in the Section “Configuring the distributed I/O“ of the Manual“SIMATIC Software, basis software for S7 and M7 STEP7“.

You will find further information in the Instruction Manual of COMPROFIBUS as well as in the Manual "System- and communicationconfiguring D7-SYS".

Introduction

Mark several lines

Shifting modules

Introduction

Configuration asslave

Configuring asmaster

Further information...

Page 42: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-31Edition 03.2003

1.6 Creating communication connections

If you require several CPUs for your automation solution, or it isnecessary to couple the display units, then you must ensure that thecomponents involved can communicate with one another.

Differentiation can be made between two communication types:

1. Communications within a station

2. Communication connections with display units

NOTE Communications between CPUs are exclusively created in CFC.

1.6.1 Communications within a station

There are two ways to implement data transfer between CPUs:

Communications via Properties$ signals: • are adequate for many

applications• are simple to configure.

Virtual connections: • for more complex communicationassociations between transmittersand receivers

• takes longer to configure.

Table 1-4 Communications within a station

1.6.1.1 Communications via $ signals

$ signals permit efficient communications between a transmitter andseveral receivers.

Prerequisites for communications via $ signals:

• Transmitter and receiver are located on different CPUs within thesame station.

• A communications buffer module is used for communications betweenthe CPUs and is inserted in the subrack.

Overview

Overview

Purpose of the$ signals

Prerequisites forcommunicationsvia $ signals

Page 43: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-32 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

There are two types of $ signals:

Type PropertiesStandard Ensures data consistencyFast Data transfer with the shortest possible deadtimes

Table 1-5 Types of $ signals

NOTE In order to equalize the load levels due to $ signals of the twobackplane busses (for SIMADYN D), you can distribute the $ signalsbetween the L bus and C bus.

1. In the SIMATIC Manager, double-click on the CFC charts whichinclude the block I/O for the communication connections.

2. In the CFC application window, select the block output, from which the$ signal is to be taken.

3. Select the menu command Insert > Connection to operand.

4. Select the required "bus" and "type" options.

5. Enter a unique name of up to 14 characters in the "Name" field.Acknowledge with "OK".

6. Select the block input as destination for the $ signal.

7. Select the menu command Insert > Connect to operand.

8. In the "Name" field, enter the $ signal, assigned at the block output.Acknowledge with "OK".

NOTE • You can connect the $ signal with other block inputs. Proceed aspreviously described under steps 6, 7 and 8.

• At step 8 in the "Name" list field, you will be provided with aselection of already configured $ signals.

• You can obtain additional help info by depressing key F1 with the"Global operand" dialog box open.

Procedure

Page 44: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-33Edition 03.2003

1.6.1.2 Communications via virtual connections

Additional function blocks must be configured:

• Transmit- and receive blocks of the process data utility

• Central blocks to administer the couplings used.

Virtual connections permit communication associations between:

• 1 transmitter - 1 receiver

• 1 transmitter - several receivers

• several transmitters - 1 receiver

An appropriate data transfer mode is specified at the transmit- andreceive blocks.

Transmitter and receiver can be located on different CPUs and can beconnected via any coupling.

1. In the SIMATIC Manager, double-click on the CFC charts, whichinclude the I/O for the communications connection.

2. In the CFC application window, select the block output from which thevirtual connection is to be taken.

3. Select the menu command Insert > Connection to operand.

4. Select the "virtual connection" option.

5. Enter a unique name in the "virtual connection name" field, and anumber in the "sequence number field". The "virtual connection name"can comprise six characters. Acknowledge with "OK".

6. Select the block input as destination for the virtual connection.

7. Select the menu command Insert > Connection to operand and the"virtual connection" option.

8. In the "virtual connection name" field, enter the name assigned at theblock output, and in the "sequence number" field, the numberassigned at the block output. Acknowledge with "OK".

9. Configure the required transmit-, receive- and central blocks. You willfind the necessary steps in the Manual "System- and communicationconfiguring D7-SYS".

Prerequisites

Communicationassociations

Procedure

Page 45: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-34 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

NOTE • You can connect the virtual connection with other block inputs.Proceed as previously described under steps 6, 7 and 8.

• At step 8 in the "Virtual connection name" list field, you will beprovided with a selection of already configured $ symbols.

• You can obtain additional help info by pressing F1 with the "Globaloperand" dialog box open.

Additional informationon virtuell connections refer to the "System- and communicationconfiguring D7-SYS“.

1.6.2 Communications with display units

Communication links can be configured to the following display units :

• SIMATIC-OPs

• WinCC

In order to establish a communications link to a display unit, the followingconditions must be fulfilled:

• The partner must be in an MPI network.

• A coupling module must be inserted in the subrack.

• The required function blocks (FB) must be configured in the userprogram.

Additional informationRefer to the "System- and communication configuring D7-SYS ". UserDocumentation for communications with display units.

Overview

Prerequisites

Page 46: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-35Edition 03.2003

1.7 Loading programs

After configuration, parameterization and program generation have beencompleted, transfer the user program into the target system. This Chapterdescribes how you select the interface and load the user programs.

The complete user program of a CPU is loaded into an automationsystem at one go. The hardware configuration of this CPU as well as theoperating system are also automatically loaded.

Loading via an online connection(access to the target system):

The user program is loaded into thememory module inserted in a modulereceptacle of the CPU. The programmemory is buffered during powerfailures.

Loading the user program into thememory module offline:

The user program is loaded into amemory module in a PCMCIA socketof the generating system. Thememory module with the loaded userprogram is inserted in the modulereceptacle of the CPU.

Table 1-6 How the programs can be loaded into the CPU

NOTE In order to activate the user program in the memory module of the CPUthe station with this CPU must be restarted (cold restart).

1.7.1 Online loading

1.7.1.1 Selecting the interface for the online connection

An online connection is required between the generating system andtarget system for the following activities:

• Online loading into a CPU

• Testing user programs

• Displaying the module status of a CPU

• Displaying and changing the operating status of a CPU

You can select the online interface via which an online connection is tobe established to the target system.

Possible interfaces for online connections:

• Multi-point capable interface (MPI) or

• RS232 interface (COM1 or COM2)

Overview

There are twopossibilities ofloading data intothe CPU

Possible interfacesfor onlineconnections

Page 47: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-36 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1. From the Windows task bar, select the menu command Start >Simatic > Step 7 > Set PG-PC interface.

2. Select the interface used and select the correct parameter.

NOTE • If you depress key F1 with the dialog box open, you can obtainadditional info.

• For an online connection via the MPI interface, the generatingsystem must have an MPI interface.

• Ensure that the properties of the selected interface have beencorrectly set. The baud rate for the MPI interface must correspondwith the baud rate which was configured for the coupling partner.

1.7.1.2 Online loading into a CPU

• You have established an online connection between the generatingsystem and the station with the CPU.

• You have compiled the user program of the CPU in the CFC.

• You have set switch S1/8 on the T400 to the off position.

• You have established an online connection between the generatingsystem and the T400 (serial interface X01, terminals 67..68).

1. In CFC bring into the foreground the window of any chart from theCPU to be loaded.

2. In CFC select the menu command PLC > Download.

3. From the load versions, select the "online" option, and acknowledgethis with "Load".

4. Repeat steps 1 to 3 for the other CPUs of the station.

5. In the CFC select the menu command PLC > Operating Mode.

6. Restart the station in order to start the loaded user program.

Selecting theinterface for theonline connection

Prerequisites

Additionalprerequisites whenloading a T400-CPU

Procedure

Page 48: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-37Edition 03.2003

1.7.2 Offline loading

1.7.2.1 What you need to know about memory modules and theprogramming interface

! CAUTION • Hitch-free and safe/reliable operation is only guaranteed if you usethe memory modules which Siemens has released for SIMATICTDC/SIMADYN D. The memory cards from SIMATIC S7/M7 cannotbe used for SIMADYN D.

• Do not attempt to load a memory module, logged-on as drive withWindows. The files you have on the drive could be lost.

PCMCIA/JEIDA modules according to the PC card standard can be usedas memory modules for CPUs.

The Micro Memory Cards from the SIMATIC family are used as memorycard for the FM 458-1 DP (refer to Catalog ST DA 2003).

The memory modules released by Siemens are listed together with theirOrder Nos. in the HWConfig module catalog under "modules - programmemory".

NOTE FLASH memory modules, series 1Older FLASH memory modules ("Series 1") cannot be used.

1.7.2.2 Selecting the loading interface

You have activated PC-card support on your generating system:

• A "PC card" icon is displayed in the "Control Panel" window ofWindows.

NOTE If PC-card support is not activated, then follow the instructions in theonline help of Windows under the index entry "PC cards, activatingsupport of".

Released memorymodules

Prerequisites

Page 49: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-38 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1. From the Windows task bar, select the menu command Start >Simatic > Step 7 > D7-SYS - Select PCMCIA interface.

2. In the "PCMCIA socket" dialog box select the required PCMCIAsocket and confirm with "OK".

NOTE • If your generation system has several PCMCIA sockets, then selectthe socket which is to be used for offline loading. Number 1 isautomatically selected for this socket.

• If you press F1 with the "PCMCIA socket" dialog box open, then youwill obtain additional help info.

1.7.2.3 Offline loading into a memory module

• Your generating system has a PCMCIA socket.

• Your PC card support function is activated.

• You have selected the PCMCIA socket via which loading is to berealized.

• You have compiled the user program of the CPU in the CFC.

1. In CFC bring into the foreground the window of any chart from theCPU to be loaded.

2. Insert a suitable memory module into the selected PCMCIA socket ofthe generating system. Ensure that the write protection of the memorymodule is not enabled.

3. In the CFC select the menu command PLC > Download.

4. Under load type select the "offline" option and acknowledge with"load".

5. Repeat steps 1 to 4 for the other CPUs of the station.

6. Power-down the station, insert the memory module into theappropriate receptacle of the CPUs and then power-up the station.

NOTE Please ensure that the memory module is inserted in the associatedCPU.

Selecting theprogramminginterface

Prerequisites

Procedure

Page 50: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-39Edition 03.2003

1.8 Testing programs

A program is tested (debugged) using the CFC in the test mode. Thisalso provides you with the possibility of making changes to the softwareonline and in many cases eliminates you having to re-load the CPU.

With the CFC in the test mode you can, online:

• display values at any block I/O

• change values at block inputs which are not interconnected

• delete interconnections between blocks

• insert interconnections between blocks

• delete function blocks

• insert new function blocks (under the assumption that the block type isalready available on the CPU)

• change the number of inputs of generic blocks

1.8.1 Testing programs

! CAUTION • When testing with the plant/system operational, incorrect operatorcontrol, functional faults/errors or program errors can cause severepersonal injury or material damage!

• Before executing any function, ensure that this cannot initiate apotentially hazardous condition!

NOTE • Changes are made simultaneously both in the charts on thegenerating system as well as in the user program being executed.The statuses of the user program in the generating system and inthe target system are identical.

• After a cold restart or after the station has been powered-down,changes are still effective.

• You have established an online connection between the generatingsystem and stations with the CPUs to be tested.

• The CPUs to be tested are already loaded with the user program to betested.

• The CPUs are in the RUN operating mode or STOP operating mode.

Overview

Prerequisites

Page 51: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-40 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

• You have set switch S1/8 of the T400 to the off position.

• You have established an online connection between the generatingsystem and the T400 (serial interface X01, terminals 67..68).

1. Open the charts to be tested in the CFC.

2. Select the menu command Debug > Test mode

3. Select the I/O, which you wish to monitor in the target system, by

• selecting an I/O of a function block and selecting the menucommand Debug > Register I/O.

• selecting one or several function blocks and selecting the menucommand Test > Register I/O. All of the I/O of the selectedfunction blocks are now registered for testing.

4. The actual values are displayed.

NOTE The following functions of the create mode of the CFC result in theappropriate online changes in the test mode:

• Changing parameter values

• Deleting and inserting interconnections

• Deleting and creating blocks

• Changing the input number of generic blocks

Further information on testing user programs, refer to the "STEP 7Optionspakete für D7-SYS" or the online help to CFC.

Additionalprerequisites whentesting userprograms on aT400-CPU

Procedure

Page 52: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-41Edition 03.2003

1.9 Diagnostics

Diagnostics includes the identification, evaluation and signaling ofdiagnostic events, which occur within the SIMATIC TDC/SIMADYN Dcontrol system. In this case, there is a diagnostics buffer in every CPU, inwhich detailed information can be entered on all of the diagnostic events.

For the diagnostics, evaluate the following information, saved in the CPU:

• Information about the module status

• Information about the operating status of a CPU

By interpreting this information, you can quickly identify, localize andresolve faults and errors. You also significantly reduce the standstill timeswhich occur when a fault/error condition develops.

You have the following diagnostic functionality:

• Call-up the module information from the SIMATIC Manager in theOffline project view

• Call-up the module information from the CFC

• Display the value at connection YTS for communication blocks

• Display the type of diagnostics event via the 7-segment display on thefront panel of the particular CPU module

Additional information

• Refer to the "Hardware" Manual for the seven-segment display of theCPU modules.

• For the value at connection YTS of communication modules, refer tothe "Function Block Library" Reference Manual, or fault numbers inthe online help "Help on events". (Press the F1 key in the CFC andcall-up the topic "Help on events" under "CFC”.)

Overview

Diagnosticfunctionality

Page 53: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-42 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

SIMATIC Manager

Project

CPU

SIMADYN D station

Call from the SIMATIC Manager

Module Information

Menu command:

PLC > Module InformationProgram

Fig. 1-12 Calling-up the diagnostics from the SIMATIC Manager

You do not have to configure the diagnostics data acquisition by thediagnostics. It is available as standard and runs automatically.

Operating status transitions (e.g. from RUN to STOP) and entries of thefollowing error classes are displayed as diagnostics events:

• Error while initializing ("0")

• Monitoring error ("b")

• Communications error ("C")

• Task administration error ("E")

• User error ("A")(Diagnostics event defined by the user with function block USF)

1.9.1 Diagnostics in the SIMATIC Manager in the offline project view

NOTE • For diagnostics you must have the Station configuring software(HWConfig and CFC) on the PC/PG.

• If you do not have the Station configuring software on your PG/PC,then you must configure the Station hardware in HWConfig. In thiscase, you can only use a limited scope of the diagnostics, as youdon't have access to the charts.

Diagnostic events

Page 54: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-43Edition 03.2003

1.9.1.1 Transferring diagnostics information

The CPU identifies the error, and enters the diagnostic events into thediagnostics buffer. The PG/PC can read-out these diagnostic messages.

CPU

STEP 7

System status list

Diagnostics buffer

The diagnostics function of the CPU identifies the diagnostics event.

Fig. 1-13 Transferring diagnostics information

You can display the diagnostic messages in plain text using the followingdialog boxes in the SIMATIC Manager:

• Dialog box "Module Information"

− indicates where and when the error occurred

• Dialog box "Diagnostics"

− indicates the type of diagnostics event associated with the entry(user error, communications error, transitions between operatingstatuses, ...)

− displays the module names of the diagnostic events (if available)

Reading-outdiagnosticsinformation

Page 55: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-44 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.9.1.2 Steps to call-up the module information from the SIMATIC Manager

• You have established an online connection between the generatingsystem and the stations, which include CPUs whose status you wishto call-up.

• The CPUs are either in the RUN condition or STOP condition.

1. Select a station from the project view (offline) of the SIMATICManager and open this by clicking on it twice.

2. Select the CPU to be diagnosed.

3. Select the PLC > Module Information menu command.

4. The "Module information" dialog box with the tab "General" and"Diagnostic buffer" of the CPU are displayed.

5. Click on the "Special diagnostics" button, in order to open the dialogbox "Diagnostics" using the "Diagnostic buffer" tab.

NOTE You can obtain additional help by pressing key F1 with the "ModuleInformation" or "Diagnostics" dialog box open.

1.9.1.3 Evaluating the diagnostics buffer of the diagnostics

The contents of the diagnostics buffer are also kept even after the stationhas been reset.

NOTE The entries in the diagnostics buffer are deleted at power failure or bypowering-down the power supply voltage of the subrack, if there is noback-up battery or if this battery is displayed.

The diagnostics buffer is designed as ring buffer for a maximum of 120entries. If the maximum number of entries is reached, then for a newdiagnostics buffer entry, the oldest entry is overwritten. All of the entriesthen shift forwards. This means, that the most recent diagnostic entry isalways in the first position.

EventsThe following information must be entered, for each diagnostics event, inthe list of the "Diagnostic buffer" tabs in the " Diagnostics" dialog box:

• Consecutive entry number

• Date and time of the diagnostics event

• Error class of the entry

• Brief designation of the event

Prerequisites

Procedure

Organization of thediagnostics buffer

Special diagnostics- "Diagnosticbuffer" tab

Page 56: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-45Edition 03.2003

• Number of the CPU, name of the chart and block name, for which thediagnostics event occurred, separated by a point.

Details on the eventIn the list, select an event and in this field you will obtaine a detaileddescription:

• Designation of the event and event number

• Supplementary information, dependent on the event

• Incoming or outgoing event

Help on the eventUsing the "Help on event" button, you will obtain information about thecause of the event and counter-measures for the event marked in the listfield.

1.9.2 Diagnostics in the CFC

In the CFC, you can call-up the module information of a CPU.

The module status includes:

• the error fields of the CPU

• the exception buffer of the CPU

1.9.2.1 Steps to call-up the module status from the CFC

• You have established an online connection between the generatingsystem and the stations which include the CPUs whose status youwish to call-up.

• The CPUs are in the RUN operating mode or STOP operating mode.

1. In the CFC bring into the foreground the window of any chart of theCPU whose module status you wish to call-up.

2. Select the menu command CPU > Module Information.

3. Select the "Error panels" or "Exceptions" tab.

NOTE You will obtain additional help info if you depress key F1 with the"Module Information" dialog box open.

Further informationon the contents of the exception buffer, please contact the Hotline.

Prerequisites

Procedure

Page 57: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-46 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.9.2.2 Displaying and changing the operating mode

• You have established an online connection between the generatingsystem and stations with the CPUs whose operating status you wishto display.

• The CPUs are in the RUN operating mode or STOP operating mode.

1. In the CFC bring into the foreground the window of any chart of theCPU whose status you wish to display.

2. Select the menu command PLC > Operating Mode. The actualoperating mode of the CPU is then displayed in the "Operating Mode"dialog box.

3. If you wish to restart the CPUs of the station, select "Cold restart".

4. If you wish to set the CPUs of the station into the "User stop" modethen select "Stop".

NOTE You will obtain additional help info if you press F1 with the "OperatingMode" dialog box open.

Prerequisites

Procedure

Page 58: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-47Edition 03.2003

1.10 Archiving user programs

Individual projects can be saved, "zipped" in an archive file. These"zipped" files can be archived on hard disk or on other transportablemediums (floppy disks).

1.10.1 Archive programs

You archive user programs in the SIMATIC Manager.

The archiving function provides you with an interface to call-up yourpreferred archiving program.

You can use the following archiving programs:

• pkzip from Version 2.04g

• arj from Version 2.41a

• lha from Version 2.13

• winzip from Version 6.0

The arj archiving program is included in the scope of supply.

You must have installed the archiving program on your system. Anexplanation of how you embed it in STEP 7 is given in Chapter "Archivingprojects".

NOTE A DOS window is displayed while archiving/de-archiving; you can onlycontinue to work in the SIMATIC Manager when this window is closed.

In the properties of the archiving program, select that the DOS windowautomatically closes after archiving/de-archiving.

Proceed as follows:

1. In Windows Explorer select the archiving program and then the menucommand File > Properties

2. Select the "Program" tab in the dialog box which is then displayed.

3. Select the "Close when completed" option

4. Click on the "OK" button.

Overview

Application

Archivingprograms whichcan be used

Prerequisites

Set thecharacteristics ofthe archivingprogram

Page 59: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-48 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.10.2 Archiving projects

In order to select an archiving program, proceed as follows:

1. In the SIMATIC Manager select the menu command Options >Settings. You can then select from the displayed tabs.

2. Select your preferred archiving program under the "Archiving" tab.

The arj archiving program is preset (default).

The standard STEP 7 configuration assumes that the archiving programis installed in the DOS search path. If the archiving program is installedoutside the search path, proceed as follows:

1. In the SIMATIC Manager select the menu command Options >Settings. You can then select from a number of tabs.

2. Using the "Configuring" button under the "Archiving" tab, call-up the"Configure archiving" dialog box.

3. In the "Program path" field enter the path name of the archivingprogram or select it using the "Search" button.

4. Close the dialog boxes with "OK".

You can pre-set target directories, both for archiving and also de-archiving. Using these settings you can eliminate having to enterdirectories when archiving and de-archiving.

Proceed as follows to pre-set target directories:

1. In the SIMATIC Manager select the menu command Options >Settings.

2. In the dialog box displayed, select the "Archiving" tab.

3. Enable the "Use the archive directory when archiving" or "Use thearchive directory when de-archiving" options.

4. Enter the path in the associated text field or select a directory via the"Search" button.For de-archiving, you can select the automatic target directory search.

1. Close the dialog box with "OK".

Proceed as follows to set-up an archive

1. Ensure that no windows are open for the project which you wish toarchive.

2. Select the menu command File > Archiving > Project.3. Depending on your archiving settings (under Options > Settings,

under "Archiving" tab), an additional dialog box is displayed. There,you can set the target directory for the archive file, the file names andthe file type. Via the file type, STEP 7 identifies the archiving programto be used (e. g. "zip" for PKZIP).

Selecting yourpreferred archivingprogram

Selecting thesearch path for thearchiving program

Pre-setting thetarget directories

Archiving projects

Page 60: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-49Edition 03.2003

4. Select the project, which you wish to archive, from the subsequentdialog box.

5. If required, you can make special archiving settings in an additionaldialog box (e. g. saving over several floppy disks). The dialog box isonly displayed if you activated the options prompt in your archivingsettings, and the archiving program supports options.

A DOS window is opened, in which the archiving runs. The project is"zipped" and saved in the target directory.

You can archive a project as described above and copy the archived fileonto a floppy disk. It is also possible to select a floppy disk drive in the"Archiving" dialog box.

1.10.3 De-archiving projects

Projects cannot be directly processed in archives. The associated filesand data must first be retrieved from the archive.

Proceed as follows:

1. In the SIMATIC Manager select the menu commandFile > De-archiving.

2. In the dialog box which is displayed, select the archive file, whichcontains the "zipped" project.

The settings which you made under the "Archiving" tab, which you cancall-up with Options > Settings, determines whether the followingdialog boxes are displayed.

3. If relevant, select the target directory where data are to be de-archived("unzipped") in the next dialog box.

4. If relevant, additional settings for "unzipping" can be made in anadditional dialog box.

NOTE The directory names, in the path, must not exceed 8 characters

After the dialog box is closed, a DOS window is opened, where you cansee how the file is unzipped.

When unzipping, the project is set-up, and its contents retrieved from thearchive. You can now open the project and process it or copy sectionsout of it, and insert them into another project.

Copying ontofloppy disk

Overview

Processingarchived projects

Page 61: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

1-50 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1.11 Printing

After you have completed generating the program for your automationtask, you can print out all of the important data using the print functionintegrated in STEP 7. This then allows you to generate your own projectdocumentation.

To create, process and print standardized circuit manuals, you can usethe DOCPRO option package. Thus, you have at your fingertips aplant/system documentation which fulfills the DIN- and ANSI Standards.

1.11.1 Setting-up the printer

Select the menu command File > Print Setup to set-up a printer anddefine the page orientation (portrait or landscape).

Select the menu command File > Page Setup to set the page format forprinting (e. g. A4, A5, Letter).

Change the print form so that it matches the required paper format. If theform is too wide, the righthand margin is printed-out on a subsequentsheet.

You can set the headers and footers for your documents to be printedusing the SIMATIC Manager with the menu command File > Headers,footers.

You can preview the printout using the menu command File > Preview.

NOTE Several STEP 7 application programs only offer a part of these menucommands.

1.11.2 Starting to print

You can print the following specific components of a project:

• The configuration table of a station with the layout of the modules andmodule parameters

• CFC charts

To print proceed as follows:

1. Open a suitable object to display the information to be printed on thescreen.

Overview

DOCPRO optionpackage

Setting-up theprinter

Setting the pageformat

Setting headersand footers

Print preview

Project parts whichyou can print

Basic procedure

Page 62: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Basic software

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 1-51Edition 03.2003

2. Insert the "Print" dialog box into the window usingthe menu command File > Print....

Depending on the window, the first entry in the menu bar can be otherthan "File", e. g. "Station".

3. When required, change the printer settings (e. g. printer, print range,number of copies) in the dialog box and then close it. You can obtainmore detailed information on printing in the online help.

Page 63: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-1Edition 03.2003

2 CFC2.1 Working with the CFC editor 2-2

2.2 Brief guide 2-22

2.3 Testing and commissioning 2-33

2.4 Creating block types 2-48

2.5 Chart reference data-documentation 2-50

2.6 Technical data 2-53

2.7 Abbreviations 2-54

Overview

Page 64: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-2 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

2.1 Working with the CFC editor

This Chapter provides you with system-specific information about CFC(Continuous Function Chart)and how it is embedded in the STEP 7software package. It also describes the mode of operation of the CFCeditor, if this wasn’t previously discussed in the Manual "CFC for S7".

2.1.1 CFC in the STEP 7 environment

Fig. 2-1 shows how the CFC is embedded in the STEP 7 environment:

SIMATIC TDC/ SIMADYN D

SIMATIC Manager

STEP 7STEP 7 componentsCFC

Fig. 2-1: CFC in the STEP 7 environment

The following STEP 7 components are of significance when working withCFC for the option package D7-SYS.

• SIMATIC ManagerThe SIMATIC Manager administers tools and data. It also sets-up andchanges a project structure (SIMATIC TDC/SIMADYN D-/SIMATIC400 stations, D7-SYS programs, CFC-/SFC charts and starts theCFC/SFC editor as well as compiles charts.

• HWConfigYou can configure the hardware configuration of a SIMATICTDC/SIMADYN D station or SIMATIC 400 station with FM 458-1 DPusing HWConfig. Using CFC, you refer to the properties of theconfigured modules, for instance, names of hardware.

2.1.1.1 Software requirements

The operating system Windows 95, 98, ME, NT 4.0, 2000 or XP and theSTEP 7 basis software must be installed. For CFC, you require differentsoftware option packages depending on the target system.

How CFC isembedded

STEP 7components

Prerequisites

Page 65: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-3Edition 03.2003

With the CFC for SIMATIC TDC/SIMADYN D and FM 458-1 DP yourequire the D7-SYS option package.With D7-SYS, you are provided block libraries for SIMATICTDC/SIMADYN D and FM 458-1 DP which are available in CFC.

The following diagram shows the inter-dependencies of the CFCsoftware:

S7 M 7CFC

STEP7

Borland C / C++

M 7-SYSSCL

SIM ATIC TDC /S IM ADYN D

D7-SYS

Fig. 2-2: Inter-dependencies of the CFC software in the STEP7 system environment

Installation forSYMADYN D

Page 66: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-4 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

2.1.1.2 Project planning data flow

The following diagram shows the project planning data flow inSIMATIC TDC/SIMADYN D and the FM 458-1 DP, starting from importingblock type up to loading the machine code into the target system.

Block types CFC chartsBlock instances ParametersCFC Editor

GeneratecodeType

C sources

Load

Compile and

Machine code

Compile

link

User program*.BR3

SIMADYN Dblock libraries

SIMATIC TDC / SIMADYN D target system

... Sequence

SIMADYN Doperatingsystem

Fig. 2-3: Project planning data flow

The data flow for the user program of a SIMATIC TDC/SIMADYN D-CPU or the FM 458-1 DP application module is as follows:

1. The block types of the standard block library "FBSLIB" of SIMADYN Dare already included in a newly created chart container.When required, the user can import the necessary supplementarylibraries.

2. The CFC Editor is used to create charts by inserting blocks (from theblock libraries), and then parameterizing and inter-connecting them.

data flow

Description of theSIMADYN D dataflow

Page 67: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-5Edition 03.2003

3. The CFC charts are compiled; a user program is generated which canbe loaded.When compiling, the hardware configuration data of the CPU,configured in HWConfig, are transferred into the user program.

4. The user program (and if necessary, the operating system) isdownloaded into the target system.

2.1.2 Handling block types

In this section, you will see how you import block types and insert them inthe CFC chart.

• Importing block libraries

• Inserting block types

• Deleting block libraries

The function blocks are organized in block libraries. You import anddelete all block types of a library together.Within a library, blocks are grouped into block families, which includeblocks which have associated or similar functionality.

2.1.2.1 Importing SIMADYN D block libraries

The function blocks of the standard function block library "FBSLIB" arealready imported in a newly created chart container of a D7-SYSprogram. When required, additional block libraries can be imported andare then available in all charts of the chart container.

This is how you import block libraries:

1. Open a chart of the chart container and select the menu itemOptions > Block types.A dialog box opens with two windows. The block libraries, installed onyour generating system, are listed in the lefthand window "Existinglibraries". The libraries, which have already been imported into thischart container, are listed in the righthand window "Imported libraries".

2. In the lefthand window, select the library to be imported, and click onthe "Import" button. The selected library is then imported and a dialogbox opens and shows you how the operation is progressing.

The following test is executed when importing a block library:

• A check is made as to whether the library to be imported contains ablock type which was already imported with another library.

Standard blocklibrary

Procedure

Tests

Page 68: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-6 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

If an error is identified when a library is being imported, an error report isdisplayed with information on the cause of the error. Select an error lineof the report and click on the "Help text" button to obtain furtherinformation regarding the error cause and how it can be resolved.

2.1.2.2 Inserting block types

The chart is open. You will find directories of the block families as well asthe directories "All blocks" (contains all blocks)” and "Other blocks" (forblocks which are not assigned to a particular family), in the block catalog.An icon for free text is shown above the directories. Insert the text fieldjust the same as for a block.

You can insert the required block from the open directory by dragging itinto the chart.

2.1.2.3 Deleting block libraries

You can delete block libraries using the function Options > Block types.This function is used for block types which are no longer required in thisparticular chart.

NOTE The standard block library "FBSLIB" cannot be deleted.

This is how you delete block libraries:

1. First ensure that the library which you intend to delete, no longer hasblock types which are required in the charts of the chart container.

2. Open a chart of the associated chart container and select the menuitem Options > Block types.

A dialog box is displayed with two windows. The block librariesinstalled on your generating system are listed in the lefthand window"Existing libraries". The libraries which have already been importedinto this chart container are listed in the righthand window "Importedlibraries".

3. In the righthand window, select the library to be deleted and click onthe "Delete" button. Deletion is started and a dialog box opens toindicate the progress.

When deleting a block library, the following checks are made:

• It is checked as to whether block types, in the library to be deleted,are used in the charts of the current chart container.

If an error is identified when deleting a library, an error report is displayedwith information on the cause of the error. Select an error line of thereport and click on the "Help text" button to obtain additional informationon the cause of the error and how it can be resolved. Click on the "Go to"button to jump to the associated function block.

Error report

Inserting

Procedure

Checks

Error report

Page 69: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-7Edition 03.2003

2.1.2.4 Updating SIMADYN D block libraries

This is how you update the block libraries:

1. Open a chart of the associated chart container and select the menuitem Options > Block types.A dialog box is displayed with two windows. The block libraries,installed on your generation system are listed with their versionreleases in the lefthand window "existing libraries". The libraries,which have already been imported into this chart container, arelisted in the righthand window "imported libraries".

2. Using the version releases of the libraries in the lefthand andrighthand windows, check for which already imported libraries, anew version has been installed.

3. In the lefthand window, select the library to be updated, and click onthe "new version" button.

4. An additional dialog box, which has a security prompt is displayed.Update is initiated if you exit this box by clicking on the "yes" button.A dialog box opens which displays how the update is progressing.

When updating a block library, the following checks are made:

• It is checked as to whether all of the block types which are used arestill available in the new library version.

• A check is made as to whether block types have changed in the newversion so that it is no longer possible to implement a fully automaticupdate.Those positions, which must be manually edited, are listed in the errorreport.

If an error is determined when updating the library, then an error report isdisplayed with information on the error causes. Select an error line of thereport and click on the "help text" button in order to obtain moreinformation on the error cause and how it can be resolved.

Procedure

Checks

Error report

Page 70: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-8 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

2.1.3 Editing block inputs

The Manual "CFC for S7 describes in detail how you edit block inputs, i.e.change the properties of the inputs

2.1.3.1 Additional properties of the block I/Os

In the target system, SIMATIC TDC/SIMADYN D bzw. FM 458-1 DP, I/Ocan have additional properties.

An optional scaling factor can be configured at the I/O of the data typeREAL (R), to normalize analog values (define them as per unit values).The scaling factor is pre-assigned the value 1.0.

An initialization value can be specified in the "Value" field of the propertydialog box at the block outputs. This value is available at the output if theassociated block was calculated for the first time in the operating modeINIT.

Comments at block I/Os, which start with "@", are pseudo comments andare taken into account when compiling data for theSIMATIC TDC/SIMADYN D bzw. FM 458-1 DP target system. Pseudocomments influence the user program function:

@DATX : The input is connected, bypassing the consistencymechanisms.

@TP_bnnn: Connection is a parameter (with range ID "H", "L", "c" or"d" and a three-digit parameter number nnn, e. g.@TP_H089).

@TC_nnnn: I/O is a technology connector (identified by a four-digitconnector number nnnn,e.g. @TC_0034

Additional informationon pseudocomments, refer to the SIMADYN D User Documentation:

• "System Software and Communications Configuring D7-SYS" ManualSection "System Software, Sec. Generating CFC Charts"

• "Communications Communications Configuring D7-SYS" Manual,Section " Communications Configuring " Sec. "Parameter AccessTechnology for D7-SYS"

2.1.3.2 Inverting inputs

It is not possible to invert binary inputs for SIMATIC TDC/SIMADYN Dand FM 458-1 DP (menu item Edit > Invert Input).

Scaling factor

Values at theoutputs

Pseudo comments

Page 71: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-9Edition 03.2003

2.1.3.3 The GLOBAL data type

I/O of the GLOBAL (GV) data type cannot be interconnected. They mustbe interconnected with global operands (refer to Section 2.1.4.1).

2.1.4 Block interconnections

The definition and procedure when interconnecting blocks is described inthe Manual "CFC for S7". A description of the system-specific propertiesof the interconnection are now described.

For SIMATIC TDC/SIMADYN D and FM 458-1 DP, not only can I/O ofidentical types be interconnected, but also:

• REAL (R) and SDTIME (TS)

• INT (I) and WORD (W)

• DINT (DI) and DWORD (DW)

I/O of the STRING (S) data type cannot be interconnected, neither toeach other nor with global operands.

I/O of the GLOBAL (GV) data type cannot be interconnected.They must be interconnected with global operands (refer to Section2.1.4.1). GLOBAL I/O which are not connected are flagged as erroneousduring the consistency check or when compiling.

2.1.4.1 Interconnecting to global operands

Global operands are connection partners which are located outside theCFC charts.

For SIMATIC TDC/SIMADYN D und FM 458-1 DP, communicationaspects as well as linking input/output blocks to hardware addresses areconfigured as interconnections to global operands.

For nested charts all connections to global operands must be routed tothe chart interface. This avoids global operates being defined a multiplenumber of times (e.g. $ signals are created a multiple number of times).

For SIMATIC TDC/SIMADYN D und FM 458-1 DP, a differentiation ismade between the following types of global operands:

• $ signals

• virtual connections

• virtual connection names

• OP connections

• hardware addresses

Interconnectabilityof data types

The STRING datatype

The GLOBAL datatype

Definition

Special feature

Types of globaloperands

Page 72: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-10 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

• module names

• name references

• process interrupts

Select the block I/O which is to be connected with a global operand andselect the menu command Insert > Connection to operand. Dependingon the block I/O type, CFC opens an appropriate dialog box.

Selection lists in the dialog boxes offer practical entries depending on theparticular context. Further, you can directly enter a name in the dialogbox input field.

You can change the name of a $ signal after you have double-clicked onthe name in the margin.

When entering names, the syntax for the particular global operand typemust be observed (refer to Table 2-6 Name lengths).

To obtain information on what you can enter, depress F1 with the entrydialog box open.

For further information, refer to the help for the function blocks to beinterconnected. To access this help, select the block in the chart and thendepress F1.

2.1.4.1.1 $ signals

$ signals can be configured at all inputs and outputs with the exception ofSTRING (S) and GLOBAL (GV) data types. They are used to simplyconfigure interconnections between blocks on different CPUs within aSIMADYN D station.

Additional informationon configuring $ signals, refer to the Manual "System Software andConfiguring D7-SYS" .

If you "create" a $ signal, i. e. you configure it at a block output, you candefine whether the signal is transferred via the L- or C bus of the subrack,and which type it is (Standard or Fast).

The selection list shows you the already configured $ signals configuredat other CPUs of the SIMADYN D station with which the I/O can beconnected:

• At block outputs, these are all data types, which match $ signalswhich are used at block inputs of other CPUs, but which still haven’tbeen created.

• At block inputs, these are all data types which match $ signals andwhich are created at the block outputs of the other CPUs.

Entry dialog boxes

Entry syntax

Help

Block I/O

Bus and type

Contents of theselection list

Page 73: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-11Edition 03.2003

Using $ signals, not only can I/O of the same type be connected, butalso:

• REAL (R) and SDTIME (TS)

• INT (I) and WORD (W)

• DINT (DI) and DWORD (DW)

2.1.4.1.2 Virtual connections

Virtual connections can be configured at all I/O with the exception ofthose of STRING (S) and GLOBAL (GV) data types. They are used toconfigure communication connections via the "Process data" utility.

Additional informationon configuring virtual connections, refer to the Manual "System- andcommunication configuring D7-SYS".

By specifying a virtual connection name, you establish a reference to atransmitter or receiver which transfers the net data of this particularconnection.

Using the sequence number, the transmit- and receive blocks arrange thevirtual connections, transferred from them, to the transferred telegram.

You are provided with a list of all of the "Virtual connection names" in theselection list for "Virtual connection name", which were configured at atransmit/receive block of this particular CPU.

2.1.4.1.3 Virtual connection names

Virtual connection names (transmitting and receiving) are configured attransmit and receive blocks only at data type GLOBAL (GV).

Additional informationon configuring virtual connections, refer to the Manual "System- andcommunication configuring D7-SYS".

Up until now, you were provided with a list of virtual connection names inthe selection list, which although specified in a virtual connection, havestill not been configured at a transmitter or receiver.

Interconnectabilityof data types

Block I/O

Virtual connectionname

Sequence number

Contents of theselection list

Block I/O

Contents of theselection list

Page 74: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-12 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

2.1.4.1.4 OP connections

OP connections can be configured at all inputs and outputs, with theexception of data types STRING (S) and GLOBAL (GV). They are usedto simply configure connections to SIMATIC OPs.

Additional informationon configuring OP connections, refer to the “System- and communicationconfiguring D7-SYS", Section "Communications with SIMATIC OperatorPanels".

If you generate an OP connection, you must specify a symbol name anda flag. For inputs, you can additionally specify an initialization value(default value).

2.1.4.1.5 Hardware addresses

Hardware addresses are configured at input/output blocks. They definewhich hardware signal is to be read-in or output from this block.

All of the SIMATIC TDC/SIMADYN D station hardware addresses or anFM 458-1 DP application module and its expansion module (EXM 438-1,EXM 448), configured in HWConfig, are contained in the selection listwhich you can access from the block I/O to be connected. In this case, itis taken into account whether the associated module can be addressedfrom the current CPU and whether the input/output block typecorresponds to the hardware address type.

2.1.4.1.6 Module names

Module names are configured at communication blocks. They define thecoupling via which communications is to be established.

Additional informationon configuring module names, refer to the Manual "System- andcommunication configuring D7-SYS"

You are provided with a list of all of the coupling modules, which can beaddressed from the current CPU, in the selection list.

Block I/O

OP connectiondata

Block I/O

Contents of theselection list

Block I/O

Contents of theselection list

Page 75: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-13Edition 03.2003

2.1.4.1.7 Name references

Name references are configured at block connections GLOBAL (GV) ofthe utility of various communication utilities. They connect several blocksof the associated utility, which fulfill a common task.

Additional informationon configuring name references, refer to the Manual "System- andcommunication configuring D7-SYS".

All of the name references, which have already been configured in thecurrent chart container are provided in the selection list.

2.1.4.1.8 Process interrupts

Process interrupts are configured at special blocks block and influencethe handling of process interrupts.

Additional informationon process interrupts, refer to the Manual "System- and communicationconfiguring D7-SYS".

You are provided with a list of SIMATIC TDC/SIMADYN D or FM 458-1DP process interrupts in the selection list. It is not possible to directlyenter other process interrupts.

2.1.5 Run-time properties

A detailed description of the run-time properties and how you can changethese, is provided in the Manual "CFC for S7". You will find somesupplements to the following subjects here:

• Tasks and run-time groups

• Run-time attributes

2.1.5.1 Tasks and run-time groups

For SIMATIC TDC/SIMADYN D and FM 458-1 DP, a task is a cyclic orinterrupt task of a SIMATIC TDC/SIMADYN D CPU or a FM 458-1 DPwhich can be configured in HWConfig.

The structure of a task with run-time group and blocks is illustrated in theFig. Chart reference data: Run sequence (in the Manual, "CFC for S7").

A task contains blocks and optional run-time groups with blocks. Thetasks are specified for the SIMATIC TDC/SIMADYN D andFM 458-1 DP target system.

Block I/O

Contents of theselection list

Block I/O

Contents of theselection list

Definition

Task structure

Tasks

Page 76: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-14 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

The properties, which define the run properties of a task, are configuredin HWConfig The properties are parameterized under the tab "Basiccycle", "Cyclic task" and "Interrupt task" of the property dialog boxes ofthe CPU modules.

Run-time groups are optional. They are used to structure and sub-dividetasks. The blocks are sequentially inserted in the individual run-timegroups.

A run-time group is enabled and disabled via run-time attributes.

The following is valid for the tasks: The sequence of groups and blocksinserted within a task, is the run sequence.The same is true for groups: The sequence in which the individual blocksare inserted is the run sequence within the group.

You can change the order of execution.

In the SIMATIC TDC/SIMADYN D target system, and for the FM 458-1DP, each block must be inserted precisely once. It is not permissible toinsert blocks a multiple number of times in several tasks.

2.1.5.2 Run-time attributes

A run-time group has the following three attributes in the CFC:

Enable

Scan rate (not permissible for SIMATIC TDC/SIMADYN Dand FM 458-1 DP)

Phase offset (not permissible for SIMATIC TDC/SIMADYN Dand FM 458-1 DP)

The group inherits these attributes in all of the blocks which it contains.The attributes are assigned when creating the run-time group. Theenable attribute can be controlled via an interconnection.

In the SIMATIC TDC/SIMADYN D and for the FM 458-1 DP target systemit is not possible to specify different scan rates and phase offset of a run-time group.

The enable attribute activates or deactivates a group (on=1, off=0). Aslong as it is set to 0, the group is not executed, irrespective of all of theother conditions.

The enable attribute is set to 1 as standard. However, it can also bedynamically set. In this case, the output value of a CFC block determineswhether the group is to be activated or de-activated. You caninterconnect the binary output of a block with the run-time group for thispurpose.

Run-timeproperties

Run-time groups

Order in which thetasks are executed

Blocks are notinserted a multiplenumber of times

Scan and phaseoffset not possible

Enable attribute

Page 77: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-15Edition 03.2003

! CAUTION Certain blocks (especially communication blocks) may never bedisabled in the RUN operating mode. This means that they cannotbe configured in run-time groups, whose enable signal iscontrolled from a binary output.

Please observe the appropriate instructions in the function blockslibrary.

2.1.6 Operator control and monitoring

CFC offers you a user-friendly method to control and monitor variables ofyour process or your automation system using WinCC.

The advantage over previous methods is that you no longer have toindividually configure data for each operator station (OS), but you onlyhave to do it once in the CFC. You can transfer the data generated whenconfiguring with CFC into the WinCC data administration using thetransfer program D7-SYS-OS Engineering (this belongs to the "D7-SYS"software package). Data consistency and compatibility with the displaysystem is also checked. WinCC uses the data in the display blocks andgraphic objects

For SIMATIC TDC/SIMADYN D, you can configure and change theoperator control and monitoring attributes for the block connections (I/O).

When configuring variables which can be controlled and monitored,proceed as follows:

1. Assign the I/O, which you wish to control and monitor, with thenecessary operator control and monitoring attributes, in a dialog box.These can include limit values, equivalent values and loggingcharacteristics, etc.

2. Transfer the configured software data, generated with CFC, to yourdisplay unit (WinCC) using the D7-SYS-OS Engineering.

In order that the configured data for WinCC can be saved andtransferred, the D7-SYS OS engineering transfer program automaticallyallocates unique names. These are then saved in WinCC.

The name is made up of the following components:

• SIMATIC TDC/SIMADYN D station name

• CPU name

• CFC chart name

• Block name

• Block connection (I/O) name

The names may not include any underlines, blanks or special characters" ‘ ", ".", "%", "-", "/", "*", "+".

Principleprocedure

Name syntax

Page 78: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-16 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

2.1.6.1 Configuring operator control and monitoring attributes

In WinCC, each Operator Control and Monitoring-capable connection(I/O) of a block which has been activated for operator control andmonitoring, can be accessed. Data transfer is always realized using aninstance DB. When configuring, this is automatically assigned to theoperator control and monitoring attributes in the CFC.

Proceed as follows when configuring operator control and monitoringattributes of operator control and monitoring-capable connections:

1. Select the block.

2. Select the menu command Edit > Object properties.

3. Activate the "Operator C and M possible" control box in the "specialobject properties" area

4. Click on the "Operator Control and Monitoring" button. This allocatesan instance DB to the block. The instance DB is used to establishcommunications with the WinCC.

5. You can now enter or change the operator control and monitoringattribute values in the "Operator Control and Monitoring" dialog box.

NOTE You can obtain additional help by pressing the F1 key with the"Operator Control and Monitoring" dialog box open.

6. Close the dialog box by clicking on the ”OK” button.

Please observe the following when configuring:

• It is not possible to make I/O operator control and monitoring capablewith CFC in the online mode. If a new I/O for operator control andmonitoring using WinCC is required, the program must always benewly compiled and loaded!

• I/O of block-type structures, which were generated in the CFC usingnested charts, are not operator control and monitoring-capable!

2.1.7 Compiling and loading

The next two sections describe the following:

• Compiling the user program

• Loading the user program

Procedure

Page 79: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-17Edition 03.2003

2.1.7.1 Compiling the user programWhen compiling the charts for a SIMATIC TDC/SIMADYN D-CPU or anFM 458-1 DP, observe the following:

• All of the charts of the chart container of a CPU or the FM 458-1 DPare always compiled in the CFC together with a user program, whichcan be loaded and run.

• In this case, all of the block types used are automatically linked-in.Thus, for the SIMATIC TDC/SIMADYN D target system and FM 458-1DP, it is not necessary to separately compile and load.

• The hardware configuration of the SIMADYN D station, in which theCPU is inserted, is also included in the user program.Thus, it is not necessary to separately compile and load the hardwareconfiguration for a SIMATIC TDC/SIMADYN D target system and FM458-1 DP.

• When compiling, the resources of a SIMATIC TDC/SIMADYN D-CPUand a FM 458-1 DP CPU are automatically assigned. It is notnecessary to make manual interventions to the resourcemanagement.

• The cross-compilers required are invisible to the user and are called-up by the CFC. The CFC already identifies any configuring errors. Youdon’t have to know anything about the cross-compiler.

Before you can compile the charts of a SIMATIC TDC/SIMADYN D-CPUor a FM 458-1 DP, the hardware configuration of the station, in which theCPU or FM 458-1 DP is inserted, must be compiled and saved.

You start chart compilation by entering Chart > Compile > Charts asprogram; acknowledge the dialog box using "OK". Compilation isinitiated and a dialog box is opened where you can see how compilationis progressing.

When compiling, you can select one of two possibilities:

• Scope: Only compile changesOnly those parts of the chart container are compiled, which have beenchanged since the last compilation. Thus, when re-compiling,compilation times can be reduced by approximately 25%.Note: Even if you only compile changes, all of the charts of the chartcontainer are checked for consistency (consistency check).

• Scope: Compile everythingThe complete contents of the chart container are compiled,independent of whether the configured software has been changedsince the last compilation.

Interrelationships

Prerequisites

Compiling

Compilation scope

Page 80: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-18 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

1. When compilation has been completed, you will see a display of thenumber of errors and warnings which have been identified. You canopen a detailed compilation report using the "Details" button.

2. Select an error line of the report and click on the "Help text" button toobtain more detailed information about the cause of the error and howit can be resolved. Click on the "Go to" button to jump to theassociated function block.

3. You can call-up the report at a later time using the menu commandOptions > Report; if required you can also print these reports.

You can make several settings before compiling:

You can call-up a dialog box using the menu item Options > Settings >Compilation. This allows you to make the following settings:

• Which directory should be used to save temporary files which arecreated during compilation?e.g. Default: c:\temp

• Should an address book be created, yes or no?

NOTE If you activate this option, when compiling, it is guaranteed that thename syntax of STRUC Version 4.2 is maintained for chart, block and $signal names for SIMADYN D This note only refers to SIMADYN D.

• Should a map listing of the user program be created, yes or no?

• Which function block types are to be inserted online in the test modeof the CFC:

− only already configured block types

− the block types in the "FBSLIB" standard library

− block types from all of the imported libraries

• Is system data (operating system and block libraries) to be takenfrom the D7-SYS installation or from the archive (path) in the presentconfigured software? This means that it is possible to edit olderconfigured software with the matching system data without having toadapt the version.

• Should a file be created in which the data of all connections (I/O) oronly the string connections are to be entered?The appropriate box can be marked under "Create file for:".

It must be ensured that the user programs of all CPUs of a station areconsistent with respect to one another to guarantee that all of the CPUsof a SIMATIC TDC/SIMADYN D station run-up and operate together in acoordinated fashion.

When compiling the user program, a CPU is checked, with reference to $signals as to whether there are anyinconsistencies with the userprograms of the other CPUs in the station.

After compilation

Settings forcompilation

Multi-processingand compilation

Page 81: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-19Edition 03.2003

NOTE Inconsistencies can occur if you make changes to the configured datawithin a station, after you have already compiled the individual CPUs.

After which configuring changes do you have to re-compile a userprogram?

• If you changed the charts of this CPU.

• If you changed the station hardware configuration. In this case, youshould re-compile the user program of all CPUs in the station.

• If you removed or changed the name of $ signals at the block outputs.In this case, all of the CPUs, which use the $ signal, are used.

If you are not certain whether the user program of a CPU must be re-compiled, then check it using the "Only compile changes" option. If theuser program does not have to be re-compiled, then the CFC will flag thisand will interrupt compilation.

2.1.7.2 Loading the user program

In order to use a user program on a CPU or FM 458-1 DP, it must first beloaded.

The user program, compiled from the charts of the CPU or FM 458-1 DP,is loaded into that CPU or FM 458-1 DP which is assigned to the activechart window. The user program is transferred into the CPU or FM 458-1DP program memory, but is however still not active.

The new user program is activated if the CPU or FM 458-1 DP is re-started (also refer to Section 2.3.1).

You can either load the user program offline or online.

Remove the memory module from the CPU or FM 458-1 DP module,insert it into the appropriate slot of your PG/PC or external programmingdevice (OmniDrive or USB-Prommer) and load it offline. This is onlypossible for modules, which use a separate memory module (forexample, this cannot be used for the T400 technology module).

For online loading you connect your PC with an appropriatecommunications interface of a SIMATIC TDC/SIMADYN D station(DUST1 or MPI) or a SIMATIC CPU/SIMATIC CP for a FM 458-1 DP(refer to Section 2.3.10) and load the user program online.

Depending on the selected communications connection, you can load theprogram memory of a CPU/FM 458-1 DP or all CPUs of a station online.If you have a system-wide MPI bus interface, you can centrally load eachCPU of your system without having to get involved with the wiring orhardware of your system.

Offline loading

Online loading

Booting

Page 82: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-20 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

A special procedure is required for the following cases, when loadingonline via the MPI bus interface:

• In the boot status (initialization status), i. e. before software is firstloaded, all of the program memories have the same software. Initially,all stations have the same address, as the addresses of the stationson the MPI bus are only defined after the user program has beenloaded. In order to establish unique addresses, the stations which youdo not want to load data in, must be disconnected from the bus orpowered-down. You can switch-in another station after loading theprograms of the stations and transferring the new programs into theworking memory (RAM memory) (with a cold restart of the station).

CPU addressing within the station does not pose a problem as it isrealized, slot-related.

• If you modify the hardware of a station, i. e. add, remove orchangeover modules, the station goes back into the boot status whereonly reloading is possible; the displays of all of the CPUs of the stationhave a flashing "O".If you change several stations simultaneously, an address conflict willoccur, as in the boot status (initialization status), which must beresolved as described above.

The prerequisites and conditions for loading the user program depend onthe type of loading technique which will be selected.

The following conditions must be fulfilled to load offline:

1. The user program to be loaded has been compiled, error free.

2. The create mode of the CFC is selected.

To load the user program online, the following conditions must befulfilled:

1. A memory module is inserted in the CPU to be loaded. TheSIMADYN D operating system is already loaded in this memorymodule. You can identify this by the fact that, after the power supply ispowered-up, the 7-segment display of the CPU has a flashing "0"however, not with a point.

2. There is a communications link between the CPU and your PC

3. The user program to be loaded has been compiled, error-free.

4. The create mode of the CFC is selected.

5. Additional requirements when downloading into a T400-CPU online:− Switch S1/8 of the T400 has been switched-out

− You have established an online connection between the generatingsystem and the T400 (serial interface X01, terminals 67 .. 68).

You can load the user program as follows:

1. Select the menu item PLC > Download...

Prerequisites

Procedure

Page 83: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-21Edition 03.2003

2. The "Download" dialog box opens.

3. Define the scope of the software to be downloaded:− Generally, it is sufficient to only load the configured software ("Only

user program") thus reducing the download time. However, if CFChas identified that the operating system release has changed sincethe last time that data was loaded into this CPU or FM 458-1 DP,then the new release of the operating system is automaticallydownloaded.

− If software has still not been downloaded into the CPUor FM 458-1 DP, you must download the complete software("system and user program").

4. Specify how the PC can access the program memory:− During start-up, generally you will leave the memory module with

the user program in the CPU or FM 458-1 DP and select the"online" option.

− With "offline" you must remove the memory module from the CPUor FM 458-1 DP and insert it in the appropriate PCMCIA socket orMMC slot of your PC.

5. To start loading, use the Load function. The CFC responds byshowing how loading is progressing.

6. After loading has been completed, you will find the new user programin the CPU or FM 458-1 DP program memory and this becomes activewhen re-started (cold restart).

Page 84: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-22 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

2.2 Brief guide

This brief guide is intended for newcomers who have still not had achance to get up to speed with the CFC program package. We will showyou a small example where, after starting the SIMATIC Manager, you cancreate a project, create a CFC chart, interconnect blocks, compile thechart and load the software into the target system SIMATICTDC/SIMADYN D or FM 458-1 DP and then test it online.

Generally, there are various ways to achieve a goal. However, in thisparticular example we only want to show you one, namely the fastest orbest way. Alternative procedures will not be discussed here with just afew exceptions.

2.2.1 The first steps

So, you want to create a small application, using the CFC, for theautomation system.

You are knowledgeable about the Windows interface of the operatingsystem; the STEP 7 software package and the CFC software (includingthe D7-SYS option package) are already installed.

Power-up your PC or PG and wait until the Windows screen appears onyour display. Now you can start .......

On the Windows screen you will see an icon for the SIMATIC Manager,the entry into the STEP 7 software.

STEP 7 is started just like a Windows application by double-clicking onthe SIMATIC Manager. The SIMATIC Manager window opens and theSTEP 7 Assistant is also opened. You must acknowledge the STEP 7Assistant with "Cancel".

Comment

Starting

Page 85: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-23Edition 03.2003

To start-off with, you will create a project. A project allows you to save thedata and programs, obtained while creating the project, in an orderlyfashion. There is no specified sequence when creating a project, but thatyou can see for yourself ....

2.2.2 Creating a project

Firstly, set-up your project structure. Set-up a new project in SIMATICManager and open it. You can do this by using the icon in the tool bar:

(new project)

• In the "New" dialog box, select the Path, enter the required Projectname (in this case: "auto_ex") and close the box with "OK".

The project window appears, split into two fields: The project icon withthe project name is shown in the lefthand field and, the contents in therighthand field, which in this case are: The icon and the name of theMPI network.

You can now decide whether you first want to set-up the hardwareand then the software or vice versa. If you create the software first,then after the hardware configuration, you can assign it to a CPUusing drag & drop.

We start by inserting a SIMATIC TDC/SIMADYN D station in the project.

• Select the project container and then

Insert > Station > "Station name"

(Select a SIMATIC TDC station or a SIMADYN D station)

The "Station name" icon is inserted.

• Place the mouse pointer at the selected station icon and depress theright mouse key. Click on Open object ... in the menu which is nowdisplayed.

The HWConfig application to configure the hardware now opens. If the"Hardware catalog" window is not visible, then open it using the icon:

NOTE For more detailed information on configuring the SIMATICTDC/SIMADYN D hardware, please refer to the section "Configuringand parameterizing modules" in the User Documentation "Basissoftware for D7-SYS."

...the next steps

Set-up a projectstructure

Inserting thehardware

Page 86: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-24 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

In SIMATIC Manager you will now see, below the "SIMATICTDC/SIMADYN D station the icon D01_P1", the CPU module which youjust configured.

• Click on the "D01_P1" icon to open it.

You will see, that a D7-SYS program has already been assigned to theCPU. This already contains a chart container "Charts". You will see thiswhen you open the D7-SYS program.

If you open the chart container, you will see that it already has a functionchart. This is "@SIMD" system chart.

Now, insert your first CFC chart:

1. Select the chart container and then, using the right mouse keyInsert New Object > CFC

2. Now give the chart a new name. The text field of the CFC name isalready selected and the cursor activated.

3. Edit the new name, in this case: "cfc_reg1".

Fig. 2-4: Inserting the new CFC chart in the chart container

Thus, the project structure has been set-up, and a chart created. Blocksmust now be inserted into this chart and interconnected so that a controltask can be implemented.

Inserting thesoftware

Page 87: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-25Edition 03.2003

2.2.3 Starting CFC and inserting blocks

Before we really get going, we should first briefly discuss what will beconfigured in this chart.

This configuring example involves a basic oscillation circuit, whichgenerates a sinusoidal oscillation at its output. You can create this chartyourself in just a few minutes which you can then run as demonstration inthe test mode.

You use two block types:

• 2 integrators (INT)

• 1 subtractor (SUB).

The oscillation circuit (according to the differential equation f"(x) = - f(x) )is formed using two integrator blocks with feedback via a negationfunction.

The frequency of the oscillation circuit is defined by the integral actiontime of the integrator.

The amplitude of the oscillation is determined by the initial value at theintegrator output.

By double-clicking on the chart icon, you can open the chart and implicitlystart the CFC Editor.

The CFC window is opened. The chart window and the block catalog arelocated in the CFC window. The block catalog can be switched-in andswitched-out using the following symbol.

(catalog)

Preliminarycomments

Configuringexample

Opening the CFCchart

Page 88: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-26 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

You can position the block catalog anywhere on the screen.

Fig. 2-5: Block catalog

You can use the blocks of the standard library "FBSLIB", supplied withthe system, to configure the CFC chart.

Open the "Closed-loop control" family of control blocks.

Select the INT block and drag it, with the left mouse key depressed, intothe chart. The block outline will be represented as a dotted line. Releasethe mouse at a suitable position. The block will be displayed in the chartwith its real size.

Place a second copy of the INT block next to the first.

Now you should look for the SUB block. Enter the SUB name (in uppercase letters) in the entry field of the block catalog, and click on the"Binocular" icon (field glasses). The search starts and the SUB block isquickly found which is included in the "Arith." family.

As before, drag this block to a free location in the chart.

Block catalog

Page 89: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-27Edition 03.2003

If your chart was displayed as an overview. Click in a free location in thechart using the right mouse key and in the context menu in page view. Inthis zoomed display you will also see the block connection designations(I/O connections).

2.2.4 Interconnecting blocks

We now come to interconnecting.

• Select output "Y" of the lefthand INTegrator and then input "X" of therighthand INTegrator.

• Select output "Y" of the righthand INTegrator and then input "X2" ofthe SUBtractor.

• Select output "Y" of the SUBtractor and then input "X" of the lefthandINTegrator.

The autorouter has already drawn the connecting lines from the outputsto the inputs; the I/O are interconnected.

2.2.5 Editing blocks

We will now parameterize the blocks which we interconnected andchange the sequence in which they are executed (run sequence).

Select the menu item Edit > Run sequence...

The "Run sequence" dialog box is displayed: You will see the taskstructure in the lefthand window; the contents are displayed in therighthand window. The default location of the block is in the highestpriority cyclic task T1.

We now want to shift the block, just inserted from task T1, into the lower-priority task T3.

• Double click on the "T1 [cyclic task]" icon.

The blocks (including chart/block name, comments and position) aredisplayed in the righthand window. Select all three of the blocks, anddrag these to the cyclic task "T3" icon in the lefthand window. Therighthand window is now empty. If you open "T3 [cyclic task]", thethree blocks are now displayed there.

• Close the dialog box with Chart > Close and then proceed to the nextstep.

The limit inputs of the integrators must now be supplied with other values.You can now do this, individually for each input, by double-clicking andcalling-up the dialog box "Properties - I/O" or you can take the easierroute:

Go into the pageview

Interconnectingblocks

Changing the runsequence

Parameterizinginputs

Page 90: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-28 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

• Double-click on the lefthand "INT" block.

The "Block Properties" dialog box opens and then you can select the"I/O" tab. The parameters in the fields with grey background, cannotbe changed.

In the table, first go to the "Values" column, and change as follows:

• LL: From "0.0" to "-10.0" (the lower limit value)

• LU: From "0.0" to "10.0" (the upper limit value)

• TI: From "0ms" to "500ms" (the integrating time constant)

• In the "For test" column, highlight the input, which is later to bemonitored in the test: Y.

• Close the dialog box with "OK".

Double-click on the right "INT" block and enter the same value as at thelefthand INT block. Also change the initialization value at the blockoutput:

• Y: From "0.0" to "10.0" (the initialization value of the output)The block output has this value when the block is first executed

The "SUB" block doesn't require any values to be changed. It acts asnegation element when it has the default value 0.0 at its input X1.

If you require more detailed information on a block, then select it andpress F1.

Thus, our small example has now been configured and the chart can becompiled and loaded.

Help for the blocktypes

Page 91: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-29Edition 03.2003

2.2.6 Compiling and loading into the target system

The graphically-created chart must now be compiled into the machinecode of the SIMADYN D target system.

Click on the tool bar:

(compile)

The "Compile" dialog box is displayed with the following entries:Target system: SIMADYN DCPU: 1 D01_P1

In the "Scope" field, you can now select whether the complete chartcontainer ("Compile everything") or only the changed objects ("Onlycompile changes") should be re-compiled. In this case, we wish to"Compile everything".

Compilation is initiated with "OK".The new dialog box is displayed. The compilation progress is displayed inthe new dialog box.

Before actual compilation, the system automatically executes aconsistency check. Before compilation, if you wish to check whethercompilation makes sense, you can first execute this consistency checkwith Chart > Consistency > Charts as program.

A dialog box with the "Compilation error-free" message is displayed aftercompilation.

Compilation has now been completed and the user program, which canbe loaded has been generated. In a next step, you can load the programinto a memory module for the SIMADYN D CPU.

Insert a SIMADYN D memory module into the PCMCIA slot ("socket") No.1 of your PC or in the OmniDrive (external PC card drive).

In the tool bar, click on

(load)

Select "System and user program" loading as scope in the "Load" dialogbox; and, "offline (OmniDrive)" as loading type. Start loading with "Load".The user program and the operating system of the CPU are loaded intothe memory module.

Insert the memory module, which was just loaded, into receptacle X01(module receptacle) of your SIMATIC TDC/SIMADYN D CPU and power-up the subrack.

Compiling

Consistency check

...after compilation

Insert the memorymodule in a PC

Loading

Starting the CPU

Page 92: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-30 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

The CPU runs-up and after a few seconds, CPU number "1" appears onthe display.

2.2.7 Monitoring and changing in the test mode

In the test mode, you can monitor the values of the block connections(block I/O) and you can change the values of the block inputs. Thevalues, registered for test, have a yellow background.

You can easily monitor the control characteristics by changing severalparameters, for example, how the manipulated value approaches thesetpoint and stabilizes.

Before you change over into the test mode, select the test mode"Laboratory operation" with Test > Laboratory operation. This meansthat all of the block connections (I/O), registered "for test" will beautomatically switched-in for "monitoring".

NOTE In the “process mode” no connection is preset for monitoring. In thistest mode, you must mark the appropriate blocks and explicitly registerthem for monitoring.

Activate the CFC test mode:

Click on the icon in the tool bar:

• (Testmodus)

or select Test > Test mode

In the status line, the text in green "Text: RUN (laboratory)" is displayed.

You can now see your oscillation circuit working, i. e. how the values ofthe connections, selected for the test, change. The values of the I/O havea yellow background.

In the test mode you can also change all of the values at the inputs whichhave not been interconnected. If you want to see how the characteristicschange when a value is changed, enter "5000ms" as integration time atthe lefthand INT block.

• Double-click on input "TI".

The "Properties - I/O" dialog box opens. Change the value for theblock input and acknowledge the new value with "OK".

In the chart, you can now see how the "Y" output changes significantlyslower as a result of the new input.

Testing theprogram

Changing-over intothe test mode

Activating the testmode

Monitoring

Change input value

Page 93: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-31Edition 03.2003

• Select input "X2" of the SUB block and remove the interconnectionwith Edit > Delete.

The interconnections between the output of the righthand integratorand the SUB block is deleted, thus interrupting the oscillation circuitfeedback.

In the chart, you can now see how the input- and output values of theblocks remain stationary.

• Select output "Y" of the righthand INTegrator, using the lefthandmouse key, and then input "X2" of the SUBtractor.

The interconnection between the output of the righthand integratorand the SUB block is re-established.

In the chart, you can now see how the values start to change again.

In the CFC test mode, you can insert additional function blocks online inthe chart and interconnect them with already configured blocks (offline).

To return to the create mode, deactivate the test mode. Click on

(test mode)

The create mode is now re-activated.

2.2.8 Generating documentation and closing project

Your example has been successfully configured and debugged (tested).You can now generate a complete set of documentation for this smallexample.

The chart reference data in this case are the "Cross references blocktypes" and the "Run sequence". On the tool bar click on

(Referenzdaten)

You can now generate and display the appropriate lists, using the iconsin the tool bar in the dialog box "Chart ref: Display chart reference data".You can then print these lists

(print)

Then close the dialog box with Reference data > Exit.

Deletinginterconnections

Re-establishinginterconnections

Insert and deleteblocks

De-activate testmode

Completedocumentation

Chart referencedata

Page 94: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-32 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

You also wish to print the chart. Only one page was used on this chart.This is the reason that we recommend the single-sheet print-out. Thechart is still set to "Page view". You can now start printing:

(print)

The project has now been completely created; you can now close theCFC Editor with Chart > Close. The CFC window is closed..

You can close the SIMATIC Manager with File > CloseThe window of the SIMATIC Manager is closed and you return to theWindows screen.

Print chart

Close

Page 95: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-33Edition 03.2003

2.3 Testing and commissioning

Before you can commission the complete software structure, you musttest its functionality in detail. To support commissioning, functions areintegrated in the CFC Editor to monitor values online and to makecorrections in the loaded software. These functions are described in thisChapter.

The CFC Editor has two edit modes:

• The create mode to configure charts

• Test mode to test and commission the configured user programs.

The functions of the CFC Editor for commissioning and test are providedin the two menus PLC and Test. With the PLC options, you can displayand change the status of the CPU presently being processed. With theoptions of the Test (debug) menu, you can directly influence the CPUprogram (at the target software).

The functions for test and commissioning can be sub-divided into thefollowing main groups:

• Functions when preparing for testing are:

– Loading the user program into the CPU (refer to 2.2.6)

– Viewing and changing the operating mode

– Checking that the configured software and CPU program match

– Changing the refresh rate for monitoring

– Working in the test mode

• Display functions for the CPUThe CPU supports you for system diagnostics by saving informationabout errors which have been identified. This is realized without anyspecific configuring work having to be done. This allows you toquickly identify and remove errors. When a fault condition occurs,standstill times can be significantly reduced.You can obtain information on the system diagnostics using thefunctions of the PLC > Module information.... menus

• Monitoring and parameterizing block I/OYou can monitor the values of all of the block I/O during operationand change the parameter values at the block inputs online.

• Creating and deleting interconnections:In the automation system you can create or delete interconnectionsbetween block I/O online.

Editing modes

Menus

Function groups

Page 96: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-34 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

• Inserting and deleting blocks:In the automation system you can insert and delete blocks into theCPU program which is running, online.

2.3.1 Viewing and changing the operating mode

A SIMATIC TDC/SIMADYN-D-CPU or an FM 458-1 DP can have variousoperating modes:

• Power offIn this mode, the system is not operational (it is powered-down). Theseven-segment display and LEDs are dark; communications with theCPU or the FM 458-1 DP cannot be established.

• INITIn this mode, the system initializes itself (runs-up). The seven-segment displays indicates "0" or the RUN LED flashes;communications with the CPU or FM 458-1 DP cannot be established.After this mode, the system goes into the following modes.

• RUNThis is the standard operating mode. The CPU or the FM 458-1 DPprocesses the configured user program. The status display shows theCPU number ("1" ... "8") or an error code "C", "E", "b" or "A". For anFM 458-1 DP, the RUN-LED is bright or one of the fault LEDs (CF, TF,MF, UF) is bright. In this mode, the CPU can be accessed online viathe local service interface and the configured service interfaces.An FM 458-1 DP can be accessed, online via the SIMATIC CPU or anappropriate SIMATIC CP.Using the "Cold restart" or "Stop" commands (refer below), it ispossible to go into the INIT mode or user stop mode.

• User stopThe CPU or FM 458-1DP only goes into this mode, if an explicit stopcommand is issued (refer below). A seven-segment display indicates"d" or the STOP LED of the FM 458-1 DP is bright.

for two CPUs: CPU with user stop: "d2 flashesother CPUs: "d" is continuously displayed

This mode is used to quickly load the user program into the CPU.Fast means that in this mode, cyclic processing (execution) isstopped, and the complete computational performance of the CPU orFM 458-1 DP is available for loading (STOP LED flashes for FM 458-1DP). Loading can be realized via the local service interface or via theconfiguring service interfaces for FM 458-1 DP via SIMATIC CPU orSIMATIC CP.Using the "Cold restart" command (refer below), it is possible to enterthe INIT state.

• STOP due to initialization errorThe CPU or FM 458-1 DP goes into this mode, if an error is identifiedin the INIT mode where it does not make sense to go into the RUNmode. An "O" or the STOP and IF LED of the FM 458-1 DP aredisplayed on the 7-segment display. In this state, the local CPU

Operating modes

Page 97: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-35Edition 03.2003

service interface as well as the initialization interface are available forloading and for fault diagnostics. For an FM 458-1 DP, the interface ofthe SIMATIC CPU or a SIMATIC CP can be used. It is possible, to gointo the INIT mode by issuing a "Cold restart" (refer below) command.

• STOP due to system errorsThe CPU or FM 458-1 DP goes into this state, if a fatal error wasidentified in one of the other states, so that the system should not gointo another operating state. An "H" or the STOP and INTF-LED of FM458-1 DP are displayed on the 7-segment display. In this state, onlythe local service interface is available for loading and errordiagnostics. For the FM 458-1 DP, in this state, the interface of theSIMATIC CPU or a SIMATIC CP can be used. It is possible to go intothe INIT state by issuing the "Cold restart" command (refer below).

For SIMADYN D, it is not possible to change thestate of individual CPUsfor SIMATIC TDC/SIMADYN D, due to the tight coupling between theCPUs; a mode change always involves the complete station.

You can restart the SIMATIC TDC/SIMADYN D station or an FM 458-1DP by either issuing a command from the PC, as described in thefollowing, switching the power supply voltage off and then on again oractivating the reset signal of the subrack power supply.

If you wish to view the operating mode and change it using CFC, then thefollowing conditions must be fulfilled:

• There must be a communications link between a CPU of the currentstation and your PC

• The create mode must be selected for all CPUs.

If you wish to view and change the operating mode using CFC, thenproceed as follows:

• Select the menu item PLC > Operating Mode ...; the associateddialog box is displayed.

• Press the "Cold restart" button if you wish to bring the station into theINIT mode; the "Stop" button, if you wish to change from the RUN intothe user stop mode.

For SIMATIC TDC/SIMADYN D, the CFC responds with a progressdisplay. After a short time, you can see at the station that the 7-segment displays of all of the CPUs inserted in the station have a newvalue.For an FM 458-1 DP, the appropriate change of state is displayed inthe same dialog box. The LEDs of the FM 458-1 DP also indicate thischange of state.After the state change, the PC re-attempts to establish acommunications link to the current CPU for SIMATIC TDC/SIMADYND and displays the new mode.

Prerequisites

Procedure

Page 98: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-36 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

(only for SIMATIC TDC/SIMADYN D):The interface assignment can change due to a state change. Forinstance, if you enter a restart command, in the "Stop due to user error"mode, via the initialization interface, then this has its configured functionafter restart and transition into the RUN mode.

Configure a service utility at the initialization interface, to be able to testand load using the CFC via the initialization interface, also in the RUNmode.

2.3.2 Checking that the configured data and the CPU program match

After loading the configured software the last time, changes could havebeen made, either in the CPU or FM 458-1 DP or in the CFC Editor(offline).

Thus, before you start testing (debugging) or commissioning the system,you should check that the configured software and program in the targetsystem match.

This check can be executed under the following conditions:

• There is a communications link between the CPU or FM 458-1 DPand your PC

Select the menu item PLC > Compare .... The "Compare" dialog boxopens. The CPU number, CPU name and the date of the last compilationare specified and compared with one another. The configured softwareand program in the target system are only consistent if the appropriateparameters are the same. In addition, a check is made as to whetheronline changes were made using another start-up tool, bypassing theCFC, or if offline changes were made, in the configured software.

If the configured software and program in the target system areinconsistent, you can only activate a restricted level of test operation,where it is only possible to view and change parameter values.

2.3.3 Changing the refresh rate for monitoring

The CFC Editor periodically interrogates the SIMADYN D CPU for thelatest I/O value so that the values can be dynamically updated. The usercan set this scan time.

If values are not refreshed within 300 % of this time, for example,because the data transfer capacity of the communications link is notsufficient, or the computation performance of your PC is being fullyutilized, then the values which have not been refreshed, are flagged asbeing faulted (refer to Section 2.3.6).

In this case, you should either reduce the number of registered values orincrease the refresh period.

Please observe

Recommendedconfiguring

Prerequisites

Procedure

NOTE

Page 99: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-37Edition 03.2003

If you wish to change the refresh rate for monitored values, then proceedas follows:

• Select the menu item Debug > Test Settings ...; the associateddialog box is displayed with a field for the refresh period, which can beedited.

• Enter new refresh periods in tenths of a second or select a new valueusing the arrow keys.

• Press the "OK" button; the refresh period then becomes valid for allvalues of the current CPU.

2.3.4 Activating and de-activating the test mode

Before you can view (monitor) values in a CPU or FM 458-1 DP, or makeonline changes, you must select the CFC test mode. The test functionscan only be activated after first changing into this mode.

In the test mode, only changes can be made in the configured software,which can be implemented and realized online. This is the only way toensure that the assignment of objects in the configured software matchthat of the objects of the program in the target system. Further you canalso make changes which only refer to the screen display and do notinfluence the program, e. g. shifting blocks. These basic functions can beactivated both in the test- as well as in the create mode.

The test mode refers to the CPU or FM 458-1 DP, which is associatedwith the currently active chart. The test mode must be individuallyenabled or disabled for every CPU or FM 458-1 DP being processed inthe CFC Editor.

When changing into the test- or into the create mode, the CFC still viewsthe current chart.

When changing into the test mode, it is checked as to whether the currentstatus of the configured software matches the change release of theprogram. If this is not the case, for example, because you changed theconfigured software in the CFC create mode since the last load of theprogram, then the appropriate message is displayed. You can nowactivate restricted test operation (debugging) (only "monitoring") whereyou can only view and change parameter values.

All of the changes made in the CFC test mode, are immediately andpermanently changed in the change memory (presently, EEPROM) of theSIMATIC TDC/SIMADYN D CPU or the FM 458-1 DP; i. e. when the CPUor the FM 458-1 DP is reset, these changes are kept. If the CFC systemcrashes in the test mode, then in order to achieve a consistent status, theprogram must be re-compiled and loaded. The changes which you madeup until the system crashed, still remain effective.

If the change memory is full or defective, structural changes (blocksdeleted, connections changed) are locally made in the RAM of the CPUor the FM 458-1 DP; however, they are not saved. This results in

Procedure

Changing betweenthe test- andsetting mode

Changes in the testmode

Page 100: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-38 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

inconsistencies with the configured software in the CFC. (For example, inthe CPU or the FM 458-1 DP, the connection is changed, but not in theCFC.

• Remedy for a full change memory: Re-compile the configuredsoftware in the CFC and load the memory card.

• Remedy for a defective change memory:Replace the memory card or reset the subrack.

There are two test operating modes:

• Process modeIn the process mode, the communications of the online update for theblocks is limited in order to only slightly additionally load the PC andbus. When switching-in the test mode, all of the blocks have the"monitoring off" status. In this test mode, you must select theassociated block I/O and explicitly register them for monitoring.

• Laboratory operationThe laboratory mode is selected to be able to efficiently test andcommission the system in a user-friendly fashion. In the laboratorymode, contrary to the process mode, communications of the onlineupdate for the CFC charts is not limited. When switching-in the testmode, all of the blocks have the "monitoring on" status.The test mode can be selected in the create mode using the menucommands in the "Test" menu. Changeover is not possible in the testmode.

The test mode is activated. A check mark is displayed next to the menuitem. Depending on the selected test mode, the text "test: RUN(laboratory)" or "Test: RUN (process mode)", with green background isdisplayed in the status bar. All of the menu functions, which are notpermitted in the test mode, are de-activated (light grey font).

NOTE If you made changes offline, or online using another start-up tool,bypassing the CFC, the "Different software release" dialog box isdisplayed. In spite of the fact that it is a different software release, thisstill allows you to changeover into the test mode.

! CAUTION If you go into the monitoring mode, in spite of the different softwarereleases, CFC can occasionally indicate erroneous situations, as thedisplayed parameter values, blocks and interconnections may notmatch with those in the target system.

This is how you de-activate the test mode:

Test-operatingmodes

Activating the testmode

De-activating thetest mode

Page 101: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-39Edition 03.2003

• Select the menu item Debug > Test Mode

The test mode is de-activated; the check mark next to the menu item andthe text in the status bar disappear.

This is how you activate the test mode:

• Select the menu item Test > Test Mode

2.3.5 Module status

During operation, and especially during start-up, the CPU or the FM 458-1 DP can identify an error condition of the configured system, e. g. if thetask cannot be calculated in one sampling time, because higher-prioritytasks fully utilize the available time. These statuses, which are alsogenerally identified by the appropriate 7-segment display value of theCPU or using an appropriate LED display for the FM 458-1 DP, can beanalyzed using the "Module status" function.

Further, when the CPU or the FM 458-1 DP goes into the STOPoperating mode due to a system error, it records the cause of the crash(the "exception") with information about the internal state. Thisinformation is available after restart.

The prerequisites to determine the module state is that you have firstdone the following:

• There is a communications link between the CPU or the FM 458-1 DPand your PC.

• The create mode is selected.

You can display the error fields of a CPU or the FM 458-1 DP as follows:

• Select the menu item PLC > Module Information....

• The dialog field "Module information" is opened

• Select the tab page "Error fields".The tab page "Error fields" isopened.

The contents of the internal error field of the current CPU or FM 458-1 DPare displayed as text here on the page under this tab.

They indicate the exceptions as follows:

• Select the menu item PLC > Module Information....

• The "Module information" dialog box is opened (module status).

• Select the "Exception buffer" tab. The page under the "Exceptionbuffer" tab opens.

Prerequisites

Displaying crashconditions

Page 102: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-40 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

The contents of the internal exception buffer of the current CPU orFM 458-1 DP are displayed as text on the page under this tab.

2.3.6 Monitoring block I/O

Connections (I/O) which have been registered for test, are supplied, inthe test mode with the actual values from the CPU or FM 458-1 DP if"monitoring" is enabled for these I/O.

The "Monitor block I/O" function can only be executed under the followingconditions:

• There is a communications link between the CPU or FM 458-1 DPand your PC.

• The page view of the chart is activated.

• The test mode (laboratory or process mode) is selected.

When the test mode is switched-in, for CFC charts in the ”Laboratory

mode”, the "monitoring on" function is also activated.

This means, that in the test mode, you can display how the values ofthose block I/O develop, which were registered for display. This meansthat the values are cyclically read-out of the CPU or FM 458-1 DP andare displayed. You can change the options for this dynamic value displayand the parameters of the I/O in the test mode.

In the "Process mode", the "Monitoring off" function is activated. Thismeans, that to dynamically update, you must first select the blocks (selectthem in the chart) which you wish to monitor; then select "monitoring on".

Vice versa, for an overload condition, you can exclude individual blocksfrom the monitoring function (select the block and select the menucommand "monitoring off").

Caution:If monitoring is switched-out and you select a connection and register this

for test via , then monitoring is switched-in for this connection and forall previously registered connections of this block.

When the test mode is switched-in, the connections to the CPU or FM458-1 DP are established for all listed connections of a value displaywindow. You can activate ”Monitoring” by marking the individualconnections in the ”Monitoring” column.

In the create mode or in the test mode (process or laboratory operation),you can register individual block or chart connections for test, byselecting the connection and selecting the menu command Test >

Prerequisites

Monitoring in the"Laboratory mode"

Monitoring in the"Process mode"

Registering/de-registeringconnections fortest

Page 103: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-41Edition 03.2003

Register connections or you can click on the icon in the functionbar.

In the test mode, monitoring is simultaneously switched-in, i.e. theconnection has a yellow background and is displayed with its actualvalue. If monitoring was switched-out for this block, then all of theconnections, which were previously registered for test, are also switched-in for monitoring.

You can de-register the connections by selecting the connection andselecting the menu command Test > De-register connections or you

can click on the icon in the function bar.

NOTE Alternatively: In the create mode, you can register and de-register allof the block connections for test if you call the "object properties" for aselected block and in the "connections" tab in the "For test" column, setor reset the marking of the individual connections.

You switch-in monitoring (to display the actual value of the connection)for the block connections, registered for test, as follows:

• Automatically when the test mode is switched-in in the laboratorymode.

• With the menu command Test > Monitor on or using the icon inthe function bar. In the laboratory mode, this function applies for allblocks; in the process mode, only for the blocks previously selected inthe chart.

• By selecting the menu command Test > Monitoring off or using the

icon, you can disable the monitoring function, i.e. the connectionvalues are not longer updated.In the laboratory mode, this applies for all blocks; in the processmode, only for the blocks selected in the chart.

All of the input and output values, switched-in for monitoring are updatedaccording to the set monitoring cycle.

Connections,switching-in/switching-outmonitoring

Page 104: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-42 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

The values are output next to the connections corresponding to their datatype. They are shown on the screen with colored background (refer toTable 2-1).

Blue on white Values displayed in the create mode (offline)Black on yellow, stars Values displayed during the changeover to

dynamic value displayBlack on yellow, value Values read-out of the CPU/FM 458-1 DP

displayed in the test mode#### on a red background Values, requested from the CPU/FM 458-1

DP and which are not available, aredisplayed (error condition)

Table 2-1 Displaying values in the CFC Editor (pre-setting)

2.3.7 Parameterizing block I/O

An important task at start-up (commissioning) of a control system isoptimizing the control parameters, i. e. setting the correct parametervalues at the block inputs.

With this function, you can change the values at the inputs of the blocksduring operation and simultaneously monitor the effects in the controlprocess.

! CAUTION Please observe that death, severe bodily injury or significantmaterial damage can occur if changes such as these are madewith the system connected to the process and without havingtaken the appropriate precautionary measures.

The "Parameterize block I/O" function can be made under the followingconditions:

• There is a communications link between the CPU/FM 458-1 DP andyour PC.

• The page view of the chart is activated.

• The test mode is selected.

In order to change an input (not connected) then proceed as follows:

• Double-click on the input which is not connected, and whose valueyou wish to change. The dialog box "I/O properties" is displayed.

• Enter the required parameter value in the "Value" input field.

• By pressing the "OK" button, the value is transferred into the workingmemory of the CPU/FM 458-1 DP and into the configured software.The dialog box is then closed.

Representation ofthe dynamic valuedisplay

Prerequisites

Procedure

Page 105: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-43Edition 03.2003

NOTE The default for the output value cannot be changed online. This is alsotrue for function blocks which have been newly inserted.

2.3.8 Creating and deleting interconnections

For SIMATIC TDC/SIMADYN D/FM458-1 DP, you can make changes tothe control structure during operation; this also includes "Creating anddeleting interconnections".

! CAUTION Please observe that death, severe bodily injury or significantmaterial damage can occur if changes such as these are madewith the system connected to the process and without havingtaken the appropriate precautionary measures.

The "Creating and deleting interconnections" function can be executedunder the following conditions:

• There is a communications link between the CPU/FM 458-1 DP andyour PC.

• The page view of the chart is activated.

• The test mode is selected.

• The configured software and CPU/FM 458-1 DP are consistent.

To interconnect an input, which was previously not connected, to anoutput, proceed as follows:

• In the chart, using the left mouse key, mark the output which you wishto interconnect to the input; the color of this output changes.

• Position the mouse pointer in the chart to the input which up until nowhas not been interconnected and which you now wish to connect.Depress the left mouse key. The interconnection is now displayed asa line in the chart. At the same time, a data connection is establishedbetween the I/O in the working memory of the CPU/FM 458-1 DP.

To remove an interconnection between an input and an output, proceedas follows:

• Select the block input in the chart, which you wish to remove and thendelete the interconnection with Edit > Delete.The connecting line between the connections disappears, and the lastvalue, which was transferred at the data connection, is displayed asparameter value at the input.

NOTE: Interconnections to global operands can neither be created onlinenor deleted online.

Prerequisites

Creatinginterconnections

Deletinginterconnections

Page 106: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-44 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

2.3.9 Inserting and deleting blocks

For SIMATIC TDC/SIMADYN D/FM 458-1 DP, you can make changes tothe control structure during operation; this also involves "Inserting anddeleting blocks".

! CAUTION Please observe that death, severe bodily injury or significantmaterial damage can occur if changes such as these are madewith the system connected to the process and without havingtaken the appropriate precautionary measures.

This function can be made under the following conditions:

• There is a communications link between the CPU/FM 458-1 DP andyour PC.

• The test mode is selected.

• The block catalog is open (menu item View > Catalog)

To insert blocks online, proceed as follows:

• In the block catalog, select the required block type, and with the leftmouse key, drag it to the required position at a free location in thechart.

• The block is simultaneously inserted in the software as well as in theworking memory of the CPU/FM 458-1 DP at the standard insertionposition of the run sequence.

Note Some block types cannot be inserted online. If these block types areselected, an error message is output.

In order to delete blocks online, proceed as follows:

• Remove all connections from the outputs of the block to the inputs ofthe other blocks. Proceed as described in Section 2.3.8. Connectionsto global operands do not have to be deleted.

• Position the mouse pointer in the chart at the block to be deleted andpress the right mouse key. A pop-up menu is displayed.

• In this pop-up menu, select the item "Delete", the block is deleted fromthe chart and is no longer processed in the working memory of theCPU/FM 458-1 DP.

Prerequisites

Inserting blocks

Deleting blocks

Page 107: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-45Edition 03.2003

Proceed as follows to change the number of I/O of a generic block online:

• Position the mouse pointer in the chart at the associated block anddepress the righthand mouse key. A pop-up menu is displayed.

• In this pop-up menu, select No. I/O ...; a dialog box is displayed inwhich you can select the required number of block I/O.

NOTE It is not permissible that a connection has been registered formonitoring. Generic blocks are, e.g. adders and multiplexers.

2.3.10 Communication interfaces

For SIMATIC TDC/SIMADYN D, you can structure the communicationlinks between the PC and CPU in several ways.

The local service interface of the CPU (front panel connector) isprovided by the system (and is therefore always available). This serialinterface permits communications with the CPU itself in the operatingmode STOP after fatal system errors ("H" on the CPU display).

For a single-processor system (e. g. T400) this is the only interface fortest and start-up. If this interface is to be used to load and test (debug)multi-processor systems, then the connecting cable must always beinserted at the actual CPU.

Thus, to test multi-processor systems, we recommend a configuredservice interface. This allows the service connection for a completestation to be made available at one or several communication interfaces.System-wide bus operation for test and start- up (commissioning) ispossible if an SS52 MPI module is used as interface module for thisconnection instead of the serial SS4 module.

Even when first commissioning a station, you are not limited to just alocal interface. Communications via the so-called initialization interfaceis possible as soon as there is a certain level of harmonization betweenthe CPUs of a station (this can be identified by a "0" on the CPU display)(only for SIMADYN D).

For example, the CPU programs for a complete station can be loadedonline via this interface, without having to changeover cables.

For the FM 458-1 DP application module, the communications linkbetween the PG/PC and the module is always established via theinterface of a SIMATIC CPU or a SIMATIC CP in the same rack (as isusual for SIMATIC).

When using the local service interface, this must be connected with a freeserial interface of the PC (COM1 or COM2).

Changing the I/Onumber of genericblocks

Local serviceinterface

Page 108: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-46 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

How a configured service interface is handled, depends on whether aserial SS4 module or an SS52 MPI module is used for the interface.

If an SS4 interface is used, this should be connected with a free serialinterface of the PC (COM1 or COM2).

The connecting cable uniquely defines the station to be addressed andthe SS4 interface to be used.

When an SS52 or CP50M0 MPI interface is used, the station cannot beuniquely defined, as several SS52 MPI connections of a single stationcan be connected to the same bus. The configured software can tell youwhich MPI connections have been configured for the station, but the PCdoes not know which of these connections it should use.

In this case, the PC checks all of the configured connections one after theother, until it can establish a communications link to the "Service" utility ofthe CPU. The PC can then use this connection for communications.

NOTE In order to access a CPU via the configured service interface, you mustinclude an appropriate service utility function block in your configuredsoftware.If you require more information, refer to the Chapter "Service utility" inthe User Documentation "System- and communication configuring D7-SYS".

The initialization interface is always the top connection of the CS7module which is inserted at the far left in the subrack. To be used asinitialization interface, either an SS4 module or SS52 module must beinserted here. This connection can only be used as initialization interface,as long as the CPUs of the station are in the operating mode "STOP dueto an initialization error".

The connection between the CFC and the "Service" utility of a CPU/FM458-1 DP is essentially automatically established. You must only insertthe serial connecting cable at the correct SS4 module and at a free serialinterface on the PC (COM1 or COM2) or the MPI bus cable at theappropriate SS52/ CP50M0 module or the appropriate SIMATIC CPU forFM 458-1 DP and at the PC MPI port.

You tell the CFC which communications interface is to be used. To dothis, start the program via the Windows 95/NT task bar Start > Simatic >STEP 7 > Set PG/PC interface and select the right alternative. Thisselection is kept even after you power-down your PC.

You must set the correct operating parameters of the MPI interface atyour PC if you wish to establish an online connection via the MPIinterface. Refer to the help info for the dialog box to obtain information asto how you should proceed.

Configured serviceinterface

Initializationinterface

Creatingconnections

Selecting thecommunicationsinterface

Setting the MPIinterface

Page 109: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-47Edition 03.2003

The baud rate for the MPI interface must coincide with the couplingpartner.

NOTE The maximum baud rate for the particular protocol may not beexceeded.

When establishing a connection in the test mode and changing the CPUmode, the CFC checks whether it is connected with the correct CPU/FM458-1 DP; if this is not the case, the connection is canceled and anappropriate message is output.

When establishing the connection for online loading, the CFC checkswhether it is connected with the correct CPU/FM 458-1 DP; if this is notthe case, you are prompted as to whether you still wish to load.

In all other cases no check is made.

Checks whenestablishing aconnection

Page 110: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-48 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

2.4 Creating block types

If you have installed the "D7 SYS" software package, you automaticallyhave access to the block types in the standard "FBSLIB" block library.You can use these to configure your system in the CFC. You can importadditional standard block libraries (FBSLDC, FBSLT1, FBSWCC andFBSLSL). Further, you can create the block types yourself, by creating auser library from charts.

2.4.1 Creating a user library from charts

If you always re-use certain functions when configuring your system inthe CFC, you can create block types from charts. A user library is createdwhen compiling the charts. The block types in this library can be usedwhen configuring your system, just like the existing function blocks fromthe standard block libraries.

NOTES • All charts of a chart folder are compiled and combined in a userlibrary.

• The interface of a chart, which is to be compiled, is the futureinterface of the appropriate block type. The interface comprises themargins at the lefthand and righthand side of a CFC chart. Theycontain, on one hand, the references to the interconnected objects –e.g. other blocks or task groups, which are not on the actual sheet.On the other hand, they contain the number of the connection(transition point) if the autorouter cannot draw the connecting line tothe margin because the sheet is too full.

• Init values at blocks within a chart, which becomes a chart block,are not taken into account; this means that a block with Init values atthe outputs behaves differently as a single block (Init value) thanwithin a chart block (no Init value).

• The libraries created are saved in the "s7cfc\sdblocks" directory ofthe STEP 7 installation. If you wish to work with a symbolicrepresentation of the created block types, then you can locate thebitmaps which you created ("block type name.bmp" type) in the"s7cfc\sdblocks\icons" directory.

Page 111: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-49Edition 03.2003

• The names of all chart interfaces must be unique:1 to 3 alphanumeric characters, only upper case letters, the 1st

character must be a letter.

• The name of the created block type must be unique:1 to 6 alphanumeric characters, only upper case letters, the 1st

character can be a letter or a "@", a "_" is also permitted for the 2nd to6th characters.

• The library name must be unique:1 to 6 alphanumeric characters, only upper case letters, the firstcharacter must be a letter; a "_" is also permitted for the 2nd to 6th

characters.

The CFC chart is subject to specific rules, if it is to be compiled in a blocktype for SIMATIC TDC/SIMADYN D or FM 458-1 DP:

• Only top charts can be compiled in block types.

• The chart may not include any other charts (chart nesting is notpermissible). Block types, created with CFC are permitted.

• Interconnections between charts are not permitted.

• No pseudo comments may be configured at the interface I/O of thechart and the blocks contained in them.

• All of the blocks must be located in the same task. In this task, theblocks of the chart must follow one another directly.

• The chart folder to be compiled may never contain any run-timegroups.

• If the chart includes blocks, which has attributes, then the block type,created with CFC also takes on these attributes.

• Global operands must be routed through to the chart interface.

• For SIMATIC TDC/SIMADYN D or FM 458-1 DP, a block type mayhave a maximum of one symbolic hardware address (global operand).

Before you create a user library from the chart, you must have completedthe following preparatory steps:

1. You must have created a chart folder in SIMATIC Manager. Thesystem library "FBSLIB" is automatically imported into this chart folder.

2. You have configured the charts in CFC.

3. In CFC, you parameterized, for each chart, which is to be compiled, achart interface.

4. In CFC, you opened a chart of the chart folder to be compiled

Name syntax

Restrictions

Prerequisites

Page 112: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-50 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

In order to create a user library from charts, proceed as follows:

1. Make a consistency check, in order to check that the charts can becompiled as block types:Select the menu command Chart > Consistency Check > Chart asBlock.

NOTE The "Check the charts as block types" dialog box is displayed. If youpress key F1 with the dialog box opened, you will receive additionalhelp.

2. Compile the charts as block types:Select the menu command Charts > Compile > Chart as Block.

NOTE The "Create a library from charts" dialog box is displayed. If you presskey F1 with the dialog box open, you obtain additional help.

3. Import the created library in order to use the created block types toconfigure your system.

2.5 Chart reference data-documentation

This Chapter describes how you can create the chart reference data forcomprehensive documentation of your CFC configuring structure.

2.5.1 Chart reference data

In addition to graphic CFC displays, you can display and print thefollowing information in list form using the "Chart reference data" function:

• Cross referencesListing the accesses to different objects.

• Run sequenceThe complete run sequence of a CPU.

You can check the structure of your configured software in this fashion.

You can display and print the following chart reference data lists:

• Cross references, operandsThe list shows all of the global operands, used in the project togetherwith the elements which they access.

• Cross references run-time groupsThe list shows which run-time groups are accessed from any CFCcharts.

• Cross references block typesThe list shows the block types used and the positions(CFC chart) where they are used.

Procedure

Cross-referencelists

Page 113: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-51Edition 03.2003

2.5.1.1 "Cross reference operands" list

This is a list of the global operands, used on the CPU/FM 458-1 DP withthe block connections which are used to connect them.

You can output this list viaOptions > Reference data > View > Cross references Operands

Fig. 2-6: Chart reference data: Cross references, operands

Column title SignificanceIcon For SIMADYN D, emptyOperand Name of the global operandsData type Code word for the data type usedR/W For SIMADYN D, always W, i. e. write accessChart Name of the chart from which the operands are

accessedChart element Name of the interconnected

block and I/OElement comment Block commentType Block type (e.g. INT)

Table 2-2: Cross-references of the operands

List structure

Page 114: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-52 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

2.5.1.2 "Cross-reference run-time groups" list

The list contains, for all run-time groups of the active CPU/FM 458-1 DP,the access operations to the enable of the task group from any CFCcharts (block I/O).

You can output this list viaOptions > Reference data > View > Cross references Run-timegroups

Column title SignificanceRun-time group Group nameR/W Reading (R) or writing (W)Chart Name of the CFC chartChart element Name of the interconnected block and I/OElement comment Block commentType Block type (e. g. INT)

Table 2-3: Cross-references of the run-time groups

2.5.1.3 "Cross-references block types" list

The list of block types indicates where these are used. This can be usefulwhen administering the blocks, for example, before deleting a block typewhich you think is not used, you can use the cross-reference list toindicate whether this particular block type is used or not.

You can output this list viaOptions > Reference data > View > Cross references Block types

Column title SignificanceBlock type Name of the block type (e. g. INT)Chart Name of the CFC chart in which the block is usedBlock Name of the instance block (e. g. integrator1)Block comment Block comment

Table 2-4: Cross references of the block types

Page 115: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 2-53Edition 03.2003

2.6 Technical data

2.6.1 Field/name lengths and conventions

Object Length Comment

Chart 22 *) **) The following characters may not be used: \ . : / * ? " < > | # %

Chart comment 255 All ANSI characters are permitted.Run-time group 22 Character scope as for "Chart"Task 22 Character scope as for "Chart"Block type 6 Defined by SIMADYN D.CommentBlock instance

80 All ANSI characters are permitted.

Parameter name 4 Defined by SIMADYN D.The 1st character may not be a digit (0-9).

Parameter comment 80 All ANSI characters are permitted.Block name(instance name)

16 *) **) The following characters may not be used: \ . : / * ? " < > | # %

Global operand max. 14 Depending on the global operand type- $ signal name 14 All ANSI characters with the exception of, ‘*’, ‘!’ and ‘$’- Hardware address 16 All ANSI characters with the exception of, ‘*’, ‘!’ and ‘$’- Virtual connection name

6 1st character: ‘A’ ... ‘Z’additional characters: ‘A’ ... ‘Z’, ‘0’ ... ‘9’, ‘_’

Symbol name 12 All ANSI characters with the exception blanks, ‘*’, ‘!’, ‘$’, '#' and '"'- Sequence number 4 "1" ... "9999"- Name reference 6 1st character: ‘A’ ... ‘Z’

additional characters: ‘A’ ... ‘Z’, ‘0’ ... ‘9’, ‘_’- Module name 6 1st character: ‘A’ ... ‘Z’

additional characters: ‘A’ ... ‘Z’, ‘0’ ... ‘9’, ‘_’or "0"

- Partial connector name 3 1st character: ‘A’ ... ‘Z’additional characters: ‘A’ ... ‘Z’, ‘0’ ... ‘9’, ‘_’

*) The chart- and block name together may only be a maximum of 24 characters,including the separator

**) If the "Create address book" compile option is activated, thenthis name must have the syntax of STRUC Version 4.2:1st character: ‘A’ ... ‘Z’additional characters ‘A’ ... ‘Z’, ‘0’ ... ‘9’, ‘_’

Table 2-5: Name lengths

Page 116: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

CFC

2-54 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

2.6.2 Data types

Code Code word Name Bits

BO BOOL Logical number 8BY BYTE 8-bit sequence 8DI DINT Double integer number 32

DW DWORD 32-bit sequence 32GV GLOBAL To interconnect to global operands -

I INT Integer number 16R REAL Floating point number 32S STRING Character sequence, any length 256 bytes

TS SDTIME High-resolution time period in the SIMATICTDC/SIMADYN D format

32

W WORD 16-bit sequence 16

Table 2-6: data types

2.7 Abbreviations

AG Automation unitsAP User programCFC Continuous Function ChartCPU Central Processing UnitFB Function blockIBS Start-upIEC International Electrical CommissionMPI Multi Point InterfaceMS MicrosoftOS Operator StationPC Personal ComputerPG ProgrammerPLC Programmable logic controllerSFC Sequential Function ChartSINEC Siemens Network ArchitectureSTEP 7 Software development environment for SIMATIC S7/M7 and SIMATIC

TDC/SIMADYN D/FM 458-1 DP

Page 117: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 3-1Edition 03.2003

3 SFC

3.1 Basics of the SFC 3-3

3.2 Tips & Tricks 3-4

3.3 Creating Sequential Control Systems (SFC Editor) 3-6

3.4 Sequential control systems on the PLC 3-16

3.5 Using the Control Block 3-20

3.6 Documenting Programs 3-20

Overview

Page 118: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

3-2 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

This section is supplementary documentation for SIMATICTDC/SIMADYN D and only includes deviations and special featureswith respect to the S7 target system.

A detailed description is provided in the online help for the SFC for thetarget system S7 andStart > Simatic > Dokumentation > Englisch > SFC Manual for S7.

Data types

The data types CHAR, DATE, S5TIME, STRING, TIME, TIME_OF_DAY,are not permissible for SIMATIC TDC/SIMADYN D. SDTIME, TS datatype is also included.

Global addresses (operands)

For SIMATIC TDC/SIMADYN D, global addresses (operands) are notpermissible as addresses (operands) in assignments of steps orcomparisons from transitions in SFCs.

Messages

SFCs do not generate messages in the SIMATIC TDC/SIMADYN Dtarget systems.

Run properties

For SIMATIC TDC/SIMADYN D, the location of the chart is irrelevant forits processing;the run properties of the chart are defined by the location of theassigned function block (type: SFC), which must be configured foreach SFC.

SFC operation for SIMATIC TDC/SIMADYN D is a new feature. Thismeans, that there are no older projects which have to be changed-over.

Introduction [SD]

Restrictions andexpansions [SD]

Changing-overfrom older projectsto SFC V5.x [SD]

Page 119: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 3-3Edition 03.2003

3.1 Basics of the SFC

3.1.1 SFC in the STEP 7 environment [SD]

The following STEP 7 components are of significance when working withthe SFC for SIMATIC TDC/SIMADYN D:

The SIMATIC Manager is used to set-up and change a project structure(SIMATIC TDC /SIMADYN D stations, SIMADYN D programs, CFCcharts, SFC charts) and to startthe CFC or SFC editor as well as compiling charts.

The following diagram shows how the CFC and SFC are embedded inthe STEP 7 environment:

SIMATIC TDC / SIMADYN D

SIMATIC Manager

STEP 7STEP 7 components

SFCCFC

3.1.2 SFC and technology hierarchy [SD]

The technology hierarchy cannot be used for SIMATIC TDC/SIMADYN D.

3.1.3 Setting-up the project structure [SD]

Contrary to SIMATIC S7, for SIMATIC TDC/SIMADYN D it is not possibleto use PCS7 and the S7 Assistant. You can only create a new project viathe menu commands.

3.1.4 SFC-Elements

3.1.4.1 What are chart elements? [SD]

The elements of a SFC chart are, for SIMATIC TDC/SIMADYN D, thesame as for SIMATIC S7. However, contrary to [S7], you cannot accessother SFC charts or global operands of the user program.

Page 120: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

3-4 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

3.2 Tips & Tricks

3.2.1 Generate reference data [SD]

Reference data cannot be generated for SIMATIC TDC/SIMADYN D. Thedisplay functionality is not available.

3.2.2 Configuring SFC calls [SD]

Configuring hierarchic SFC-chart calls for SIMATIC TDC/SIMADYN D issomewhat different than for SIMATIC S7. The reason for this is that SFCcharts have no EN connection.Instead, the inputs and outputs of the associated SFC block (in CFC)must be used.

In order to control the "SFC-Slave1" and "SFC-Slave2" charts using anSFC chart "SFC-Coord", configure as follows (the SFC block for "SFC-Slave1" would be configured as "Slave1" and the SFC block for "SFC-Slave2" as "Slave2" in the CFC chart "SFCs"):

• The previous transition of the step, which should activate "SFC-Slave1", must ensure that the "SFC-Slave1" is ended. This isguaranteed using the following condition in the transition propertiesdialog box:

SFCs.Slave1.QRU = 0

• The step to activate the "SFC-Slave1" must generate a rising edge atinput RUN of the associated block. The following instructions in theproperty dialog box of the step generate the required behavior:

Under the “Initialization” tab:SFCs.Slave1.RUN = 1

Under the “Processing” tab:SFCs.Slave1.RUN = 1

Under the “Termination” tab:SFCs.Slave1.RUN = 0

The subsequent transition (following transition) must ensure that the"SFC-Slave1" was ended; i.e. the transition contains the followingcondition in its properties dialog box

SFCs.Slave1.QRU = 0

The control of SFC-Slave2 via SFC-Coord is realized in a similar fashion.

The above representation is only valid, if the slaves are running in theautomatic mode. In the manual mode, additional statuses can beaccepted, which can then also be processed.

Hierarchic SFC-chart calls

Page 121: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 3-5Edition 03.2003

For SIMATIC TDC/SIMADYN D, contrary to SIMATIC S7, the user has novariables, which exist independent of a function block (single data cells).This means, that in this case connections of dummy blocks (e. g.NOP1_B) must be used, which can fulfill the same function.

Coordinating SFCcharts

Page 122: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

3-6 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

3.3 Creating Sequential Control Systems (SFC Editor)

3.3.1 Working with Charts

3.3.1.1 Copying charts [SD]

For SIMATIC TDC/SIMADYN D, charts are essentially copied the sameas when copying to the SIMATIC S7 target system.

3.3.2 Configuring Sequential Control Systems

3.3.2.1 Creating a jump [SD]

Creating and changing jumps for SIMATIC TDC/SIMADYN D isessentially the same as the SIMATIC S7 target system. However,generally, the subsequent compilation run rejects jumps in and out ofsimultaneous sequences as being erroneous.

3.3.2.2 Step: Editing addresses [SD]

The left address can be:

• A block input of a block which has not been linked into a CFC chartSyntax: <chart name>.<block name>.<I/O name>

• A run-time (turn on/off)Syntax: <group name>.EN (enable)

The right address can be:

• A block I/O of a block on a CFC chartSyntax: <chart name>.<block name>.<I/O name>

• A run-time group (state, turn on/off)Syntax: <group name>.EN (enable)

• A constantSyntax: Depending on the data type

For data types, BOOL, BYTE, INT, DINT, WORD, DWORD, instead ofthe absolute numerical values, their symbolic value designations can alsobe specified.

Using an additional dialog box, you can edit or select addresses for thestatements. The dialog box is opened using the “Browse...” button. Thethird possibility is to drag the block I/O from the CFC charts and directlydrop them in the box for the address (drag&drop).

Selectingaddresses

Page 123: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 3-7Edition 03.2003

The "Browse" dialog box contains two different tab sheets: "CFC Charts"and "Run-Time Groups". When you browse (e.g. CFC Charts), all of theavailable objects of the chart folder are found and displayed.

Using the "Filter" button, you can limit the list of I/Os; in other words, onlydisplay those currently relevant at the present stage of the configuration.

You can then select the required chart and then the block and I/O. Clickthe "Apply" button to enter your selection in the active address box (ordrag and drop with the mouse). The dialog box remains open until youclose it explicitly with the "Close" button or you close the "ObjectProperties" dialog box.

Accesses to CFC blocks can also be modified in the associated CFCchart. However, this modification is restricted to "Re-connecting" SFCaccesses, i.e. moving the access to another block I/O (with ALT +drag&drop).

To allow the value identifiers to be displayed in the SFC, the option"Parameter: Value identifier" must be selected inOptions > Customize > Layout....

If you insert a block I/O with a value identifier in the address field, thevalue identifier is also entered in the right (empty) address field. If there ismore than one value identifiers for this I/O, you can open the comboboxwith the value identifiers in the right address field by pressing the keycombination ALT + DOWN. In the drop-down list box, you can select therequired value identifier for this address.

When making textual entries, make sure that the names are consistent. Asymbol that does not exist in the symbol list (or a referenced symbol thatis subsequently re-named) cannot be checked in the editor and isassumed to be correct. Such inconsistencies show up when you compileor run the consistency check.

• In the addresses, you can reference CFC block I/Os whose blockdoes not yet really exist in the CFC chart providing that it does existas block type in the block folder of the S7 program. These statementsare displayed in the statement line on a yellow background and the"virtual" block is listed in the CFC catalog of "Unplaced blocks".

• When you enter a virtual reference, you can specify a block name inthe statement, that is not yet known in the CFC chart. The specifiedblock I/O must, however, actually exist in a block type contained in theblock folder. A list of the block types that have this I/O is displayed inthe "Select Address Type" dialog box. After you select the requiredblock type, CFC creates a block instance and stores it in the CFCcatalog of "Unplaced blocks". This can be identified in the catalog bythe index “R" (R = reference). The same appearance and marking isalso used if a previously real reference becomes a virtual referencewhen the reference block is deleted.

• Before you compile, these virtual accesses must be converted toreal accesses (in other words, the relevant block must be placed inthe CFC chart), otherwise compilation is stopped with an error.

Note

Value identifiers

Editing addresses

Notes

Page 124: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

3-8 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

The statement "<run-time group>.EN := ON" starts a run-time group. Arun-time group is de-activated using the statement "<run-time group>.EN:= OFF". You can therefore enable or disable the processing of CFCblocks and FCS charts in a run-time group with one statement.

• When you enter statements, they are checked for consistency so thatthe correct syntax and semantic formulation is guaranteed. Theprogram, for example, also checks whether the data types of thelogically combined addresses are compatible.

• If the specified addresses is recognized as address type unknown, adialog box is opened in which you can enter more detailedinformation. Here, you can assign a CFC access, an SFC chart, a run-time group or a symbol to the address as the type with thecorresponding data type. You can save your entry with “OK”, but itcannot be compiled until the address is defined (this results in an errormessage).

If you want to see where an operand is used, select the address (or placethe cursor in the field associated with the address), and click on the “Goto” button to jump to the relevant chart (or double-click on the address). Ifthe address is an input or output of a block in the CFC chart, the relevantblock is selected.

The "Go to" function cannot be used for run-time groups

3.3.2.3 Transition: Editing addresses [SD]

You can enter addresses textually or as described in “Step: Editingaddresses” using the “Browse” dialog. The advantage of browsing is thatthe addresses are then unique. As a third possibility, you can also dragthe block I/Os from the CFC charts directly to the box for the address(drag and drop).

As when selecting addresses for the steps, you can also enter the valueidentifiers of the I/Os for the transitions (refer there).

If you make a selection in a CFC chart with "Browse" or by dragging withthe mouse, the entries also include the path of the plant hierarchy (if thisexists). The hierarchy path and chart name are separated by a doublebackslashes ( \\ ).

Access to CFC blocks can also be modified in the relevant CFC chart.This modification is, however, restricted to "Re-connecting" SFCaccesses; in other words, moving the access to another block I/O (withALT + drag&drop).

With the condition

• <run-time group>.EN = ON

• <run-time group>.EN = OFF

you can query whether an SFC chart is activated or de-activated.

EN attributes

Notes

Go to point of use

Note

EN Attribute

Page 125: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 3-9Edition 03.2003

When you enter conditions, they are checked for consistency so thatcorrect syntax and semantic formulation of the conditions is guaranteed.The program also checks whether the data types of the logicallycombined address are compatible.

The pre-configured logic is normally adequate. If you require morecomplex formulations, you can create them with blocks in a CFC chartand enter the results calculated in the chart as the address for transitionconditions.

If you want to see where an address is used, select the address (orlocate the cursor in the field associated with the address), and click onthe “Go To” button to jump to the relevant chart. If the address is an inputor output of a block in the CFC chart, the relevant block is selected.

The "Go To" function cannot be used for run-time groups.

3.3.3 Shared Adresses and Permitted Data Types

3.3.3.1 Global addresses (operands) [SD]

For SIMATIC TDC/SIMADYN D, global addresses (operands) are notpermissible as addresses (operands) in assignments of steps orcomparisons from transitions in SFCs.

3.3.3.2 Absolute addressing [SD]

Absolute addressing is not possible for SIMATIC TDC/SIMADYN D.

3.3.3.3 Symbolic addressing [SD]

For SIMATIC TDC/SIMADYN D, it is not possible to address operandsvia the symbol table (symbolic addressing).

3.3.3.4 Permissible data types [SD]

The following data types when formulating actions and conditions in theSFC are permissible for SIMATIC TDC/SIMADYN D:

Data type Permissiblein the step

Permissible inthe transition

BOOL, BO Yes YesBYTE, BY Yes YesDINT, DI Yes YesDWORD, DW Yes YesINT, I Yes YesREAL, R Yes YesSDTIME, TS Yes YesWORD, W Yes Yes

Note

Go to point of use

Page 126: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

3-10 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

3.3.4 The Run-Time Properties

3.3.4.1 Overview of the run-time properties [SD]

For SIMATIC TDC/SIMADYN D, the location of the chart is irrelevant forits processing;the run-time properties of a SFC chart are defined by the location ofthe assigned function block (type: SFC), which must be configuredfor every SFC chart.

The run-time properties of the SFC block determine how the SFC chart isincluded in the processing of the entire structure on the target system.These properties are decisive for the response of the PLC (target system)in terms of response times, deadtimes or the stability of time-dependentstructures, for example, control loops.

The run-time properties are defined using the “Run-time property dialogbox”.

SFC function blocks can be incorporated in run-time groups, whichmeans that they have the attributes of the run-time group (scan rate,phase).

For SIMATIC TDC/SIMADYN D, only the following constant values arepermissible:

• Scan rate = 1

• Phase shift = 0

3.3.4.2 Specifying the run sequence [SD]

There are various ways of editing the run sequence of SFC charts. Therun sequence involves the positions of the associated SFC blocks in thetasks and run-time groups.

3.3.4.3 Installing an SFC chart in a task / deleting from a task [SD]

The generation system automatically incorporates every SFC chart into atask. This does not have to be done twice as for SIMATIC S7, and is alsonot possible. In addition, for each SFC chart, a SFC function block mustbe incorporated in a CFC chart, whose input SFC, must be tagged withthe name of the SFC chart.

Note

Page 127: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 3-11Edition 03.2003

This block carries the SFC functionality. Using the name configured at theSFC input, it searches the associated SFC chart and interprets this asprogram. This is the reason that only the position of the block within thetask is decisive for the run position of the SFC chart.However, we recommend that the SFC chart is directly located in front ofthe associated block, so that there is no confusion regarding where theSFC chart is processed.In order to avoid confusion regarding the run-time properties of the SFCchart, you should

• always configure the associated SFC chart in front of the appropriateSFC block

• and when deleting, remove the SFC chart as well as the associatedSFC block.

If you configure an SFC block in an interrupt task, please observe, thateach time that the task is activated, the SFC block is only run once.

3.3.4.4 Run-time attributes for the run-time group and SFC chart [SD]

For SIMATIC TDC/SIMADYN D, there is no enable attribute for an SFCchart. Instead, you can use input EN of the associated SFC functionblock (on=1, off=0).

For SIMATIC TDC/SIMADYN D, the location of the chart is irrelevant forits processing; the run-time properties of the chart are determined by thelocation of the assigned function block (type: SFC), which must beconfigured for every SFC. This block can be incorporated in a run-timegroup.

You can enable and disable a run-time group using the enable attribute.

The attributes

• Scan rate

• Phase

cannot be directly assigned to an SFC chart. Instead, only byincorporating the associated function block in a run-time group, fromwhich it receives the selected attributes. However, for SIMATICTDC/SIMADYN D, only a scan rate of 1 and a phase shift of 0 arepermissible.

If SFC blocks of a CPU are to run with different run-time attributes, thenthese SFC charts must be incorporated in different run-time groups.

The SFC chart has no run-time properties of its own (which it canchange). This is the reason that the object properties cannot be openedin the run sequence for the selected SFC chart.

Note

Enable attributes ofthe SFC chart

Run-time attributesfor the run-timegroup

Page 128: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

3-12 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

You can generate a run-time group in the window of the run sequence

(call using or Edit > Run sequence... ) using the menu commandInsert run-time group... .Enter the name, if required a comment and the run attribute for scan rateand phase shift in the dialog box.

Incorporate the SFC block into the run-time group as usual (this is donejust like incorporating a task).

You can run SFC blocks in various cyclic tasks by incorporating them inrun-time groups. (This allows the project to be better structured from atechnological perspective).

3.3.5 Configuruing Messages

3.3.5.1 How SFC works with messages [SD]

SFCs do not generate any messages in the SIMATIC TDC/SIMADYN Dtarget systems.

3.3.6 Compiling Charts

3.3.6.1 Customizing the compiler [SD]

You can call-up a dialog box using the menu item Options > Customize> Compilation. This allows you to make the following settings:

1. In which directory should buffer files be saved, which are generatedduring compilation?

2. Should an addressbook be generated or not?

If you activate this option, when compiling, it is ensured that you havemaintained the correct syntax for STRUC Version 4.2 for the chart, blockand $ signal names.

1. Should a maplisting of the user program be generated or not?

2. Which function block types should be able to be inserted online inthe CFC test mode?

• Only block types which have been already configured

• The block types of the standard "FBSLIB“library

• Block types from all imported libraries

Here, you can define for which hardware, block libraries are to beimported into a chart folder without hardware assignment via HWConfig:

• Select the control box “SIMATIC TDC”, if you wish to configuresoftwarefor SIMATIC TDC.

Note

Note

Default hardware

Page 129: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 3-13Edition 03.2003

• De-select the control box “SIMATIC TDC”, if you wish to configuresoftwarefor SIMADYN D.

For chart folders with hardware assignment, the block libraries, whichautomatically match the hardware, are imported.

Select the control box “All I/O”, if you wish to generate a file with all I/O.

Select the control box “String I/O”, if you wish to generate the file, whichonly contains the string I/O.

The procedure for “Customize the compiler [SD]” is identical with that ofthe CFC.

3.3.6.2 Compilation procedure [SD]

• Select the menu command Chart > Compile as Program... or click

on .A dialog box opens, where you can either select compile "Entireprogram" (all of the charts are compiled), or compile "Changes only"(only those objects which were changed since the last compilation,are compiled) and the compilation of an individual SFC. The selectionis made using the option switches.

• Select the compilation type "Compile all", "Compile only changes" or“Only compile individual SFC”. In the latter case, you must still searchfor the SFC, which you wish to compile, using the selection box. Thenstart compilation by entering “OK”.

• The selected compilation scope of the charts of the current program(chart folder) are checked for consistency and are subsequentlycompiled.

A dialog box with a progress bar is displayed while compiling. You canstop compilation at any time by pressing the “Cancel” button.

The result of the consistency check and all of the messages which wereoutput when compiling, can be read and printed in the dialog box "Logs”(menu command Options > Logs...).

You can also run a consistency check without compilation. To do this,select the menu command Chart > Consistency check....

3.3.6.3 Consistency check [SD]

Before the actual compilation run, in addition to the consistency checks ofthe CFC compilation, the system automatically makes consistencychecks at the SFCs:

• Checks, whether all of the blocks, which are accessed by SFCconditions or statements still exist.

Note

Generate file for allI/OGenerate file forstring I/O

Note

This is how youcompile yourconfigured charts:

Logs

Note

Page 130: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

3-14 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

• Checks, whether the jump target names, specified for jumps, are usedin the same SFC as step names.

• Checks, that jumps do not lead to simultaneous sequences.

You can also make these consistency checks without subsequentcompilation. For example, if you wish to check whether compilationmakes sense at all.

Proceed as follows:

• Select the menu command Chart > Consistency check....This checks all of the charts of the current chart folder.

• After the check has been completed, the result is displayed in the"Logs" dialog box. The log can be read or printed-out at a later time, ifyou select, in the SFC, the menu command Options > Logs... (or inSIMATIC Manager Options > Charts > Logs...).

The procedure for the “Consistency check [SD]” is identical with that forthe CFC.

3.3.7 Downloading User Programs

3.3.7.1 Downloading programs [SD]

In order to run a user program on a CPU, it must be first loaded.

The user program, compiled from the CPU charts, is downloaded into theparticular CPU, which is assigned the active chart window. The userprogram is transferred into the CPU program memory. However, it is stillnot active.

The new CPU program only becomes active if the CPU is restarted (referto View and change operating statuses).

You can either load the user program offline or online.

This is how you download the user program:

1. Select the menu item PLC > Download...2. The "Download" dialog box is opened.

3. Define the scope of the software to be downloaded:• Generally, it is sufficient to only load the configured software ("Only

user program ") which reduces the download time. However, if theCFC recognizes that the operating system release has changed sincethe last time that data was downloaded into this CPU, then the newversion of the operating system is automatically downloaded.

• If no software has been previously downloaded into the CPU, youmust download the complete software ("System and user program")into the CPU.

Note

Page 131: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 3-15Edition 03.2003

• If only an individual SFC was revised and compiled, then you candownload this online. In this case, select the “online” and “onlyindividual SFC” options. In the activated selection box, you can selectthe SFC which still have to be downloaded.

4. Specify how the PC can access the program memory:• During start-up, generally, you will leave the memory module with the

user program in the CPU, and appropriately select the "online" option.

• For "offline", you must remove the memory card from the CPU, andinsert it in the appropriate PCMCIA-slot of your PC.

5. To start downloading, initiate the Download function. The CFCresponds with the progress bar when downloading.

6. After downloading has been completed, the new user program is inthe CPU program memory. This becomes active the next time thatthe station is restarted.

The procedure when “Downloading programs [SD]” is identical with thatof CFC.

Note

Page 132: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

3-16 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

3.4 Sequential control systems on the PLC

3.4.1 Overview of sequential control systems on the PLC [SD]

For SIMATIC TDC/SIMADYN D:

• Not a control block in the S7 sense, but instead an SFC function block(block type: SFC), which must be configured for each SFC chart.

Basically no phase shift and no scan rate for run-time groups, becauseonly the following constant values are permissible:

• Scan rate = 1

• Phase shift = 0

3.4.2 How a chart is executed [SD]

For SIMATIC TDC/SIMADYN D, cyclic interrupts are implemented asinterrupt tasks.

The operating system evaluates specific events, and executes the SFCchart according to these events. Such events are, e.g.:

• Warm restartThe SFC chart is automatically called for initialization.

• Interrupt tasksThe SFC chart is executed in the interrupt task, in which it wasconfigured using the run-sequence editor.

The assignment of an SFC chart to the events must be explicitly carried-out using the run-sequence editor, i.e. the chart must be incorporated inthe appropriate task (directly or in run-time groups). Call in the SFC: Edit> Run sequence...).

3.4.3 The operating modes [SD]

The following operating modes, can be selected using the SFC block:

• Manual, and

• Automatic

3.4.4 Chart execution options [SD]

The behavior of SIMATIC TDC/SIMADYN D corresponds to that ofSIMATIC S7.

Page 133: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 3-17Edition 03.2003

Using the chart execution options, you can define how the chart behaves.The individual execution options can be combined with one another. Thefollowing chart execution options are available and can be changed in the"Chart > Properties: Operating Parameters PLC" dialog box:

• For "Command output: On”, the actions of the active steps areprocessed.

• For "Command output: Off”, the actions of the active steps are notprocessed.

During installation and commissioning, or if errors occur, blockingcommand output in conjunction with certain operating modes, can bringthe sequential control system into a defined state without influencing theprocess.

• With "Cyclic operation: On”, the initial step of the SFC chart isactivated again after the final step is de-activated.

• With "Cyclic operation: Off”, the sequential control system is set to the"IDLE" state after the final step has been de-activated; i.e. no stepsare active and more actions and no more transitions are executed.

• For "Time monitoring: On”, after activating a step, the active time ofthe step is compared with the monitoring time (object properties of thestep, tab sheet "General", option "Maximum run time") and a steperror is signaled if this time is exceeded.

• For "Time monitoring: Off", the active time and monitoring time are notcompared.

An SFC chart with the “Autostart: On” property starts immediately after aCPU warm restart without any further operator input. After downloadingchanges (the CPU does not go into the STOP condition), there is noautomatic start and the SFC chart must be started again by the operatoror using the control block.

The setting for "Autostart" can only be changed in the dialog box Chart >Properties > Tab: Operating Parameters.

With the chart execution option "Use default operating parameters whenSFC starts: On", all of the default settings / options, set in the run-timeproperties become effective again when the SFC chart is started. Forexample, the options which were changed in the test mode.

3.4.5 Behavior of a sequential control system [SD]

Sequential control system behavior depends on the operatingparameters: Operating state, mode, step module mode and the chartexecution options.

You can set the operating parameters when testing and commissioning(with the exception of “Auto start”); this parameter can only be set in theChart properties dialog box under the "Operating Parameters PLC" tab).

What are chartexecution options?

Command output

Cyclic operation

Time monitoring

Autostart

Use defaultoperatingparameters whenthe SFC starts

Page 134: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

3-18 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

• Operating mode Manual (operator mode)

• Step control mode T (process control)

• Chart execution options:

− command output On

− cyclic operation Off

− time monitoring Off

• Further options

− auto start Off

− use default operating parameterswhen starting the SFC start Off

The following operating mode is set after the PLC runs-up:

• Operating mode OFF (if auto start = off)ON (if auto start = on)

When starting the SFC chart, the behavior depends on the chartproperties.

Auto operationWhen the chart starts, the SFC block parameters are used.

Manual operationWhen the chart starts, the defaults of the SFC block or the actual SFC-chart parameters are used.

Depending on the setting of the operating parameters (Chart >Properties: Operating Parameters PLC) or in the test mode, option:"Use the default operating parameters when SFC starts", the actualvalues are kept, or these values are overwritten by default values.

3.4.6 The operating states [SD]

Refer to the SFC help for the SIMATIC S7 target system.

The function of the control block (SFC_CTRL), forSIMATIC TDC/SIMADYN D, is assumedby the SFC block.

3.4.7 The commands [SD]

The behavior of SIMATIC TDC/SIMADYN D corresponds to that ofSIMATIC S7.

In the test mode, you can set or modify the operating states using thefollowing commands:

Default settings ofthe PLC operatingparameters

Behavior whenstarting [SD]

Note

What do thecommands do?

Page 135: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS 3-19Edition 03.2003

This command changes the sequential control system from the “IDLE”,"ABORTED" or "TERM" into the “RUN” state. This means that the chartis immediately processed. The initial step automatically becomes active,if its are executed and the results of the successor transitions of the initialstep are evaluated.Exception: If, in the test mode, a step was selected as target step, thenwhen starting, the initial step isn’t activated, but instead, the target step.

This command changes the sequential control system from the “HOLD”state to the ”RUN” state. This means that the SFC chart is continued,transition results are evaluated, the actions are executed and the chartprogresses according to the selected step control mode.

Exception: If a step was selected as the target step in the test mode, theheld SFC chart resumes the target step after correct processing of theinterrupted steps when the "Resume" command is set. This means thatthe cyclic processing of these steps is executed a maximum of oncemore and the termination overlaps the initialization of the target step inthe same cycle.

This command changes the sequential control system from the “HOLD”state to the “ABORTED” state. The active steps are processedcompletely and then the final step. Existing target step selections areignored and deleted.This allows the sequential control system to be brought into a definedstate.

This command changes the sequential control system from the “RUN”state to the ”HOLD” state. This means that the SFC chart is stopped, thetransition results are not evaluated, the actions are not executed, and acommand must be issued before the chart can continue.

This command changes the sequential control system from the “HOLD”state to the ”RUN” state. The active steps are de-activated, the initial stepis activated and its actions executed.

3.4.8 SFC Elements of the PLC

3.4.8.1 Phases of a step [SD]

For SIMATIC TDC/SIMADYN D, there is no difference to the targetsystem SIMATIC S7.

3.4.8.2 Processing steps and transitions [SD]

For SIMATIC TDC/SIMADYN D, there is no difference to the targetsystem SIMATIC S7.

Start / ResumeMeaning of "Start"

Meaning of"Resume"

Abort

Hold

Restart

Page 136: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

SFC

3-20 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

3.5 Using the Control Block

3.5.1 The control block [SD]

For SIMATIC TDC/SIMADYN D, the function of the monitoring block isundertaken by the SFC block.

3.5.2 Inputs of the control block [SD]

For SIMATIC TDC/SIMADYN D the control block function is taken fromthe SFC block.

3.5.3 Outputs of the control block [SD]

For SIMATIC TDC/SIMADYN D the control block function is taken fromthe SFC block.

3.6 Documenting Programs

3.6.1 Logs [SD]

The logs are not part of the complete documentation of the configurationstructure, but can however supply important information duringconfiguring (engineering) and commissioning, if, for example, errors haveoccurred.

The tab sheets described here are also relevant for the SFC.

Using the Options > Generating logs... menu command, you can opena dialog with several tab sheets. The tab sheets are only available, if theappropriate functions were actually executed.

You can print-out the messages by pressing the “Print” button. You canselect the layout using the “Page set-up” button.

This lists the messages which were output when compiling or whenmaking a consistency check (including the compiler messages); e.g. if ajump to target was not available: "Error in transition ‘3’: The specifiedjump target is not available in the SFC."

Generating logs

Tab sheet: Compile

Page 137: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS I-1Edition 03.2003

Index

$$ signals............................................................................................................................. 1-31, 2-10

Block I/O ...................................................................................................................................2-10Bus............................................................................................................................................2-10Interconnectability.....................................................................................................................2-11Type..........................................................................................................................................2-10

AActivate

Test mode.................................................................................................................................2-30Activating

Test mode.................................................................................................................................2-38Allocating I/O addresses..............................................................................................................1-28Archive file ...................................................................................................................................1-47Archiving program

Properties .................................................................................................................................1-47Archiving programs......................................................................................................................1-47Archiving projects ........................................................................................................................1-48

BBlock catalog

Open .........................................................................................................................................2-26Block connections

Configuring operator control and monitoring attributes ............................................................2-16Monitor......................................................................................................................................2-40

Block I/O$ signals....................................................................................................................................2-10Hardware addresses ................................................................................................................2-12Module names ..........................................................................................................................2-12Monitoring .................................................................................................................................2-33Name references ......................................................................................................................2-13OP connection ..........................................................................................................................2-12Parameterizing................................................................................................................ 2-33, 2-42Process interrupts.....................................................................................................................2-13Virtual connection names .........................................................................................................2-11Virtual connections ...................................................................................................................2-11

Block I/OsProperties ...................................................................................................................................2-8

Block inputsInverting ......................................................................................................................................2-8

Block interconnections...................................................................................................................2-9Block library

Check..........................................................................................................................................2-5Checks........................................................................................................................................2-6

Page 138: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Index

I-2 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

Creating ....................................................................................................................................2-48Deleting.......................................................................................................................................2-6Importing.....................................................................................................................................2-5

Block outputsValues .........................................................................................................................................2-8

Block typesCreating ....................................................................................................................................2-48Handling......................................................................................................................................2-5Help...........................................................................................................................................2-28Inserting ......................................................................................................................................2-6

BlocksDelete........................................................................................................................................2-31Deleting.....................................................................................................................................2-44Edit............................................................................................................................................2-27Insert ............................................................................................................................... 2-25, 2-31Inserting ....................................................................................................................................2-44Interconnect ..............................................................................................................................2-27Operator control and monitoring...............................................................................................2-15

Bus$ signals....................................................................................................................................2-10

CCFC

Embedded...................................................................................................................................2-2Start ..........................................................................................................................................2-25

CFC chartOpen .........................................................................................................................................2-25

ChangeInput value ................................................................................................................................2-30Run sequence...........................................................................................................................2-27Test mode.................................................................................................................................2-30

Change object properties.............................................................................................................1-16Changes

in the test mode ........................................................................................................................2-37Changing

between the test- and setting mode .........................................................................................2-37Refresh rate ..............................................................................................................................2-36

ChartPrint...........................................................................................................................................2-32

CheckBlock library ................................................................................................................................2-5Establishing a connection .........................................................................................................2-47

Check consistency.......................................................................................................................1-29Checks

Block library ................................................................................................................................2-6Communication connections........................................................................................................1-31Communication interfaces ...........................................................................................................2-45Communications bus ...................................................................................................................1-13Communications interface

Selecting ...................................................................................................................................2-46Compilation

Muli-processing.........................................................................................................................2-18Settings .....................................................................................................................................2-18

Compiling .....................................................................................................................................2-29

Page 139: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Index

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS I-3Edition 03.2003

Chart as block type...................................................................................................................2-48Interrelationships ......................................................................................................................2-17Scope........................................................................................................................................2-17User program............................................................................................................................2-17

Complete documentation.............................................................................................................2-31Configuration load........................................................................................................................1-29Configuration save.......................................................................................................................1-29

1-301-27

Configured service interface........................................................................................................2-46Configuring ..................................................................................................................................1-24Configuring operator control and monitoring attributes ...............................................................2-16Configuring PROFIBUS DP.........................................................................................................1-30Connection

Creating ....................................................................................................................................2-46Connections.................................................................................................................................2-43

Creating ....................................................................................................................................2-43Deleting.....................................................................................................................................2-43

Consistency check.......................................................................................................................2-29Chart as block type...................................................................................................................2-50

Containers for the software .........................................................................................................1-13Container "Charts" ....................................................................................................................1-13

CPUStarting .....................................................................................................................................2-29

Crash conditionsDisplaying .................................................................................................................................2-39

Create objects..............................................................................................................................1-15Create project ..............................................................................................................................1-18Create station ..............................................................................................................................1-19Creating

Block types ...............................................................................................................................2-48Connection................................................................................................................................2-46Connections..............................................................................................................................2-43

Creating a configuration...............................................................................................................1-24Cross references

Block types ..................................................................................................................... 2-50, 2-52List ............................................................................................................................................2-50Operands ........................................................................................................................ 2-50, 2-51Run-time groups ............................................................................................................. 2-50, 2-52

DData flow

Description..................................................................................................................................2-4Project planning data..................................................................................................................2-4

Data type .....................................................................................................................................2-54GLOBAL .....................................................................................................................................2-9STRING ......................................................................................................................................2-9

De-activatingTest mode.................................................................................................................................2-38

De-archiving projects ...................................................................................................................1-49Delete

Blocks .......................................................................................................................................2-31Deleting

Block library ................................................................................................................................2-6

Page 140: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Index

I-4 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

Blocks .......................................................................................................................................2-44Connections..............................................................................................................................2-43

Diagnostics ..................................................................................................................................1-41Diagnostics buffer ........................................................................................................................1-44Diagnostics events.......................................................................................................................1-42Diagnostics in the CFC ................................................................................................................1-45Diagnostics in the SIMATIC Manager..........................................................................................1-42Diagnostics information ...............................................................................................................1-43Diagnostics interface ...................................................................................................................2-45Dialog box ....................................................................................................................................1-17Display functions .......................................................................................................................2-33Display units.................................................................................................................................1-34Displaying

Crash conditions .......................................................................................................................2-39DOCPRO .....................................................................................................................................1-50Dynamic value display

Start ..........................................................................................................................................2-42

EEdit

Blocks .......................................................................................................................................2-27Editing

Block inputs ................................................................................................................................2-8Editing block inputs ........................................................................................................................2-8Editing modes ..............................................................................................................................2-33Enable attribute............................................................................................................................2-14Entry dialog boxes

Global operands .......................................................................................................................2-10Error classes ................................................................................................................................1-42Error report

Block library ................................................................................................................................2-6Establishing a connection

Check........................................................................................................................................2-47

FField

Length .......................................................................................................................................2-53Function groups ...........................................................................................................................2-33Functions when preparing for testing...........................................................................................2-33

GGenerate software .......................................................................................................................1-21Generating software

Procedure .................................................................................................................................1-22Global operand ............................................................................................................................1-34

Interconnection ...........................................................................................................................2-9Types ..........................................................................................................................................2-9

HHardware

Inserting ....................................................................................................................................2-23

Page 141: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Index

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS I-5Edition 03.2003

Hardware addresses....................................................................................................................2-12Block I/O ...................................................................................................................................2-12

HelpBlock types ...............................................................................................................................2-28

I2-19

Initialization interface ...................................................................................................................2-45Input value

Change .....................................................................................................................................2-30Inputs

Parameterizing..........................................................................................................................2-27Insert

Blocks ............................................................................................................................. 2-25, 2-31Inserting

Block library ................................................................................................................................2-6Blocks .......................................................................................................................................2-44Hardware ..................................................................................................................................2-23Software....................................................................................................................................2-24

Installing from a CD-ROM..............................................................................................................1-3Interconnect

Blocks .......................................................................................................................................2-27Interconnectability

$ signals....................................................................................................................................2-11of data types ...............................................................................................................................2-9

InterconnectionDeleting.....................................................................................................................................2-31Re-establishing.........................................................................................................................2-31

Interconnections ..........................................................................................................................2-43Inverting

Block inputs ................................................................................................................................2-8

LLength

Field ..........................................................................................................................................2-53Name ........................................................................................................................................2-53

Link-in hardware signals in the CFC............................................................................................1-29Loading

2-19Offline .......................................................................................................................................2-19Online .......................................................................................................................................2-19Prerequisites.............................................................................................................................2-20User program.................................................................................................................. 2-19, 2-29

Local service interface .................................................................................................................2-45

MMap listing....................................................................................................................................2-18Module information in the CFC....................................................................................................1-45Module information in the SIMATIC Manager .............................................................................1-44Module names .............................................................................................................................2-12

Block I/O ...................................................................................................................................2-12Module status ..............................................................................................................................2-39

Page 142: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Index

I-6 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

Determine prerequisites............................................................................................................2-39Monitor

Test mode.................................................................................................................................2-30Monitoring

Block connections.....................................................................................................................2-40MPI interface................................................................................................................................2-46MPI network .................................................................................................................................1-13Multi-processing...........................................................................................................................2-18

NName

Length .......................................................................................................................................2-53Name references .........................................................................................................................2-13

Block I/O ...................................................................................................................................2-13

OObject hierarchy...........................................................................................................................1-12Offline loading .................................................................................................................... 1-37, 2-19

Loading interface ......................................................................................................................1-37Offline-Laden ...............................................................................................................................1-37Online help.....................................................................................................................................1-9Online loading .................................................................................................................... 1-35, 2-19

Interfaces ..................................................................................................................................1-35OP connection .............................................................................................................................2-12

Block I/O ...................................................................................................................................2-12OP connection data ..................................................................................................................2-12

Opening objects ...........................................................................................................................1-15Operating modes .........................................................................................................................2-34

INIT ...........................................................................................................................................2-34Power off...................................................................................................................................2-34Prerequisites.............................................................................................................................2-35RUN ..........................................................................................................................................2-34STOP due to initialization error.................................................................................................2-34STOP due to system errors ......................................................................................................2-35User stop...................................................................................................................................2-34

Operating status...........................................................................................................................1-46Operator control and monitoring ..................................................................................................2-15

PParameterizing.............................................................................................................................1-24

Block I/O ......................................................................................................................... 2-33, 2-42Inputs ........................................................................................................................................2-27

Parameterizing modules ..............................................................................................................1-281-5

PrerequisitesLoading .....................................................................................................................................2-20Operating modes ......................................................................................................................2-35

PrintChart .........................................................................................................................................2-32

Print preview ................................................................................................................................1-50Printing.........................................................................................................................................1-50Process interrupts ........................................................................................................................2-13

Page 143: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Index

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS I-7Edition 03.2003

Block I/O ...................................................................................................................................2-13PROFIBUS master ......................................................................................................................1-30Programs

assigned ...................................................................................................................................1-21non-assigned ............................................................................................................................1-21

ProjectSet-up .......................................................................................................................................2-23

Project planning dataData flow.....................................................................................................................................2-4

Project structureSet-up .......................................................................................................................................2-23

Projects ........................................................................................................................................1-11

RRe-establishing

Interconnection .........................................................................................................................2-31Reference data .................................................................................................................. 2-31, 2-50Refresh rate

Changing ..................................................................................................................................2-36Requirements

Software......................................................................................................................................2-2Run sequence..............................................................................................................................2-14

Change .....................................................................................................................................2-27Run-time attributes ......................................................................................................................2-14Run-time groups ..........................................................................................................................2-13Run-time properties .....................................................................................................................2-13

SSave project.................................................................................................................................1-22Select modules ............................................................................................................................1-28Select racks .................................................................................................................................1-27Selecting

Communications interface ........................................................................................................2-46Service interface

Configured ................................................................................................................................2-46Local .........................................................................................................................................2-45

Setting object properties ..............................................................................................................1-16Setting-up the printer ...................................................................................................................1-50Set-up

Project.......................................................................................................................................2-23Project structure........................................................................................................................2-23

SFCAbsolute addressing ...................................................................................................................3-9Compilation procedure .............................................................................................................3-13Configuring SFC calls.................................................................................................................3-4Consistency check....................................................................................................................3-13Copying charts............................................................................................................................3-6Creating a jump ..........................................................................................................................3-6Customizing the compiler .........................................................................................................3-12Downloading programs.............................................................................................................3-14Element of chart..........................................................................................................................3-3Generate reference data ............................................................................................................3-4Global addresses (operands) .....................................................................................................3-9

Page 144: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Index

I-8 STEP 7 option packages for D7-SYS - SIMATIC D7-SYSEdition 03.2003

How SFC works with messages ...............................................................................................3-12Installing an SFC chart in a task / deleting from a task ............................................................3-10Introduction .................................................................................................................................3-2Overview of sequential control systems on the PLC ................................................................3-16Overview of the run-time properties .........................................................................................3-10Permissible data types................................................................................................................3-9Restrictions and expansions.......................................................................................................3-2Run-time attributes for the run-time group and SFC chart .......................................................3-11Setting-up the project structure ..................................................................................................3-3Specifying the run sequence ....................................................................................................3-10STEP 7 environment...................................................................................................................3-3Step, Editing addresses..............................................................................................................3-6Symbolic addressing...................................................................................................................3-9Transition, Editing addresses .....................................................................................................3-8

SFC:.................................................................................................................3-16, 3-17, 3-18, 3-20SIMATIC Manager .........................................................................................................................1-4Software

Inserting ....................................................................................................................................2-24Requirements .............................................................................................................................2-2

SS52 configuration as slave ........................................................................................................1-30Start

CFC...........................................................................................................................................2-25Dynamic value display ..............................................................................................................2-42

StartingCPU ..........................................................................................................................................2-29SIMATIC Manager ....................................................................................................................2-22

Starting to print.............................................................................................................................1-50Station..........................................................................................................................................1-13STEP 7

Components ...............................................................................................................................2-2

TTask .............................................................................................................................................2-13Test mode ....................................................................................................................................2-37

Activate .....................................................................................................................................2-30Activating ..................................................................................................................................2-38Change .....................................................................................................................................2-30De-activating.............................................................................................................................2-38Monitor ......................................................................................................................................2-30

Testing programs.........................................................................................................................1-39Top chart......................................................................................................................................2-49Type

$ signals....................................................................................................................................2-10

UUser library...................................................................................................................................2-48User program

Compiling..................................................................................................................................2-17Loading ........................................................................................................................... 2-19, 2-29

VVirtual connection names ............................................................................................................2-11

Page 145: SIMATIC D7-SYS CFCdownload.gongkong.com/file/2007/3/3/d7sys_option_e.pdf · from other manufacturers which have been approved or recommended by Siemens. SIMATIC and SIMADYN D

Index

STEP 7 option packages for D7-SYS - SIMATIC D7-SYS I-9Edition 03.2003

Block I/O ...................................................................................................................................2-11Virtual connections ............................................................................................................ 1-33, 2-11

Block I/O ...................................................................................................................................2-11

WWinCC..........................................................................................................................................2-15