Wago Manual Step7 a114802e

Embed Size (px)

Citation preview

  • Using iPar-Server option with PROFIsafe modules V2 iPar in combination with PROFIBUS DP and PROFINET (Step 7 V5.5 / TIA Portal)

    Application note

    A114802, English Version 00.03.03

  • 2 General

    Application note

    A114802

    Copyright 2010 by WAGO Kontakttechnik GmbH & Co. KG

    All rights reserved.

    WAGO Kontakttechnik GmbH & Co. KG

    Hansastrae 27

    D-32423 Minden

    Phone: +49 (0) 571/8 87 0

    Fax: +49 (0) 571/8 87 1 69

    E-mail: [email protected]

    Web: http://www.wago.com

    Technical Support

    Phone: +49 (0) 571/8 87 5 55

    Fax: +49 (0) 571/8 87 85 55

    E-mail: [email protected]

    Every conceivable measure has been taken to ensure the accuracy and

    completeness of this documentation. However, as errors can never be fully

    excluded, we always appreciate any information or suggestions for improving

    the documentation.

    We wish to point out that the software and hardware terms, as well as the

    trademarks of companies used and/or mentioned in the present manual, are

    generally protected by trademark or patent.

    mailto:[email protected]://www.wago.com/mailto:[email protected]
  • Contents 3

    Application note

    A114802

    TABLE OF CONTENTS

    1 Important Notes .......................................................................................... 9

    1.1 Legal Principles ........................................................................................ 9

    1.1.1 Copyright ............................................................................................. 9

    1.1.2 Personnel Qualification ....................................................................... 9

    1.1.3 Intended Use ........................................................................................ 9

    1.2 Scope of Validity .................................................................................... 10

    1.3 Symbols .................................................................................................. 11

    2 General ....................................................................................................... 12

    2.1 Terms of Use .......................................................................................... 12

    3 WAGO-I/O-SYSTEM Basics ................................................................... 14

    3.1 General ................................................................................................... 14

    3.2 Using the WAGO-I/O-SYSTEM with PROFIBUS DP ......................... 14

    3.2.1 General ............................................................................................... 14

    3.2.2 GSD File ............................................................................................ 14

    3.2.2.1 Download Internet ......................................................................... 14

    3.3 Using the WAGO-I/O-SYSTEM with PROFINET ............................... 17

    3.3.1 General ............................................................................................... 17

    3.3.2 GSDML file ....................................................................................... 17

    3.3.2.1 Download Internet ......................................................................... 17

    3.4 Using the WAGO-I/O-SYSTEM with PROFIsafe ................................. 20

    3.4.1 General ............................................................................................... 20

    3.4.2 Required Software Tools ................................................................... 20

    3.4.3 Operating Principles .......................................................................... 20

    3.4.3.1 Safety Program .............................................................................. 20

    3.4.3.2 "Edit safety program" Function ..................................................... 21

    3.4.3.3 Fail-safe I/O DB ............................................................................ 21

    3.4.3.3.1 PASS_ON ................................................................................ 22

    3.4.3.3.2 ACK_NEC ............................................................................... 22

    3.4.3.3.3 ACK_REI ................................................................................. 22

    3.4.3.3.4 IPAR_EN ................................................................................. 23

    3.4.3.3.5 PASS_OUT .............................................................................. 23

    3.4.3.3.6 QBAD ....................................................................................... 23

    3.4.3.3.7 ACK_REQ ............................................................................... 23

    3.4.3.3.8 IPAR_OK ................................................................................. 23

    3.4.3.3.9 DIAG ........................................................................................ 24

    3.4.4 Assignment of the Hardware Configuration to F-Periphery-DB ....... 25

    3.4.4.1 Using PROFIBUS-DP ................................................................... 25

    3.4.4.2 Using PROFINET ......................................................................... 26

    3.4.4.3 Note about assigned F-Periphery-DBs .......................................... 27

    3.4.5 Data Transfer and Data Access .......................................................... 28

    3.4.5.1 Standard Program to the Safety Program ...................................... 28

    3.4.5.2 Safety Program to the Standard Program ...................................... 29

    3.5 Required WAGO Tools .......................................................................... 30

    3.5.1 WAGO-I/O-CHECK ......................................................................... 30

    3.5.2 WAGO Safety Editor 75x .................................................................. 30

  • 4 Contents

    Application note

    A114802

    4 iPar-Server Technology ............................................................................ 31

    5 Function Blocks iPar Option WAGO ...................................................... 33

    5.1 Motivation iPar Option ........................................................................... 33

    5.2 General ................................................................................................... 33

    5.3 Overview of Block Functions ................................................................. 34

    5.3.1 Setup and Structure of Block Calls .................................................... 34

    5.3.2 Implemented Function Blocks ........................................................... 35

    5.3.2.1 Input Function Blocks ................................................................... 35

    5.3.2.1.1 INIT_FB, Type BOOL ............................................................. 35

    5.3.2.1.2 RESET, Type BOOL ................................................................ 35

    5.3.2.1.3 CHECK_CFG, Type BOOL ..................................................... 35

    5.3.2.1.4 UPLOAD_REQ, Type BOOL .................................................. 36

    5.3.2.1.5 DOWNLOAD_REQ, Type BOOL ........................................... 36

    5.3.2.1.6 COMPARE_REQ, Type BOOL ............................................... 36

    5.3.2.1.7 DIAG_DATA_REQ_REQ, Type BOOL ................................. 36

    5.3.2.1.8 SELECT_MODULE, Type DWORD ...................................... 37

    5.3.2.1.9 READ_DIAG_DATA, Type BOOL ........................................ 37

    5.3.2.1.10 ACT_DATE, Type DATE........................................................ 38

    5.3.2.1.11 ACT_TIME, Type TIME_OF_DAY ........................................ 38

    5.3.2.1.12 iPar_DB_NB, Type BLOCK_DB ............................................ 38

    5.3.2.1.13 MODULES_PLUGGED, Type INT ........................................ 38

    5.3.2.1.14 SLAVE_DP_PN, Type BOOL ................................................. 38

    5.3.2.1.15 ADR_MOD_x, Type INT ........................................................ 39

    5.3.2.1.16 F_PER_DB_MOD_x, Type BLOCK_DB ............................... 39

    5.3.2.1.17 TYPE_MOD_x, Type INT ....................................................... 39

    5.3.2.2 Output Function Blocks ................................................................ 40

    5.3.2.2.1 INIT_OK, Type BOOL ............................................................ 40

    5.3.2.2.2 UPLOAD_ALL_MODULES, Type BOOL ............................. 40

    5.3.2.2.3 BUSY, Type BOOL ................................................................. 40

    5.3.2.2.4 DONE, Type BOOL ................................................................. 40

    5.3.2.2.5 DONE_ALL_MODULES, Type BOOL .................................. 40

    5.3.2.2.6 ERROR, Type BOOL ............................................................... 40

    5.3.2.2.7 ERROR_FB, Type WORD ...................................................... 40

    5.3.2.2.8 ERROR_FB_NB, Type INT..................................................... 40

    5.3.2.2.9 STATE_FCT_REQ_OK, Type DWORD ................................ 41

    5.3.2.2.10 STATE_FCT_REQ_ERROR, Type DWORD ......................... 41

    5.3.2.2.11 QBAD_ACTIVE, Type BOOL ................................................ 41

    5.3.2.2.12 ACK_REQ_ACTIVE, Type BOOL ......................................... 41

    5.4 Defined Data Structures / Data Blocks ................................................... 42

    5.4.1 General ............................................................................................... 42

    5.4.2 Data Block Template ......................................................................... 43

    5.4.2.1 Data Block DB37 (4 PROFIsafe modules) ................................... 43

    5.4.2.2 Data Block DB38 Template (8 PROFIsafe modules) ................... 44

    5.4.2.3 Data Block DB39 Template (32 PROFIsafe modules) ................. 44

    5.4.2.4 Data Block DB41 Template (10 PROFIsafe modules) ................. 45

    5.4.2.5 Data Block DB101 Template (diagnosis data) .............................. 46

    5.5 Function blocks ...................................................................................... 47

    5.5.1 FB37 "WAGO_iPar_UDL_4_Mod" .................................................. 47

  • Contents 5

    Application note

    A114802

    5.5.1.1 Block call command Step 7 .......................................................... 47

    5.5.1.2 Parameterization before Use ......................................................... 48

    5.5.1.3 Function Activation ...................................................................... 48

    5.5.2 FB38 "WAGO_iPar_UDL_8_Mod" .................................................. 50

    5.5.2.1 Block call command Step 7 .......................................................... 50

    5.5.2.2 Parameterization before Use ......................................................... 51

    5.5.2.3 Function Activation ...................................................................... 51

    5.5.3 FB41 "WAGO_iPar_UDL_10_Mod" ................................................ 53

    5.5.3.1 Block call command Step 7 .......................................................... 53

    5.5.3.2 Parameterization before Use ......................................................... 54

    5.5.3.3 Function Activation ...................................................................... 54

    5.5.4 FB39 "WAGO_iPar_UDL_32Mod" .................................................. 56

    5.5.4.1 Block call command Step 7 .......................................................... 56

    5.5.4.2 Parameterization before Use ......................................................... 56

    5.5.4.3 Function Activation ...................................................................... 57

    5.5.5 FB40 "WAGO_iPar_State_32_Mod" ................................................ 59

    5.5.5.1 Block call command Step 7 .......................................................... 59

    5.5.5.2 Parameterization before Use ......................................................... 59

    5.5.5.3 Function Activation ...................................................................... 59

    5.5.6 FB101 "DiagPROFIsafe_V2_iPar" .................................................... 60

    5.5.6.1 Block call command Step 7 .......................................................... 60

    5.5.6.2 Parameterization before Use ......................................................... 61

    5.5.6.3 Function Activation ...................................................................... 62

    5.6 Terms of Use .......................................................................................... 63

    5.6.1 Basics ................................................................................................. 63

    5.6.1.1 Differences in Implementation ...................................................... 63

    5.6.1.2 CPU Communication Resources ................................................... 65

    5.6.1.3 Implementation Steps .................................................................... 65

    5.6.1.3.1 Specifying Data Block iParameters .......................................... 65

    5.6.1.3.2 Function Block Calls ................................................................ 66

    5.6.2 Commissioning .................................................................................. 67

    5.6.2.1 Create system configuration .......................................................... 67

    5.6.2.2 Configuring PROFIsafe Modules ................................................. 68

    5.6.2.3 Update system configuration ......................................................... 69

    5.6.2.4 Upload iParameters ....................................................................... 69

    5.6.3 Troubleshooting ................................................................................. 70

    5.6.3.1 Information about FB37, FB38, FB39, FB40, FB41 Error Numbers72

    5.6.3.1.1 Status ERROR_FB 16#8001 .................................................... 72

    5.6.3.1.2 Status ERROR_FB 16#8040 .................................................... 72

    5.6.3.1.3 Status ERROR_FB 16#8080 .................................................... 73

    5.6.3.1.4 Status ERROR_FB 16#9000 .................................................... 73

    5.6.3.1.5 Status ERROR_FB 16#A000 ................................................... 73

    5.6.3.1.6 Status ERROR_FB 16#C000 ................................................... 74

    5.6.3.2 Information about communication Error Numbers ....................... 74

    5.6.3.2.1 Status error_Com_x 16#8001 .................................................. 74

    5.6.3.2.2 Status error_Com_x 16#8002 .................................................. 75

    5.6.3.2.3 Status error_Com_x 16#8004 .................................................. 75

    5.6.3.2.4 Status error_Com_x 16#8008 .................................................. 75

    5.6.3.2.5 Status error_Com_x 16#8010 .................................................. 76

  • 6 Contents

    Application note

    A114802

    5.6.3.2.6 Status error_Com_x 16#8020................................................... 76

    5.6.3.2.7 Status error_Com_x 16#8100................................................... 76

    5.6.3.2.8 Status error_Com_x 16#8200................................................... 77

    5.6.3.2.9 Status error_Com_x 16#8400................................................... 77

    5.6.3.2.10 Status error_Com_x 16#8800................................................... 77

    5.6.3.2.11 Status Status error_Com_x 16#C000 ....................................... 78

    5.6.3.3 Advice Diagnosis Data at iParameter-DB ..................................... 78

    5.6.3.3.1 ............................ 79

    5.6.3.3.2 ............................ 79

    5.6.3.3.3 ................................ 79

    5.6.3.3.4 .............................. 79

    5.6.3.3.5 ................................ 79

    6 Example with Safety Controller from Siemens ...................................... 80

    6.1 Terms of Use .......................................................................................... 80

    6.2 Abstract programs and libraries .............................................................. 81

    6.2.1 Step 7 V5.5 SP3 ................................................................................. 81

    6.2.2 TIA V11 SP2 UP5 ............................................................................. 81

    6.2.3 TIA V12 SP1 ..................................................................................... 81

    6.3 System Configuration ............................................................................. 82

    6.3.1 Hardware Configuration .................................................................... 82

    6.3.2 Safety Control .................................................................................... 82

    6.3.3 PROFIBUS DP .................................................................................. 83

    6.3.3.1 Slave with PROFIBUS DP address 6............................................ 83

    6.3.3.2 Slave with PROFIBUS DP address 9............................................ 85

    6.3.3.3 Slave with PROFIBUS DP address 13.......................................... 88

    6.3.3.4 Slave with PROFIBUS DP address 17.......................................... 95

    6.3.4 PROFINET ........................................................................................ 98

    6.3.4.1 "WAGO-750-370" Device ............................................................ 98

    6.3.4.2 "WAGO-750-370-1" Device ....................................................... 101

    6.3.4.3 "WAGO-750-370-8" Device ....................................................... 105

    6.4 Software Structure ................................................................................ 108

    6.4.1 Program Structure ............................................................................ 108

    6.4.1.1 Cyclic Program Calls OB1 .......................................................... 108

    6.4.1.2 Program Calls via Watchdog Alarm OB35 ................................. 108

    6.4.1.3 Runtime Group Assignments ...................................................... 109

    6.4.2 Defined Interfaces ............................................................................ 110

    6.4.2.1 Cyclic Program to the Safety Program ........................................ 110

    6.4.2.2 Safety Program to the Cyclic Program ........................................ 110

    6.4.2.3 Runtime Group Communication ................................................. 111

    6.4.3 Note about Assignment of the Safety Module to Runtime Group ... 112

    6.5 Program Functions ................................................................................ 113

    6.5.1 Cyclic Application Program ............................................................ 113

    6.5.2 Organization Blocks Used ............................................................... 113

    6.5.2.1 Watchdog Alarm OB35 .............................................................. 113

    6.5.2.2 Watchdog Alarm OB82 .............................................................. 113

    6.5.2.3 Watchdog Alarm OB83 .............................................................. 113

    6.5.2.4 Watchdog Alarm OB85 .............................................................. 113

    6.5.2.5 Watchdog Alarm OB86 .............................................................. 113

  • Contents 7

    Application note

    A114802

    6.5.2.6 Watchdog Alarm OB87 .............................................................. 113

    6.5.2.7 Start-up OB100 ........................................................................... 113

    6.5.3 Safety Program ................................................................................ 114

    6.5.3.1 Function Basis ............................................................................. 114

    6.5.3.2 Data Transfer from Standard Program ........................................ 114

    6.5.3.3 User Acknowledgement / Reintegration ..................................... 115

    6.5.3.4 Evaluation E-Stop Active ........................................................... 116

    6.5.3.5 Relay Control .............................................................................. 118

    6.5.3.6 Status Displays of the Safety Program ........................................ 119

    6.6 Function Activation .............................................................................. 120

    6.7 Using iPar Server Option...................................................................... 121

    6.7.1 General ............................................................................................. 121

    6.7.2 Software Structure iPar Option ........................................................ 121

    6.7.2.1 General ........................................................................................ 121

    6.7.2.2 Required Block Calls .................................................................. 122

    6.7.2.3 Function Calls in FC9 ................................................................. 123

    6.7.2.4 Function Calls in FC14 ............................................................... 123

    6.7.2.4.1 Call for PROFIBUS-DP Slave 9 ............................................ 123

    6.7.2.4.2 Call for PROFINET Device 2 ................................................ 124

    6.7.2.4.3 Call for PROFIBUS-DP Slave 13 .......................................... 125

    6.7.2.5 Function Calls in FC15 ............................................................... 126

    6.7.3 Function Example ............................................................................ 127

    6.7.3.1 Check configuration .................................................................... 127

    6.7.3.2 iParameter Upload....................................................................... 128

    6.7.3.3 iParameter Comparison ............................................................... 130

    6.7.3.4 iParameter Download .................................................................. 131

    6.7.3.5 Read Diagnosis Data (manual request) ....................................... 133

    6.7.3.6 Read Diagnosis Data (automatic read) ........................................ 134

    7 References TIA Portal V11 SP2 UP5 ..................................................... 135

    7.1 General ................................................................................................. 135

    7.1.1 Global library WAGO iPar-Server Option ...................................... 135

    7.1.2 Example A114802_TIA_V_11_SP2_UP5_x_x_Bib_5_x .............. 136

    7.1.3 Parameterization with TCI interface ................................................ 137

    7.1.3.1 TCI CC3 with PROFIBUS-DP ................................................... 137

    7.1.3.2 TCI CC2 with PROFINET .......................................................... 139

    8 References TIA Portal V12 SP1 ............................................................. 140

    8.1 General ................................................................................................. 140

    8.1.1 Global library WAGO iPar-Server Option ...................................... 140

    8.1.2 Example A114802_TIA_V_V12_SP1_x_x_Bib_5_x .................... 141

    8.1.3 Parameterization with TCI interface ................................................ 142

    8.1.3.1 TCI CC3 with PROFIBUS-DP ................................................... 142

    8.1.3.2 TCI CC2 with PROFINET .......................................................... 144

    9 Information about Using Safety Components ...................................... 145

    9.1 Safety Light Curtain SOLID 2, Leuze electronic ................................. 145

    9.1.1 Electrical connection ....................................................................... 145

    9.1.2 Configuring PROFIsafe Module ...................................................... 146

  • 8 Contents

    Application note

    A114802

    9.2 Safety Position Switch S300, Leuze electronic .................................... 147

    9.2.1 Electrical connection........................................................................ 147

    9.2.2 Configuring PROFIsafe Module ...................................................... 148

    10 Source Directory ...................................................................................... 149

    11 Version information ................................................................................ 150

    11.1 S7 Library WAGO_iPar_Option .......................................................... 150

    11.2 Application Note .................................................................................. 151

  • Important Notes 9

    Application note

    A114802

    1 Important Notes

    To ensure quick installation and start-up of the units, please carefully read and

    adhere to the following information and explanations.

    1.1 Legal Principles

    1.1.1 Copyright

    This document, including all figures and illustrations contained therein, is subject

    to copyright protection. Any use of this document that infringes upon the copyright

    provisions stipulated herein is prohibited. Reproduction, translation, electronic and

    phototechnical filing/archiving (e.g., photocopying), as well as any amendments

    require the written consent of WAGO Kontakttechnik GmbH & Co. KG, Minden,

    Germany. Non-observance will involve the right to assert damage claims.

    WAGO Kontakttechnik GmbH & Co. KG reserves the right to make any

    alterations or modifications that serve to increase the efficiency of technical

    progress. WAGO Kontakttechnik GmbH & Co. KG owns all rights arising from

    granting patents or from the legal protection of utility patents. Third-party products

    are always mentioned without any reference to patent rights. Thus, the existence of

    such rights cannot be excluded.

    1.1.2 Personnel Qualification

    The use of the product detailed in this document is geared exclusively to specialists

    having qualifications in PLC programming, electrical specialists or persons

    instructed by electrical specialists who are also familiar with the valid standards.

    WAGO Kontakttechnik GmbH & Co. KG assumes no liability resulting from

    improper action and damage to WAGO products and third-party products due to

    non-observance of the information contained in this document.

    1.1.3 Intended Use

    For each individual application, the components are supplied from the factory with

    a dedicated hardware and software configuration. Modifications are only admitted

    within the framework of the possibilities documented in this document. All other

    changes to the hardware and/or software and the non-conforming use of the

    components entail the exclusion of liability on part of WAGO Kontakttechnik

    GmbH & Co. KG.

    Please send your requests for modified and new hardware or software

    configurations directly to WAGO Kontakttechnik GmbH & Co. KG.

  • 10 Important Notes

    Application note

    A114802

    1.2 Scope of Validity

    This application note is based on the stated hardware and software from the

    specific manufacturer, as well as the associated documentation. This application

    note is therefore only valid for the described installation.

    New hardware and software versions may need to be handled differently.

    Please note the detailed description in the specific manuals.

  • Important Notes 11

    Application note

    A114802

    1.3 Symbols

    DANGER

    Personal Injury Warning

    Indicates a high-risk, imminently hazardous situation which, if not avoided,

    will result in death or serious injury.

    WARNING

    Personal Injury Warning

    Indicates a moderate-risk, potentially hazardous situation which, if not

    avoided, could result in death or (serious) injury.

    CAUTION

    Personal Injury Warning

    Indicates a low-risk, potentially hazardous situation which, if not avoided,

    could result in slight to moderate injury.

    NOTICE

    Material Damage Warning

    Indicates a potentially hazardous situation which, if not avoided, may result in

    damage to property.

    ESD

    Warning of Material Damage Due to Electrostatic Charging

    Indicates a potentially hazardous situation which, if not avoided, may result in

    damage to property.

    Note

    Important Note

    Indicates routines or suggestions for efficient use of equipment and possible

    software optimizations. The respective device manuals of the components

    used are to be observed.

    Information

    Note about Additional Information

    Indicates other information, which is not an integral part of this

    documentation, such as manual, data sheet, Internet, etc.

  • 12 General

    Application note

    A114802

    2 General

    2.1 Terms of Use

    DANGER

    The examples listed are based exclusively on a test configuration with no

    reference to any machine or system.

    To use the PROFIsafe modules in a system, the applicable regulations,

    standards and safety requirements of the machine are to be observed and

    implemented.

    DANGER

    The application note provides additional information about the current

    manuals of the PROFIsafe modules.

    In addition, the information contained in the system description for the

    WAGO IO System is to be observed.

    Fig. 1 Screenshot of the WAGO-I/O-SYSTEM design notes

  • General 13

    Application note

    A114802

    Fig. 2 Screenshot of the PROFIsafe Module V2 iPar manuals and quickstart guide

  • 14 WAGO-I/O-SYSTEM Basics

    Application note

    A114802

    3 WAGO-I/O-SYSTEM Basics

    3.1 General

    The modular and fieldbus-independent I/O system WAGO I/O 750/753 supports

    numerous fieldbus systems. The I/O modules are connected by so-called bus

    interfaces available in various rating classes depending on the bus system used. To

    use the PROFIsafe technology, the PROFIBUS DP or PROFINET industrial bus

    systems can be used.

    3.2 Using the WAGO-I/O-SYSTEM with PROFIBUS DP

    3.2.1 General

    To connect the PROFIBUS DP bus system to the modular WAGO I/O 750/753 I/O

    system, various bus interfaces are available that differ in their range of

    performance. To use PROFIsafe on the PROFIBUS DP, the 750-333 PROFIBUS

    DP/V1 bus interface must be used for system implementations.

    3.2.2 GSD File

    3.2.2.1 Download Internet

    To configure the modular WAGO-I/O-SYSTEM 750/753, GSD files are used that

    are available to download from the WAGO homepage in Service area.

    Fig. 3 Screenshot of the WAGO homepage

    Source 1: WAGO homepage as of 12/04/03

  • WAGO-I/O-SYSTEM Basics 15

    Application note

    A114802

    Go to "Quicklinks \ Downloads" to display the following selection:

    Fig. 4 Screenshot of the WAGO homepage, Downloads

    Source 1: WAGO homepage as of 12/04/03

    The required GSD file is available under the "WAGO-I/O-SYSTEM 750/753"

    selection:

    Fig. 5 Screenshot of the WAGO homepage, Downloads AUTOMATION

    Source 1: WAGO homepage as of 12/04/03

  • 16 WAGO-I/O-SYSTEM Basics

    Application note

    A114802

    0

    Fig. 6 Screenshot of the WAGO homepage, WAGO-I/O-SYSTEM 750/753

    Source 1: WAGO homepage as of 12/04/03

    Note

    The GSD files are available from an installation program.

    When installing, all Step 7 programs should be closed on the PC to enable

    trouble free transfer of data.

    When using the PROFIsafe Module V2 iPar, the "Professional" installation

    should be selected. The entries contain the "PRO" extension in the hardware

    catalogue.

    After the "Professional" installation, the GSD files appears as follows within the

    hardware catalogue of the Step 7 hardware configuration:

    Fig. 7 Screenshot of the hardware catalogue, WAGO-GSD PRO selection

  • WAGO-I/O-SYSTEM Basics 17

    Application note

    A114802

    3.3 Using the WAGO-I/O-SYSTEM with PROFINET

    3.3.1 General

    To connect the PROFINET bus system to the modular WAGO I/O 750/753 I/O

    system, various bus interfaces are available that differ in their range of

    performance. To use PROFIsafe on the PROFINET, the 750-370 PROFINET

    I/O bus interface must be used for system implementations.

    3.3.2 GSDML file

    3.3.2.1 Download Internet

    To configure the modular WAGO-I/O-SYSTEM 750/753 on the PROFINET,

    GSDML files are used that are available to download from the WAGO homepage

    in Service area.

    Fig. 8 Screenshot of the WAGO homepage

    Source 1: WAGO homepage as of 12/04/03

  • 18 WAGO-I/O-SYSTEM Basics

    Application note

    A114802

    Go to "Quicklinks \ Downloads" to display the following selection:

    Fig. 9 Screenshot of the WAGO homepage, Downloads

    Source 1: WAGO homepage as of 12/04/03

    The required GSDML file is available under the "WAGO-I/O-SYSTEM 750/753"

    selection:

    Fig. 10 Screenshot of the WAGO homepage, Downloads AUTOMATION

    Source 1: WAGO homepage as of 12/04/03

  • WAGO-I/O-SYSTEM Basics 19

    Application note

    A114802

    Fig. 11 Screenshot of the WAGO homepage, WAGO-I/O-SYSTEM 750/753

    Source 1: WAGO homepage as of 12/04/03

    Note

    The GSDML files are "installed" in the hardware configuration of Step 7

    "Tools \ Install GSD Files".

    To install the GSDM files, please follow the instructions in the Step 7

    interface.

  • 20 WAGO-I/O-SYSTEM Basics

    Application note

    A114802

    3.4 Using the WAGO-I/O-SYSTEM with PROFIsafe

    3.4.1 General

    The PROFIsafe technology is offered as an option for safety controls of the S7

    series (Distributed Safety) identified by an "F" in the name of the control.

    3.4.2 Required Software Tools

    The following software tools are required to use the current technologies of

    PROFIsafe in conjunction with S7 controls:

    - Basic packet Step 7 V 5.4 SP5

    - Extension Distributed Safety V 5.4 SP 5

    Information

    The software tools specified here represent on the base requirements for using

    the WAGO PROFIsafe modules. Additional tools may be required based on

    the control components used. The respective instructions in the device

    manuals are to be taken into consideration.

    3.4.3 Operating Principles

    Some important information has been compiled to give you a simple introduction

    to the topic. In addition, you should always read the manual of the safety control

    used.

    3.4.3.1 Safety Program

    The safety program is created in a safety editor, which is similar to the usual

    program editor. After creating the safety program, the call path must be

    implemented based on the CPU requirements. The "Edit safety program" function

    must be used within the Step 7 interface.

  • WAGO-I/O-SYSTEM Basics 21

    Application note

    A114802

    3.4.3.2 "Edit safety program" Function

    This function must be used in the Step 7 interface to define the system call in

    conjunction with the F-runtime group and to generate the required collective

    signature for acceptance and thus operation of the safety program.

    The following individual steps are required for basic implementation of a safety

    program:

    - Add or adapt the F-Runtime group(s)

    - Add F-CALL in the application program of the CPU

    (typically in OB35)

    - Check the fail-safe I/O data block and F-runtime group assignments by

    "Generate" function

    - Test and document the implemented functions

    3.4.3.3 Fail-safe I/O DB

    When using PROFIsafe modules in the S7 world, an F periphery DB is created

    after creating an F module within the hardware configuration. This secure data

    block contains all required information to execute the required base functions

    (passivation and depassivation) and to receive diagnostic messages.

    :

    Fig. 12 Screenshot of the PROFIsafe F-Periphery DB module

    Source 2 Representation of theF-Periphery DB in Step 7 for PROFIsafe modules (Step 7 V5.4 SP5)

  • 22 WAGO-I/O-SYSTEM Basics

    Application note

    A114802

    3.4.3.3.1 PASS_ON

    Manual passivation of the PROFIsafe module by selecting VKE 1 in F-Periphery-

    DB (e.g. via safety program) Do not forget to reset to VKE 0 via the safety

    program.

    As long as PASS_ON = 1, a passivation of the corresponding periphery will be

    completed.

    The passivation cannot be disabled using the ACK_NEC and ACK_REI

    reintegration variables.

    3.4.3.3.2 ACK_NEC

    Using this F-Periphery DB variable, the behaviour of the periphery can be defined

    after a channel error.

    ACK_NEC = 0 automatic reintegration after a channel error.

    ACK_NEC =1 Reintegration is only possible via acknowledgement by the user

    (ACK_REI must be set to VKE 1)

    DANGER

    The parameterization ACK_NEC = 0 means automatic reintegration of the

    affected F-Periphery, i.e., automatic error acknowledgement and thus

    automatic machine start-up.

    Information

    When starting up the controller, ACK_NEC is automatically set to 1, i.e., the

    automatic reintegration of the modules must be consciously realized by

    corresponding programming within the safety program.

    3.4.3.3.3 ACK_REI

    User acknowledgement via positive edge at ACK_REI for reintegration of the F

    periphery after an error.

    Note

    Acknowledgement is only possible if a reintegration acknowledgement by the

    user is requested by the affected module via ACK_REQ = 1.

  • WAGO-I/O-SYSTEM Basics 23

    Application note

    A114802

    3.4.3.3.4 IPAR_EN

    Release to accept so-called iParameters from DP standard slaves. This function is

    not available for the WAGO I/O modules at the moment. For detailed information,

    see PROFIBUS standard.

    3.4.3.3.5 PASS_OUT

    Indicator that substitute values are sent by the PLC, at least 1 channel was

    passivated.

    If passivation is done via PASS_ON = 1, no indication will be made via

    PASS_OUT (only QBAD is set).

    3.4.3.3.6 QBAD

    Indicator that substitute values are sent by the PLC, at least 1 channel was

    passivated. Passivation can either be performed independently by the CPU or be

    activated by the user by setting PASS_ON = 1 in the F-Periphery-DB In any

    case, indication is done via QBAD.

    Note

    The modules currently work with a module related passivation.

    3.4.3.3.7 ACK_REQ

    System Indicator that the user acknowledgement for the integration of the affected

    F periphery is required Indication is set by the system as soon as the error has

    been corrected and acknowledgement by the user is possible.

    DANGER

    By evaluating the information ACK_REQ and QBAD, reintegration can be

    implemented again by setting the user acknowledgement ACK_REI, i.e.,

    possible automatic machine start-up in case of error.

    3.4.3.3.8 IPAR_OK

    Indicator that new iParameters have been taken over via IPAR_EN = 1.

    As soon as the IPAR_OK indication is displayed, the IPAR_EN request must be

    reset so that a reintegration of the affected fail-safe DP normal slave can be

    performed. This function is not available for the WAGO I/O modules at the

    moment.

  • 24 WAGO-I/O-SYSTEM Basics

    Application note

    A114802

    3.4.3.3.9 DIAG

    Cyclic diagnostic indication of each PROFIsafe module within the F periphery

    DBs. The information can be used within the normal cyclic application program.

    Bit Meaning

    0 Timeout F periphery is identified

    1 F periphery / channel error of F periphery is identified

    2 CRC / Sequence number error of F periphery is identified

    3 Reserve

    4 Timeout of F system is identified

    5 Sequence number error of F system is identified

    6 CRC error of F system is identified

    7 Reserve

    Fig. 13 Configuration of diagnostic F-Periphery DB

  • WAGO-I/O-SYSTEM Basics 25

    Application note

    A114802

    3.4.4 Assignment of the Hardware Configuration to F-Periphery-DB

    Due to automatic creation of the F-Periphery-DBs for PROFIsafe modules, we have

    to take a look at the relationship between information within the hardware

    configuration, naming within the project and symbolic program access to the safety

    information.

    3.4.4.1 Using PROFIBUS-DP

    The symbol name of the IOs for the safety program is created via the first byte

    address of the module in the HW Configuration and the DP identification of the

    device.

    Example: F00010_196 results from I/O byte 10 and DP ID 196:

    Fig. 14 Screenshot showing the hardware configuration of the application note (focus PROFIBUS)

    Source 3: Screenshot of Step 7 Project V5.4 SP5

    Fig. 15 Screenshot of the safety program after creating the HW Configuration

    Source 3: Screenshot of Step 7 Project V5.4 SP5

    When accessing information from the F-Periphery-DBs within the application

    program, usually the symbolic name is used only, e.g., "F00010_196". QBAD are

    sent for evaluating substitute values.

  • 26 WAGO-I/O-SYSTEM Basics

    Application note

    A114802

    3.4.4.2 Using PROFINET

    The symbol name of the IOs for the safety program is created by the first byte

    address of the module in the hardware configuration and the symbol name of the

    device.

    Example: F00060_753_667_4FDI_4FDO results from I/O byte 60 and module

    name 753-662 4 FDI / 4 FDO of the hardware configuration:

    Fig. 16 Screenshot showing the hardware configuration of the application note (focus PROFINET)

    Source 3: Screenshot of Step 7 Project V5.4 SP5

    Fig. 17 Screenshot of the safety program after creating the HW Configuration

    Source 3: Screenshot of Step 7 Project V5.4 SP5

    Source 3: Screenshot of Step 7 Project V5.4 SP5

    When accessing information from the F-Periphery-DBs within the application

    program, usually the symbolic name is used only, e.g.,

    "F00060_753_667_4FDI_4FDO". QBAD are sent for evaluating substitute values.

  • WAGO-I/O-SYSTEM Basics 27

    Application note

    A114802

    3.4.4.3 Note about assigned F-Periphery-DBs

    In principle, each PROFIsafe module can only be evaluated by one runtime group,

    i.e., the corresponding F-Periphery-DB of a safety module is assigned fixed to

    one runtime group.

    Note

    From Distributed Safety V 5.4 SP3, only F-Periphery-DBs are still assigned to

    a runtime group, whose modules are also used.

    In other words, at least one read or write access to information of the safety

    module has to occur.

    After creating the safety program, the current assignment of the F-Periphery-DBs to

    the F-runtime group within the editor can be checked:

    Fig. 18 Screenshot of the editor showing "Processing of safety program"

    Source 3: Screenshot of Step 7 Project V5.4 SP5

    Note

    All assigned F-Periphery DBs of the safety module of a runtime group can be

    reintegrated via the FB 219 "F_ACK_GL" centrally for this runtime group.

  • 28 WAGO-I/O-SYSTEM Basics

    Application note

    A114802

    3.4.5 Data Transfer and Data Access

    By using common hardware for the standard application and safety program,

    various data access paths are required to realize a user program. Consequently, the

    most important information is briefly summarized to provide a certain basis for the

    following example.

    3.4.5.1 Standard Program to the Safety Program

    Fig. 19 Excerpt from the online help "Transfer from the Standard User to the Safety Program"

    Source 4 Online help for Step 7 V5.4 SP 5 and Distributed Safety V 5.4 SP5

  • WAGO-I/O-SYSTEM Basics 29

    Application note

    A114802

    3.4.5.2 Safety Program to the Standard Program

    The following information is available in the online help of Step 7 on this topic:

    Fig. 20 Excerpt from the online help "Transfer from the Safety to the Standard User Program"

    Source 4 Online help for Step 7 V5.4 SP 5 and Distributed Safety V 5.4 SP5

  • 30 WAGO-I/O-SYSTEM Basics

    Application note

    A114802

    3.5 Required WAGO Tools

    To create the system configuration and to start up the PROFIsafe modules from

    WAGO, the tools listed below are required.

    3.5.1 WAGO-I/O-CHECK

    The WAGO-I/O-CHECK V 3.x tool is available from WAGO under the following

    order numbers:

    - 759-920 CD with WAGO-I/O-CHECK

    - 759-302 CD with WAGO-I/O-CHECK and RS232 cable

    - 759-302/000-923 CD with WAGO-I/O-CHECK and USB cable

    When installing WAGO-I/O-CHECK, the WAGO Safety Editor 75x V2.0 is

    installed.

    3.5.2 WAGO Safety Editor 75x

    The WAGO Safety Editor 75x V 2.x is available separately under order number

    759-920/000-001 as a CD or for download under "Downloads / Automation /

    WAGO-I/O System 750/753".

    :

    Fig. 21 Screenshot of the WAGO homepage, WAGO-I/O-SYSTEM 750/753

  • iPar-Server Technology 31

    Application note

    A114802

    4 iPar-Server Technology

    When using PROFIsafe devices, parameter assignments have to be set within the

    system configuration of the master, basic GSD / GSDML files (F parameters) and

    individual device parameters (iParameters) on the device directly.

    Fig. 22 Screenshot of the PROFIsafe layer structure

    Source 5 Homepage of PROFIBUS and PROFINET International (09/09/10)

    The basic PROFIsafe communication parameters are defined by configuring the F-

    Parameters. By transferring these parameters to the F-Device each time the F host

    is started, these definitions are available in each system state and each time an F

    device is replaced.

    By assigning the iParameters to the F-Device, the manufacturer is required to

    provide a corresponding tool to make saving and documenting the iParameters

    possible. To restore the configuration without an additional tool from the

    manufacturer, the technology of the iPar-Server has been generally defined.

    Fig. 23 Screenshot of the iPar server concept

    Source 5 Homepage of PROFIBUS and PROFINET International (09/09/10)

  • 32 iPar-Server Technology

    Application note

    A114802

    A so-called "F_iPar_CRC" of the F-Device is transferred to the engineering tool of

    the F-Host via the defined sequences when using the technology of the iPar-Server.

    By transferring this checksum to the F-Host, the configuration of the F-Device can

    be checked at any system state.

    In addition, the respective "F_iPar_CRC" of the F-Device is also integrated when

    creating the total signature of the safety program.

    When using the WAGO PROFIsafe module V2 iPar, a system configuration

    appears as follows:

    Fig. 24 Screenshot of the system configuration for the WAGO PROFIsafe module V2 iPar

    To use this technology with safety controls from Siemens, Siemens makes a

    function block (FB24) available to use the iPar-Server technology.

    Information

    The use of the WAGO PROFIsafe module V2 iPar in conjunction with the

    iPar-Server (FB24) is described in application note 114801 and is available

    for general download on the Internet in the Documentation / Application

    Notes area.

  • Function Blocks iPar Option WAGO 33

    Application note

    A114802

    5 Function Blocks iPar Option WAGO

    5.1 Motivation iPar Option

    The implementation of FB24 from Siemens currently available has to be called up

    several times in the application program (start-up, diagnostic OB, cyclic program)

    and therefore, can only be used in a limited manner for small safety controls. Using

    the defined sequences and functions of the iPar-Server technology, it is possible to

    provide an application-based solution that only has to be called up in the cyclic

    application program and that can also be used with small safety controls.

    Available of WAGO iPar-Server option:

    Fig. 25 Functions iPar-Server option Co. WAGO

    5.2 General

    With the application solution presented here, it is possible to save the iParameters

    of the WAGO PROFIsafe module V2 iPar (75x-66x/000-003) via the respective

    function blocks in the application program. To store data, data blocks are available

    that can be copied to the offline project during operation after transferring the data.

  • 34 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.3 Overview of Block Functions

    To implement the transfer of iParameters for the WAGO PROFIsafe module V2

    iPar (75x-66x/000-003), the following function blocks are required.

    5.3.1 Setup and Structure of Block Calls

    The basic structure of the function calls is briefly shown in the following figure:

    Fig. 26 Setup and structure of block calls

  • Function Blocks iPar Option WAGO 35

    Application note

    A114802

    5.3.2 Implemented Function Blocks

    5.3.2.1 Input Function Blocks

    The function blocks make the following inputs available based on the functions

    used.

    5.3.2.1.1 INIT_FB, Type BOOL

    This input is used to initialize the function block, which has to be occur under the

    following conditions:

    - Reboot or restart of the control

    - Initialization of the application program

    - Change to the function block configuration or within the iParameter data

    block

    Note

    To simplify the application program, a flag should be set in the OB100 start-

    up that is again reset at the end of the OB1 Use as "Initialization active" on

    input "INIT_FB".

    5.3.2.1.2 RESET, Type BOOL

    If there is an active error on the function block, the error message is reset on the

    output of the function block. A reset is only possible if no function request are

    active via the inputs. A new function request is only possible after a fault condition

    of a FB is acknowledged via a reset.

    5.3.2.1.3 CHECK_CFG, Type BOOL

    "Check configuration" function request

    Check of the software parameter settings in terms of the expected PROFIsafe

    module on the configured I/O address. By activating this function, the following

    module information is checked:

    - Module type (661, 662, 666 or 667)

    - Version (....../000-003)

    The function is completed without error if the right module is available in the right

    version with the specified I/O address.

  • 36 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.3.2.1.4 UPLOAD_REQ, Type BOOL

    Function request "iParameter UPLOAD" from the module to the control.

    This function request is used to transfer the iParameters from the PROFIsafe

    module to the iParameter data block.

    5.3.2.1.5 DOWNLOAD_REQ, Type BOOL

    Function request "iParameter DOWNLOAD" from the control to the module.

    This function request is used to transfer the iParameters from the iParameter data

    block to the PROFIsafe module. The function can only be enabled if valid

    iParameters have been saved in the respective data block.

    5.3.2.1.6 COMPARE_REQ, Type BOOL

    Function request "iParameter compare" between module and control.

    This function request is used to compare the iParameters saved in the control with

    the current iParameters in the PROFIsafe module. This function can be used to

    check whether the content of the data block is still identical to the current

    iParameter dataset in the respective PROFIsafe module.

    Note

    After transferring the iParameters from the control to the PROFIsafe module,

    the dataset is checked. If the iParameter data in the control has been

    manipulated, the module goes into a fault condition and outputs a

    corresponding diagnostic message.

    5.3.2.1.7 DIAG_DATA_REQ_REQ, Type BOOL

    Function request "read diagnostic data of PROFIsafe module".

    This function request is used reading the diagnostic data of an PROFIsafe module

    and transfer the information to the iParameter-DB per module. The diagnostic

    .

  • Function Blocks iPar Option WAGO 37

    Application note

    A114802

    5.3.2.1.8 SELECT_MODULE, Type DWORD

    The respective function request for the available modules is released from this "bit"

    bar. For this purpose, the following assignment applies:

    Fig. 27 Assignment of PROFIsafe modules to SELECT_MODULE

    From this enable input, more modules can be released than actually available with

    the block call command. This does not lead to an error message. If a function is

    requested without selecting a module, the function request is cancelled with a

    corresponding error message.

    5.3.2.1.9 READ_DIAG_DATA, Type BOOL

    Function request "read diagnostic data of PROFIsafe module automatically".

    This function request is used reading the diagnostic data of the PROFIsafe modules

    automatically and transfer the information to the iParameter-DB. The function is

    -Periphery-DB changed from FALSE to TRUE.

    Note

    Only one function request can be made from one input, i.e., if several function

    requests are made at the same time to one function block, the FB executes

    none.

    To implement external monitoring, the BUSY, DONE and ERROR outputs

    can be monitored for changes after enabling a function request.

    To activate a RESET, all function requests must be reset on the respective FB.

  • 38 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.3.2.1.10 ACT_DATE, Type DATE

    Current date for use as a time stamp in the iParameter data block e.g.,

    application of the system information in OB1.

    5.3.2.1.11 ACT_TIME, Type TIME_OF_DAY

    Current time for use as a time stamp in the iParameter data block e.g.,

    application of the system information in OB1.

    5.3.2.1.12 iPar_DB_NB, Type BLOCK_DB

    Specification of the data block for storing the iParameters and determination of

    functions. The required data block structures are defined as follows:

    - Use of FB37 Data block structure acc. template DB37

    - Use of FB38 Data block structure acc. template DB38

    - Use of FB39 Data block structure acc. template DB39

    - Use of FB41 Data block structure acc. template DB41

    Setup and required configurations within the data blocks are listed below.

    5.3.2.1.13 MODULES_PLUGGED, Type INT

    Specification of the actually available modules for the function block call. For the

    specified number of modules, the corresponding parameters have to be assigned to

    the inputs ADR_MOD_x, F_PER_DB_MOD_x and TYPE_MOD_x. The input

    parameter is checked for a value specification > 0 upon activation of a function

    request, but the currently available system configuration cannot be determined.

    5.3.2.1.14 SLAVE_DP_PN, Type BOOL

    Specification of the bus system used by:

    - VKE 0 (FALSE) Use with PROFIBUS DP

    - VKE 1 (TRUE) Use with PROFINET

    Function block not checked for correct configuration wrong configuration leads

    to negatively acknowledged function requests.

  • Function Blocks iPar Option WAGO 39

    Application note

    A114802

    5.3.2.1.15 ADR_MOD_x, Type INT

    Specification of the I/O address from the hardware configuration of Step 7 for the

    respective PROFIsafe module.

    5.3.2.1.16 F_PER_DB_MOD_x, Type BLOCK_DB

    Specification of the F periphery data block for the respective PROFIsafe module.

    5.3.2.1.17 TYPE_MOD_x, Type INT

    Specification of the PROFIsafe module type for the respective module as follows:

    - 661 75x-661/000-003

    - 662 75x-662/000-003

    - 666 75x-666/000-003

    - 667 75x-667/000-003

    Note

    For all function requests, the actually available module for configuration

    within the software (corresponds to the request CHECK_CFG_REQ) is

    always checked as the first step.

  • 40 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.3.2.2 Output Function Blocks

    The function blocks make the following outputs available based on the functions

    used.

    5.3.2.2.1 INIT_OK, Type BOOL

    Indicator that initialization of the function block successfully performed and read

    for function requests.

    5.3.2.2.2 UPLOAD_ALL_MODULES, Type BOOL

    Indicator that a valid iParameter dataset has been saved in the control for all

    specified PROFIsafe modules.

    5.3.2.2.3 BUSY, Type BOOL

    Indicator that function request is being processed, the BUSY output is reset after

    completion of the function request.

    5.3.2.2.4 DONE, Type BOOL

    Indicator that function request is done without error, reset of the function indicator

    upon cancellation of the function request.

    5.3.2.2.5 DONE_ALL_MODULES, Type BOOL

    Indicator that function request is done without error for all available PROFIsafe

    modules of the current configuration, reset of the function indicator upon

    cancellation of the function request.

    5.3.2.2.6 ERROR, Type BOOL

    Indicator that function request is done with error, reset of the fault condition by

    resetting the function request and fault acknowledgement via "RESET" input.

    5.3.2.2.7 ERROR_FB, Type WORD

    Indicator of error number in case of error Assignment of the error numbers each

    within the module documentation in the first network

    5.3.2.2.8 ERROR_FB_NB, Type INT

    Additional indicator for the error number in case of error, support resource for

    functional problems.

  • Function Blocks iPar Option WAGO 41

    Application note

    A114802

    5.3.2.2.9 STATE_FCT_REQ_OK, Type DWORD

    Indicator of function state via "bit" string consistent with function request via input

    "SELECT_MODULE", meaning here function request done without error. The

    following assignment applies:

    Fig. 28 Assignment of PROFIsafe modules to output STATE_FCT_REQ_OK

    If a function request ends without error, the status display is reset after resetting the

    function request on the FB input. In case of error, the status display is first reset

    with activation error reset via input "RESET" of the FB.

    5.3.2.2.10 STATE_FCT_REQ_ERROR, Type DWORD

    Indicator of function state via "bit" string consistent with function request via input

    "SELECT_MODULE", meaning here function request done with error. The

    following assignment applies:

    Fig. 29 Assignment of PROFIsafe modules to output STATE_FCT_REQ_ERROR

    In case of error, the status display is only cleared after activation error reset via

    input "RESET" of the FB.

    5.3.2.2.11 QBAD_ACTIVE, Type BOOL

    Indicator that at least one PROFIsafe module outputs substitute values

    Information by evaluating the respective F-Periphery-DB.

    5.3.2.2.12 ACK_REQ_ACTIVE, Type BOOL

    Indicator that at least one PROFIsafe module requires a user acknowledgement

    Information by evaluating the respective F-Periphery-DB.

  • 42 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.4 Defined Data Structures / Data Blocks

    To store the iParameter datasets within the control and to save current states,

    corresponding data block structures are defined.

    5.4.1 General

    The defined data blocks are divided into 3 areas:

    x.x versionInfo_1

    memory data block header : :

    x.x fctReqTimeout

    : :

    x.x typ_module_1

    configuration data : :

    x.x system information

    system information : :

    x.x data storage module

    module parameter : iParameter / diagnosis data

    Fig. 30 Overview of data block structure, general

    Note

    Data blocks DB37, DB38, DB39 and DB41 are to be used as a "template",

    i.e., when creating an application, these data blocks are created under a new

    DB number and the required parameterizations made in data word area 0 and

    6.

    Note

    When installing FB37, FB38, FB39 or FB41, the default settings within the

    iParameter data block data word 0, 2 and 6 are checked and if a default setting

    is incorrect, the function block goes into the fault condition "W#16#C000",

    which cannot be acknowledged.

  • Function Blocks iPar Option WAGO 43

    Application note

    A114802

    5.4.2 Data Block Template

    5.4.2.1 Data Block DB37 (4 PROFIsafe modules)

    When using function block FB37 (or copies thereof), a data block of the format

    DB37 must be used for data archiving of the iParameters. After creating a

    corresponding data block, the following data settings are to be checked within the

    data block:

    address name value

    0.0 versionInfo_1 37 using FB37 -> "37"

    2.0 versionInfo_2 W#16#500 version DB structure 400

    6.0 fctReqTimeout 6000 watchdog timing function request

    Fig. 31 Data block header DB37 settings

    Note

    A counter is implemented to monitor the internal module functions. The

    default value for monitoring is saved in data word 6 and is calculated as

    follows:

    DW6 = 30.000ms / average cycle time of the PLC

    Ex. DW6 = 30.000ms / 5 ms = 6000

    No value less than 30s should be assigned. An extension of the time may be

    required based on the application size.

    Note

    change the data block version information at address 2 -> necessary

    information for function block about structure data block.

  • 44 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.4.2.2 Data Block DB38 Template (8 PROFIsafe modules)

    When using function block FB38 (or copies thereof), a data block of the format

    DB38 must be used for data archiving of the iParameters. After creating a

    corresponding data block, the following data settings are to be checked within the

    data block:

    address name value

    0.0 versionInfo_1 38 using FB38 -> "38"

    2.0 versionInfo_2 W#16#500 version DB structure 400

    6.0 fctReqTimeout 6000 watchdog timing function request

    Fig. 32 Data block header DB38 settings

    Note

    For details about calculating "fctReqTimeout", see DB37.

    5.4.2.3 Data Block DB39 Template (32 PROFIsafe modules)

    When using function block FB39 (or copies thereof), a data block of the format

    DB39 must be used for data archiving of the iParameters. After creating a

    corresponding data block, the following data settings are to be checked within the

    data block:

    address name value

    0.0 versionInfo_1 39 using FB39 -> "39"

    2.0 versionInfo_2 W#16#500 version DB structure 400

    6.0 fctReqTimeout 6000 watchdog timing function request

    Fig. 33 Data block header DB39 settings

    Note

    For details about calculating "fctReqTimeout", see DB37.

  • Function Blocks iPar Option WAGO 45

    Application note

    A114802

    In contrast to the implementation of FB37 and FB38, all required module data must

    be entered in DB39 from data word 8 when using FB39:

    address name value

    8.0 maxModules >= 1 number used PROFIsafe Module

    10.0 type_module_1 ____ used module type (661 / 662 / 666 / 667)

    12.0 adr_module_1 ____ I/O address module from HC-Config

    (start address I/O field)

    14.0 bussystem_mod_1 ____ used bus system

    (0 = PROFIBUS DP / 1 = PROFINET)

    : : : :

    196.0 type_module_32 ____ used module type (661/662/663/666/667)

    198.0 adr_module_32 ____ I/O address module from HC-Config

    (start address I/O field)

    200.0 bussystem_mod_32 ____ used bus system

    (0 = PROFIBUS DP / 1 = PROFINET)

    Fig. 34 Configuration data DB39 settings

    5.4.2.4 Data Block DB41 Template (10 PROFIsafe modules)

    When using function block FB41 (or copies thereof), a data block of the format

    DB41 must be used for data archiving of the iParameters. After creating a

    corresponding data block, the following data settings are to be checked within the

    data block:

    address name value

    0.0 versionInfo_1 41 using FB41 -> "41"

    2.0 versionInfo_2 W#16#500 version DB structure 400

    6.0 fctReqTimeout 6000 watchdog timing function request

    Fig. 35 Data block header DB41 settings

    Note

    For details about calculating "fctReqTimeout", see DB37.

  • 46 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.4.2.5 Data Block DB101 Template (diagnosis data)

    When using function block FB101 (or copies thereof), a data block of the format

    DB101 must be used for data archiving of the diagnosis data. After creating a

    corresponding data block, the following data settings are to be checked within the

    data block:

    address name value

    0.0 versionInfo_1 101 using FB101 -> "101"

    2.0 versionInfo_2 W#16#100 version DB structure 100

    6.0 fctReqTimeout 6000 watchdog timing function request

    8.0 dsvLength 20 Dataset length of circular storage

    Fig. 36 Data block header DB101 settings

    Note

    For details about calculating "fctReqTimeout", see DB37.

  • Function Blocks iPar Option WAGO 47

    Application note

    A114802

    5.5 Function blocks

    5.5.1 FB37 "WAGO_iPar_UDL_4_Mod"

    This function block implements storage of the iParameters of maximum 4

    PROFIsafe modules in one slave and displays the current status of the QBAD and

    ACK_REQ signals of the PROFIsafe modules used.

    5.5.1.1 Block call command Step 7

    The function block appears as follows when called up within Step 7:

    Fig. 37 Screenshot of FB37 "WAGO_iPar_UDL_4_Mod" V5.x

  • 48 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.5.1.2 Parameterization before Use

    Before using the function block, the following input connections must be made

    based on the existing system configuration:

    input value

    ACT_DATE actual system date

    ACT_TIME actual system time

    iPar_DB_Number data block used for storage iParameter

    (template data block DB37)

    MODULES_PLUGGED 1 4 number used PROFIsafe modules at slave

    SLAVE_DP_PN FALSE

    TRUE

    information used bus system at slave

    FALSE = PROFIBUS DP / TRUE = PROFINET

    ADR_MOD_1 I/O address PROFIsafe module 1

    F_PER_DB_MOD_1 data block F-Periphery-DB PROFIsafe module 1

    TYPE_MOD_1 661/662/663/666/667 module type PROFIsafe module 1

    : : :

    ADR_MOD_4 I/O address PROFIsafe module 4

    F_PER_DB_MOD_4 data block F-Periphery-DB PROFIsafe module 4

    TYPE_MOD_4 661/662/663/666/667 I/O address PROFIsafe module 4

    Fig. 38 Parameterization of inputs FB37 V5.x

    Note

    Before activating the first function request, please check each required

    parameterization within the iParameter data blocks (DBW0, DBW2, DBW6).

    Only iParameter data blocks of version 5.x are suitable for use.

    Used modules are parameterized from module 1 without spares:

    5.5.1.3 Function Activation

    After configuring and initializing the function block, the function can be activated.

    Before activating a function request, the respective modules must be selected from

    the "SELECT_MODULE" input, assignment bit orientation.

    After activating a function request, the "BUSY" output switches to TRUE and

    displays the activity of the FB. The current function feedback in terms of the

    available PROFIsafe modules can be evaluated on the "STATE_FCT_REQ_OK"

    and "STATE_FCT_REQ_ERROR" outputs during execution and while the

    function request is pending.

  • Function Blocks iPar Option WAGO 49

    Application note

    A114802

    After completing the function request, the following module states can be reached:

    Output "DONE" = TRUE

    - Function request done without error

    - "STATE_FCT_REQ_OK" shows processed function request

    Output "DONE" and "DONE_ALL_MODULES" = TRUE

    - Function request done without error

    - Function request was executed for all available modules

    - "STATE_FCT_REQ_OK" shows processed function request

    Output "ERROR" = TRUE

    - Function request done with error

    - "STATE_FCT_REQ_OK" / "STATE_FCT_REQ_ERROR" show

    processed function requests

    The "STATE_FCT_REQ_OK" status displays are reset by resetting the function

    request during error-free processing.

    In case of error, the "STATE_FCT_REQ_OK" and "STATE_FCT_REQ_ERROR"

    status displays remain active until activation of a "RESET".

  • 50 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.5.2 FB38 "WAGO_iPar_UDL_8_Mod"

    This function block implements storage of the iParameters of maximum 8

    PROFIsafe modules in one slave and displays the current status of the QBAD and

    ACK_REQ signals of the PROFIsafe modules used.

    5.5.2.1 Block call command Step 7

    The function block appears as follows when called up within Step 7:

    Fig. 39 Screenshot of FB38 "WAGO_iPar_UDL_8_Mod" V5.x

  • Function Blocks iPar Option WAGO 51

    Application note

    A114802

    5.5.2.2 Parameterization before Use

    Before using the function block, the following input connections must be made

    based on the existing system configuration:

    input value

    ACT_DATE actual system date

    ACT_TIME actual system time

    iPar_DB_Number data block used for storage iParameter

    (template data block DB38)

    MODULES_PLUGGED 1 8 number used PROFIsafe modules at slave

    SLAVE_DP_PN FALSE

    TRUE

    information used bus system at slave

    FALSE = PROFIBUS DP / TRUE = PROFINET

    ADR_MOD_1 I/O address PROFIsafe module 1

    F_PER_DB_MOD_1 data block F-Periphery-DB PROFIsafe module 1

    TYPE_MOD_1 661/662/663/666/667 module type PROFIsafe module 1

    : : :

    ADR_MOD_8 I/O address PROFIsafe module 8

    F_PER_DB_MOD_8 data block F-Periphery-DB PROFIsafe module 8

    TYPE_MOD_8 661/662/663/666/667 I/O address PROFIsafe module 8

    Fig. 40 Parameterization of inputs FB38

    Note

    Before activating the first function request, please check each required

    parameterization within the iParameter data blocks (DBW0, DBW2, DBW6).

    Only iParameter data blocks of version 5.x are suitable for use.

    Used modules are parameterized from module 1 without spares:

    5.5.2.3 Function Activation

    After configuring and initializing the function block, the function can be activated.

    Before activating a function request, the respective modules must be selected from

    the "SELECT_MODULE" input, assignment bit orientation.

    After activating a function request, the "BUSY" output switches to TRUE and

    displays the activity of the FB. The current function feedback in terms of the

    available PROFIsafe modules can be evaluated on the "STATE_FCT_REQ_OK"

    and "STATE_FCT_REQ_ERROR" outputs during execution and while the

    function request is pending.

  • 52 Function Blocks iPar Option WAGO

    Application note

    A114802

    After completing the function request, the following module states can be reached:

    Output "DONE" = TRUE

    - Function request done without error

    - "STATE_FCT_REQ_OK" shows processed function request

    Output "DONE" and "DONE_ALL_MODULES" = TRUE

    - Function request done without error

    - Function request was requested for all available modules

    - "STATE_FCT_REQ_OK" shows processed function request

    Output "ERROR" = TRUE

    - Function request done with error

    - "STATE_FCT_REQ_OK" / "STATE_FCT_REQ_ERROR" show

    processed function requests

    The "STATE_FCT_REQ_OK" status displays are reset by resetting the function

    request during error-free processing.

    In case of error, the "STATE_FCT_REQ_OK" and "STATE_FCT_REQ_ERROR"

    status displays remain active until activation of a "RESET".

  • Function Blocks iPar Option WAGO 53

    Application note

    A114802

    5.5.3 FB41 "WAGO_iPar_UDL_10_Mod"

    This function block implements storage of the iParameters of maximum 10

    PROFIsafe modules in one slave and displays the current status of the QBAD and

    ACK_REQ signals of the PROFIsafe modules used.

    5.5.3.1 Block call command Step 7

    The function block appears as follows when called up within Step 7:

    Fig. 41 Screenshot of FB41 "WAGO_iPar_UDL_10_Mod" V5.x

  • 54 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.5.3.2 Parameterization before Use

    Before using the function block, the following input connections must be made

    based on the existing system configuration:

    input value

    ACT_DATE actual system date

    ACT_TIME actual system time

    iPar_DB_Number data block used for storage iParameter

    (template data block DB41)

    MODULES_PLUGGED 1 10 number used PROFIsafe modules at slave

    SLAVE_DP_PN FALSE

    TRUE

    information used bus system at slave

    FALSE = PROFIBUS DP / TRUE = PROFINET

    ADR_MOD_1 I/O address PROFIsafe module 1

    F_PER_DB_MOD_1 data block F-Periphery-DB PROFIsafe module 1

    TYPE_MOD_1 661/662/663/666/667 module type PROFIsafe module 1

    : : :

    ADR_MOD_10 I/O address PROFIsafe module 10

    F_PER_DB_MOD_10 data block F-Periphery-DB PROFIsafe module 10

    TYPE_MOD_10 661/662/663/666/667 I/O address PROFIsafe module 10

    Fig. 42 Parameterization of inputs FB38

    Note

    Before activating the first function request, please check each required

    parameterization within the iParameter data blocks (DBW0, DBW2, DBW6).

    Only iParameter data blocks of version 5.x are suitable for use.

    Used modules are parameterized from module 1 without spares:

    5.5.3.3 Function Activation

    After configuring and initializing the function block, the function can be activated.

    Before activating a function request, the respective modules must be selected from

    the "SELECT_MODULE" input, assignment bit orientation.

    After activating a function request, the "BUSY" output switches to TRUE and

    displays the activity of the FB. The current function feedback in terms of the

    available PROFIsafe modules can be evaluated on the "STATE_FCT_REQ_OK"

    and "STATE_FCT_REQ_ERROR" outputs during execution and while the

    function request is pending.

  • Function Blocks iPar Option WAGO 55

    Application note

    A114802

    After completing the function request, the following module states can be reached:

    Output "DONE" = TRUE

    - Function request done without error

    - "STATE_FCT_REQ_OK" shows processed function request

    Output "DONE" and "DONE_ALL_MODULES" = TRUE

    - Function request done without error

    - Function request was requested for all available modules

    - "STATE_FCT_REQ_OK" shows processed function request

    Output "ERROR" = TRUE

    - Function request done with error

    - "STATE_FCT_REQ_OK" / "STATE_FCT_REQ_ERROR" show

    processed function requests

    The "STATE_FCT_REQ_OK" status displays are reset by resetting the function

    request during error-free processing.

    In case of error, the "STATE_FCT_REQ_OK" and "STATE_FCT_REQ_ERROR"

    status displays remain active until activation of a "RESET".

  • 56 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.5.4 FB39 "WAGO_iPar_UDL_32Mod"

    This function block implements storage of the iParameters of maximum 32

    PROFIsafe modules in one application.

    5.5.4.1 Block call command Step 7

    The function block appears as follows when called up within Step 7:

    Fig. 43 Screenshot of FB39 "WAGO_iPar_UDL_32_Mod"V5.x

    5.5.4.2 Parameterization before Use

    Before using the function block, the following input connections must be made

    based on the existing system configuration:

    input value

    ACT_DATE actual system date

    ACT_TIME actual system time

    iPar_DB_Number data block used for storage iParameter

    (template data block DB39)

    Fig. 44 Parameterization of inputs FB39

  • Function Blocks iPar Option WAGO 57

    Application note

    A114802

    In contrast to the use of FB37 and FB38, the module data of the PROFIsafe

    modules used and the number of modules used must be specified in the iParameter

    data block when using FB39:

    address name value

    8.0 maxModules >= 1 number used PROFIsafe Module

    10.0 type_module_1 ____ used module type (661 / 662 / 666 / 667)

    12.0 adr_module_1 ____ I/O address module from HC-Config

    (start address I/O field)

    14.0 bussystem_mod_1 ____ used bus system

    (0 = PROFIBUS DP / 1 = PROFINET)

    : : : :

    196.0 type_module_32 ____ used module type (661/662/663/666/667)

    198.0 adr_module_32 ____ I/O address module from HC-Config

    (start address I/O field)

    200.0 bussystem_mod_32 ____ used bus system

    (0 = PROFIBUS DP / 1 = PROFINET)

    Fig. 45 Configuration data DB39 settings V5.x

    After specifying and checking this configuration data, the function block can be

    used.

    Note

    Before activating the first function request, please check each required

    parameterization within the iParameter data blocks (DBW0, DBW2, DBW6).

    Only iParameter data blocks of version 5.x are suitable for use.

    Used modules are parameterized from module 1 without spares:

    5.5.4.3 Function Activation

    After configuring and initializing the function block, the function can be activated.

    Before activating a function request, the respective modules must be selected from

    the "SELECT_MODULE" input, assignment bit orientation.

    After activating a function request, the "BUSY" output switches to TRUE and

    displays the activity of the FB. The current function feedback in terms of the

    available PROFIsafe modules can be evaluated on the "STATE_FCT_REQ_OK"

    and "STATE_FCT_REQ_ERROR" outputs during execution and while the

    function request is pending.

  • 58 Function Blocks iPar Option WAGO

    Application note

    A114802

    After completing the function request, the following module states can be reached:

    Output "DONE" = TRUE

    - Function request done without error

    - "STATE_FCT_REQ_OK" shows processed function request

    Output "DONE" and "DONE_ALL_MODULES" = TRUE

    - Function request done without error

    - Function request was requested for all available modules

    - "STATE_FCT_REQ_OK" shows processed function request

    Output "ERROR" = TRUE

    - Function request done with error

    - "STATE_FCT_REQ_OK" / "STATE_FCT_REQ_ERROR" show

    processed function requests

    The "STATE_FCT_REQ_OK" status displays are reset by resetting the function

    request during error-free processing.

    In case of error, the "STATE_FCT_REQ_OK" and "STATE_FCT_REQ_ERROR"

    status displays remain active until activation of a "RESET".

  • Function Blocks iPar Option WAGO 59

    Application note

    A114802

    5.5.5 FB40 "WAGO_iPar_State_32_Mod"

    From this function block, the F-Periphery-DB from 32 modules can be evaluated

    and the current status of "QBAD" and "ACK_REQ" can be easily determined for

    all modules. FB40 is used as a possible AddOn when using FB39.

    5.5.5.1 Block call command Step 7

    The function block appears as follows when called up within Step 7:

    Fig. 46 Screenshot of FB40 "WAGO_iPar_State_32_Mod" V5.x

    5.5.5.2 Parameterization before Use

    Before using the function block, the following input connections must be made

    based on the existing system configuration:

    input value

    iPar_DB_Number data block used for storage iParameter

    (template data block DB38)

    F_PER_DB_MOD_1 data block F-Periphery-DB PROFIsafe module 1

    : : :

    F_PER_DB_MOD_32 data block F-Periphery-DB PROFIsafe module 32

    Fig. 47 Parameterization of inputs FB40

    5.5.5.3 Function Activation

    The block starts automatically after initialization is complete and evaluates one

    PROFIsafe module in each cycle. This information is saved in the iParameter data

    block and is available for further evaluation.

  • 60 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.5.6 FB101 "DiagPROFIsafe_V2_iPar"

    This function block offers the storage of diagnosis data of maximum 12 PROFIsafe

    modules per function block call. The function block is used for fault tracing, if the

    diagnosis function disabled at the system configuration.

    5.5.6.1 Block call command Step 7

    The function block appears as follows when called up within Step 7:

    Fig. 48 x

  • Function Blocks iPar Option WAGO 61

    Application note

    A114802

    5.5.6.2 Parameterization before Use

    Before using the function block, the following input connections must be made

    based on the existing system configuration:

    input value

    ACT_DATE actual system date

    ACT_TIME actual system time

    Storage_DB_NB Data block for storage diagnosis data

    (template DB101)

    MODULES_PLUGGED 1 12 MODULES_PLUGGED

    ADR_MOD_1 I/O address PROFIsafe module 1

    F_PER_DB_MOD_1 data block F-Periphery-DB PROFIsafe module 1

    : :

    F_PER_DB_MOD_12 data block F-Periphery-DB PROFIsafe module 12

    Fig. 49 Parameterization of inputs FB101

    When using function block FB101 (or copies thereof), a data block of the format

    DB101 must be used for data archiving of the diagnosis data. After creating a

    corresponding data block, the following data settings are to be checked within the

    data block:

    address name value

    0.0 versionInfo_1 101 using FB101 -> "101"

    2.0 versionInfo_2 W#16#100 version DB structure 100

    6.0 fctReqTimeout 6000 watchdog timing function request

    8.0 dsvLength 20 Dataset length of circular storage

    Fig. 50 Data block header DB101 settings

    After specifying and checking this configuration data, the function block can be

    used.

  • 62 Function Blocks iPar Option WAGO

    Application note

    A114802

    5.5.6.3 Function Activation

    After configuring and initializing the function block, the function can be activated.

    The function request INT_FB, RESET, CHECK_CFG_REQ, DIAG_DATA_REQ

    and SELECT_MODULE works like FB37, FB38, FB39, FB41.

    The function request READ_DIAG_DATA_FILL reads the diagnosis data

    automatically until the circular storage is full -> indication output

    END_OF_STORAGE.

    In this case

    After completing the function request, the following module states can be reached:

    Output "DONE" = TRUE

    - Function request done without error

    - "STATE_FCT_REQ_OK" shows processed function request

    Output "ERROR" = TRUE

    - Function request done with error

    - "STATE_FCT_REQ_OK" / "STATE_FCT_REQ_ERROR" show

    processed function requests

    The "STATE_FCT_REQ_OK" status displays are reset by resetting the function

    request during error-free processing.

    In case of error, the "STATE_FCT_REQ_OK" and "STATE_FCT_REQ_ERROR"

    status displays remain active until activation of a "RESET".

  • Function Blocks iPar Option WAGO 63

    Application note

    A114802

    5.6 Terms of Use

    5.6.1 Basics

    Before using or creating an application on this subject, the following points should

    be defined:

    - Maximum number of PROFIsafe modules in the application

    - Implementation with reference to the PROFIsafe modules for one slave

    (use FB37 / FB38 / FB41)

    - Implementation without reference to the PROFIsafe modules for one slave

    (use FB39)

    5.6.1.1 Differences in Implementation

    Use of FB37, FB38 or FB41 with reference to a slave

    Fig. 51 Software structure "with slave reference"

    - One FB37, FB38 or FB41 call is required per slave

    - One iParameter data block is required per slave

  • 64 Function Blocks iPar Option WAGO

    Application note

    A114802

    Use of FB39 without reference to a slave

    Fig. 52 Software structure "without slave reference"

    - One FB39 for maximum 32 PROFIsafe modules

    - One iParameter data block per FB39 call

    Use of FB101 read diagnosis data PROFIsafe modules

    Fig. 53 Software structure read diagnosis data with FB101"

    - One FB101 for maximum 12 PROFIsafe modules

    - One dataset for diagnosis data per FB101 necessary

  • Function Blocks iPar Option WAGO 65

    Application note

    A114802

    5.6.1.2 CPU Communication Resources

    The block functions for communication with the PROFIsafe modules are based on

    the system function blocks SFB52 "RDREC" and SFB53 "WRREC" of the S7

    CPU.

    With the current implementation of these functions within the CPU, these need one

    "communication resource" wi