Standards Compliance According To IEC 61131-3 (3rd Edition)

2y ago
29 Views
3 Downloads
610.39 KB
44 Pages
Last View : 27d ago
Last Download : 3m ago
Upload by : Pierre Damon
Transcription

Standards compliance according to1IntroductionIEC 61131-3 (3rd Edition)Standards compliance in2STEP 7SIMATICSTEP 7Standards compliance according toIEC 61131-3 (3rd Edition)Function Manual04/2015A5E35932122-AA

Legal informationWarning notice systemThis manual contains notices you have to observe in order to ensure your personal safety, as well as to preventdamage to property. The notices referring to your personal safety are highlighted in the manual by a safety alertsymbol, notices referring only to property damage have no safety alert symbol. These notices shown below aregraded according to the degree of danger.DANGERindicates that death or severe personal injury will result if proper precautions are not taken.WARNINGindicates that death or severe personal injury may result if proper precautions are not taken.CAUTIONindicates that minor personal injury can result if proper precautions are not taken.NOTICEindicates that property damage can result if proper precautions are not taken.If more than one degree of danger is present, the warning notice representing the highest degree of danger willbe used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating toproperty damage.Qualified PersonnelThe product/system described in this documentation may be operated only by personnel qualified for the specifictask in accordance with the relevant documentation, in particular its warning notices and safety instructions.Qualified personnel are those who, based on their training and experience, are capable of identifying risks andavoiding potential hazards when working with these products/systems.Proper use of Siemens productsNote the following:WARNINGSiemens products may only be used for the applications described in the catalog and in the relevant technicaldocumentation. If products and components from other manufacturers are used, these must be recommendedor approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation andmaintenance are required to ensure that the products operate safely and without any problems. The permissibleambient conditions must be complied with. The information in the relevant documentation must be observed.TrademarksAll names identified by are registered trademarks of Siemens AG. The remaining trademarks in this publicationmay be trademarks whose use by third parties for their own purposes could violate the rights of the owner.Disclaimer of LiabilityWe have reviewed the contents of this publication to ensure consistency with the hardware and softwaredescribed. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, theinformation in this publication is reviewed regularly and any necessary corrections are included in subsequenteditions.Siemens AGDivision Digital FactoryPostfach 48 4890026 NÜRNBERGGERMANYA5E35932122-AA 05/2015 Subject to changeCopyright Siemens AG 2015.All rights reserved

Table of contents1Introduction . 52Standards compliance in STEP 7 . 7Standards compliance according to IEC 61131-3 (3rd Edition)Function Manual, 04/2015, A5E35932122-AA3

Table of contentsStandards compliance according to IEC 61131-3 (3rd Edition)4Function Manual, 04/2015, A5E35932122-AA

Introduction1The IEC61131 standard is applicable for the programmable logic controllers (PLC).In accordance with the rules of the European Union, this international standard has beenaccepted in Germany as DIN EN 61131, in France as NF EN 61131, and in Britain asBS EN 61131.The most important parts of the standard are quoted below. Quotes are in italics.Part 3 of this standard defines the "Area of application" in Section 1.“This Part of IEC 61131 specifies syntax and semantics of programming languages forprogrammable controllers as defined in Part 1 of the IEC 61131.The functions of program entry, testing, monitoring, operating system, etc., are specified inPart 1.This part of IEC 61131 specifies the syntax and semantics of a unified suite of programminglanguages for PLCs. These consist of textual languages, IL (Instruction List) and ST(Structured Text), and two graphical languages, LD (Ladder Diagram) and FBD (FunctionBlock Diagram).Sequential Function Chart (SFC) elements are defined for structuring the internalorganization of programmable controller programs and function blocks. Also, configurationelements are defined which support the installation of programmable controller programs intoprogrammable controller systems."The programming language elements defined in this part may be used in an interactiveprogramming environment. The specification of such environments is beyond the scope ofthis standard; however, such an environment shall be capable of producing textual orgraphic program documentation in the formats specified in this part.Section 5 "Standards compliance" specifies:"A programmable controller system, as defined in IEC 61131-1, which claims to comply,wholly or partially, with the requirements of this Part of IEC 61131 shall do so only asdescribed below: “Standards compliance according to IEC 61131-3 (3rd Edition)Function Manual, 04/2015, A5E35932122-AA5

IntroductionSection 5.3 "Compliance declaration of the manufacturer" specifies:"The manufacturer may define any consistent subset of characteristics that are listed in thecharacteristic tables, and must make known the available subset in the "Compliancedeclaration of the manufacturer".The compliance declaration of the manufacturer must be contained in the documentationthat is included with the system, or it must be generated by the system itself.The format of the compliance declaration of the manufacturer must provide the followinginformation. Figure 4 in the standard shows an example. The general information shall include the name and address of the manufacturer, thename and version of the product, the type and version of the controller and the revisiondate. The number of the corresponding characteristics table, the characteristics number andthe applicable programming language must be specified for each implementedcharacteristic. The title and subtitle of the characteristics table, the description of the characteristic,examples, manufacturers remarks etc. are optional.Table and characteristics that are not implemented can be omitted."Standards compliance according to IEC 61131-3 (3rd Edition)6Function Manual, 04/2015, A5E35932122-AA

2Standards compliance in STEP 7The programming languages of SIMATIC STEP 7 in TIA Portal meet the requirements ofIEC 61131-3 in the characteristics described in the following table: Instruction ListAWL/STL(corresponds to IEC 61131-3 language "AWL/STL") Ladder LogicKOP/LAD(corresponds to IEC 61131-3 language "KOP/LD") Function Block DiagramFUP/FBD(corresponds to IEC 61131-3 language "FUP/FBD") Structured Control Language(SCL)SCL(corresponds to IEC 61131-3 language "ST") S7-GRAPHGRAPH(corresponds to IEC 61131-3 language "AS/SFC").The standard defines all standardized language elements in the form of tables, the rows ofwhich refer to the realized feature with a number.The language elements which are realized in STEP 7 according to the standard are specifiedbelow.A good knowledge of the norm mentioned is a prerequisite for understanding the followingtables.The English version of DIN EN 61131-3 : 2013-02 (3rd Edition) is available fromBeuth Verlag GmbH, 10787 Berlin, Fax 49 (030) 2601-1260.IEC 61131-3 “PLC Programming Languages”Implementer: Siemens AG.Product: STEP 7 in TIA PortalDate: 2014-07-21This Product complies with the requirements of the standard for the following language features:FeatureNo.Table Number and Title /CompliantlyFeature DescriptionimplementedImplementer’snotein the language ( )LDFBDILSTTable 1 – Character set1“ISO/IEC 10646 2011 2aLower case characters:a, b, c 2bNumber sign:#See Table 2 2cDollar sign: See Table 3 Standards compliance according to IEC 61131-3 (3rd Edition)Function Manual, 04/2015, A5E35932122-AA7

Standards compliance in STEP 7Table 2 - Identifiers1Upper case letters and numbers: IW215 2Upper and lower case letters, numbers, embedded underscore 3Upper and lower case, numbers, leading or embeddedunderscore Table 3 - Comments1Single-line comment with // 2aMulti-line comment with (* *)2bMulti-line comment with /* */3aNested comment with (* . (* . *) .*)3bNested comment with /* . /* . */ . */1Pragma with { } curly brackets Table 4 - Pragma In source filesof blocksTable 5 – Numeric literals1 Real literal -12.0 Real literals with exponent 1.34E-12 Binary literal 2#1111 1111 Octal literals 8#377 Hexadecimal literal 16#FF Boolean zero and one 8Boolean FALSE and TRUE 9Typed literal INT#-123 234567Integer literal -12Table 6 – Character string literalsSingle-byte characters or character strings with ‘ ‘1aEmpty string (length zero) 1bString of length one or character CHAR containing a single character 1cString of length one or character CHAR containing the“space” character 1dString of length one or character CHAR containing the“single quote” character 1eString of length one or character CHAR containing the“double quote” character Possible usingfeature 1gStandards compliance according to IEC 61131-3 (3rd Edition)8Function Manual, 04/2015, A5E35932122-AA

Standards compliance in STEP 7Table 6 – Character string literals1fSupport of two character combinations of Table 7 1gSupport of a character representation with ‘ ’ and twohexadecimal characters Double-byte characters or character strings with " "2aEmpty string (length zero)2bString of length one or character WCHAR containing asingle character2cString of length one or character WCHAR containing the“space” character2dString of length one or character WCHAR containing the“single quote” character2eString of length one or character WCHAR containing the“double quote” character2fSupport of two character combinations of Table 72gSupport of a character representation with ‘ ’ and fourhexadecimal charactersSingle-byte typed characters or string literals with #3aTyped string 3bTyped character 4aTyped double-byte string (using “double quote” character)4bTyped double-byte character (using “double quote” character)4cTyped double-byte string (using “single quote” character)4dTyped double-byte character (using “single quote” character)Double-byte typed string literals with # (NOTE)Table 7 – Two-character combinations in characterstrings1Dollar sign 2Single quote 3Line feed 4Newline 5Form feed (page) 6Carriage return 7Tabulator 8Double quote Standards compliance according to IEC 61131-3 (3rd Edition)Function Manual, 04/2015, A5E35932122-AA9

Standards compliance in STEP 7Table 8 – Duration literalsDuration abbreviations1ad 1bh 1cm 1ds 1ems 1fus (no μ available.)ns1gDuration literals without underscore2ashort prefix 2blong prefix Duration literals with underscore3ashort prefix 3blong prefix Table 9 – Date and time of day literals1aDate literal (long prefix) 1bDate literal (short prefix) 2aLong date literal (long prefix) 2bLong date literal (short prefix) 3aTime of day literal (long prefix) 3bTime of day literal (short prefix) 4aLong time of day literal (short prefix) 4bLong time of day literal (long prefix) 5aDate and time literal (long prefix) 5bDate and time literal (short prefix) 6aLong date and time literal (long prefix) 6bLong date and time literal (short prefix) Boolean BOOL Short integer SINT Integer INT Double integer DINT Long integer LINT Unsigned short integer USINT Unsigned integer UINT Unsigned double integer UDINT Unsigned long integer ULINT Real numbers REAL Tabelle 10 – Elementare Datentypen12345678910Standards compliance according to IEC 61131-3 (3rd Edition)10Function Manual, 04/2015, A5E35932122-AA

Standards compliance in STEP 7Tabelle 10 – Elementare 192021Long reals LREAL Duration TIME Date (only) DATE Time of day (only) TIME OF DAY or TOD Long time of day (only) LTIME OF DAY or LTOD Date and time of Day) DATE AND TIME or DT Long date and time of day LDATE AND TIME or LDT Variable-length single-byte character string STRING Single-byte character CHAR Bit string of length 8 BYTE Bit string of length 16 WORD Bit string of length 32 DWORD Bit string of length 64 LWORD Long duration LTIMELong date (only) LDATEVariable-length double-byte character string WSTRINGDouble-byte character WCHARTable 11 – Declaration of user-defined data types andinitialization1aEnumerated data types1b2aData types with named values2b3aSubrange data types3b4aArray data types4b5aFB types and classes as array elements5b6aStructured data type6b7aFB types and classes as structure elements7b8a8b9a10a10bStructured data type with relative addressing ATStructured data type with relative addressingAT and OVERLAPDirectly represented elements of a structure –partly specified using “ *Standards compliance according to IEC 61131-3 (3rd Edition)Function Manual, 04/2015, A5E35932122-AA11

Standards compliance in STEP 7Table 11 – Declaration of user-defined data types andinitialization11aDirectly derived data types11b12Initialization using constant expressionsTable 12 – Reference operationsDeclaration1Declaration of a reference typeAssignment and comparison2aAssignment reference to reference2bAssignment reference to parameter of function, functionblock and method2cComparison with NULLReferencing3aREF( variable )Provides of the typed reference to the variable3bREF( function block instance )Provides the typed reference to the function block orclass instanceDereferencing4 reference Provides the content of the variable or the content of theinstance to which the reference variable contains thereferenceTable 13 – Declaration of variables1Variable with elementary data type 2Variable with user-defined data type 3Array 4ReferenceTable 14 – Initialization of variables1Initialization of a variable with elementary data type 2Initialization of a variable with user-defined data type 3Array 4Declaration and initialization of constants 5Initialization using constant expressions6Initialization of a referenceGlobal constantsStandards compliance according to IEC 61131-3 (3rd Edition)12Function Manual, 04/2015, A5E35932122-AA

Standards compliance in STEP 7Table 15 – Variable-length ARRAY variables1Declaration using *ARRAY [*, *, . . . ] OF data typeStandard functions LOWER BOUND / UPPER BOUND2aGraphical representation2bTextual representationTable 16 – Directly represented variablesLocation (NOTE 1)1Input location I Memory location M 4aSingle bit size X 4bSingle bit size None 5Byte (8 bits) size B Double word (32 bits) size D BYTE – bit VB2.%X023Output location QSize678Word (16 bits) size WLong (quad) word (64 bits) size LAddressing91011Simple addressing %IX1Hierarchical addressing using “. %QX7.5Partly specified variables using asterisk ”*”Table 17 – Partial access of ANY BIT variablesData Type - Access to1a1b1c1d2a2b2c3a3b4 WORD – bit VW3.%X15 DWORD - bit LWORD - bit WORD – byte VW4.%B0 DWORD - byte LWORD - byte DWORD - word LWORD - word LWORD – dword VL5.%D1 Standards compliance according to IEC 61131-3 (3rd Edition)Function Manual, 04/2015, A5E35932122-AA13

Standards compliance in STEP 7Table 18 – Execution control graphically using EN andENO1Usage without EN and ENO Depends on theused function2Usage of EN only Depends on theused function Depends on theused functionVoid used todefine3(without ENO)Usage of ENO only(without EN)4Usage of EN and ENO1aWithout result 1bWith result 2aInputs 2bOutputs 2cIn-outs 2dTemporary variables 2eTemporary variables2fExternal variables2gExternal constants3aInitialization of inputsTable 19 – Function declarationFUNCTION . END FUNCTIONFUNCTION name : data type END FUNCTIONVAR INPUT.END VARVAR OUTPUT.END VARVAR IN OUT.END VARVAR TEMP.END VARVAR.END VARVAR EXTERNAL.END VARVAR EXTERNAL CONSTANT.END VAR3bInitialization of outputs3cInitialization of temporary variablesStandards compliance according to IEC 61131-3 (3rd Edition)14Function Manual, 04/2015, A5E35932122-AA

Standards compliance in STEP 7Table 20 – Function call1aComplete formal call (textual only) NOTE This is used if EN/ENO is necessary in calls.1bIncomplete formal call (textual only)NOTE This is used if EN/ENO is not necessary in calls.2Non-formal call (textual only)(fix order and complete)NOTE This is used for call of standard functions withoutformal names.3Function without function result 4Graphical representation 5Usage of negated boolean input and output in graphicalrepresentation 6Graphical usage of VAR IN OUT1aOverloaded function1bConversion of inputs2aTyped functions: 2bConversion: Void used todefineTable 21 – Typed and overloaded functions ADD (ANY Num to ANY Num)ANY ELEMENT TO INTADD INTWORD TO INTUsing the correct function issupported bythe editorTable 22 – Data type conversion function1aTyped conversion1bOverloaded conversion2a“Old” overloaded truncation2bTyped truncation2cOverloaded truncation3aTyped3bOverloadedinput TO outputTO outputTRUNCinput TRUNC outputTRUNC outputinput BCD TO output Convert ofBCD16 andBCD32BCD TO outputStandards compliance according to IEC 61131-3 (3rd Edition)Function Manual, 04/2015, A5E35932122-AA15

Standards compliance in STEP 7Table 22 – Data type conversion function4aTyped4bOverloadedinput TO BCD outputTO BCD outputTable 23 – Data type conversion of numeric data types1LREAL TO REAL 2LREAL TO LINT 3LREAL TO DINT 4LREAL TO INT 5LREAL TO SINT 6LREAL TO ULINT 7LREAL TO UDINT 8LREAL TO UINT 9LREAL TO USINT 10REAL TO LREAL 11REAL TO LINT 12REAL TO DINT 13REAL TO INT 14REAL TO SINT 15REAL TO ULINT 16REAL TO UDINT 17REAL TO UINT 18REAL TO USINT 19LINT TO LREAL 20LINT TO REAL 21LINT TO DINT 22LINT TO INT 23LINT TO SINT 24LINT TO ULINT 25LINT TO UDINT 26LINT TO UINT 27LINT TO USINT 28DINT TO LREAL 29DINT TO REAL 30DINT TO LINT 31DINT TO INT 32DINT TO SINT 33DINT TO ULINT 34DINT TO UDINT 35DINT TO UINT 36DINT TO USINT Standards compliance according to IEC 61131-3 (3rd Edition)16Function Manual, 04/2015, A5E35932122-AA

Standards compliance in STEP 7Table 23 – Data type conversion of numeric data types37INT TO LREAL 38INT TO REAL 39INT TO LINT 40INT TO DINT 41INT TO SINT 42INT TO ULINT 43INT TO UDINT 44INT TO UINT 45INT TO USINT 46SINT TO LREAL 47SINT TO REAL 48SINT TO LINT 49SINT TO DINT 50SINT TO INT 51SINT TO ULINT 52SINT TO UDINT 53SINT TO UINT 54SINT TO USINT 55ULINT TO LREAL 56ULINT TO REAL 57ULINT TO LINT 58ULINT TO DINT 59ULINT TO INT 60ULINT TO SINT 61ULINT TO UDINT 62ULINT TO UINT 63ULINT TO USINT 64UDINT TO LREAL 65UDINT TO REAL 66UDINT TO LINT 67UDINT TO DINT 68UDINT TO INT 69UDINT TO SINT 70UDINT TO ULINT 71UDINT TO UINT 72UDINT TO USINT 73UINT TO LREAL 74UINT TO REAL 75UINT TO LINT 76UINT TO DINT 77UINT TO INT 78UINT TO SINT Standards compliance according to IEC 61131-3 (3rd Edition)Function Manual, 04/2015, A5E35932122-AA17

Standards compliance in STEP 7Table 23 – Data type conversion of numeric data types79UINT TO ULINT 80UINT TO UDINT 81UINT TO USINT 82USINT TO LREAL 83U

accepted in Germany as DIN EN 61131, in France as NF EN 61131, and in Britain as BS EN 61131. The most important parts of the standard are quoted below. Quotes are in italics. Part 3 of this standard defines the "Area of application" in Section 1. “This Part of IEC 61131 specifies syntax and semantics of programming languages forFile Size: 610KB

Related Documents:

IEC 61215 IEC 61730 PV Modules Manufacturer IEC 62941 IEC 62093 IEC 62109 Solar TrackerIEC 62817 PV Modules PV inverters IEC 62548 or IEC/TS 62738 Applicable Standard IEC 62446-1 IEC 61724-1 IEC 61724-2 IEC 62548 or IEC/TS 62738 IEC 62548 or IEC/TS 62738 IEC 62548 or IEC/TS 62738 IEC 62548 or IEC/

IEC has formed IECRE for Renewable Energy System verification - Component quality (IEC 61215, IEC 61730, IEC 62891, IEC 62109, IEC 62093, IEC 61439, IEC 60947, IEC 60269, new?) - System: - Design (IEC TS 62548, IEC 60364-7-712, IEC 61634-9-1, IEC 62738) - Installation (IEC 62548, IEC 60364-7-712)

IEC 61869-9, IEC 62351 (all parts), IEC 62439-1:2010, IEC 62439-3:2010, IEC 81346 (all parts), IEC TS 62351- 1, IEC TS 62351- 2, IEC TS 62351- 4, IEC TS 62351- 5, Cigre JWG 34./35.11, IEC 60044 (all parts), IEC 60050 (all parts), IEC 60270:2000, IEC 60654-4:1987, IEC 60694:1

The new IEC 61439 series is expected to have a similar structure to IEC 60439 with several new additions*: IEC 60439 IEC 61439 Series IEC 61439-1 General rules IEC 61439-2 Power switchgear and controlgear assemblies IEC 61439-6 Busbar trunking systems IEC 61439-3 Distribution boards IEC 61439-4 Assemblies for construction sites IEC 61439-5

IEC 61968-4 IEC 61968- 6 IEC 61968-7 IEC 61968-8 IEC 61968-9 Applicable parts of IEC 61968 Series Network Operation (NO) IEC 61968-3 Operational Planning & Optimization (OP) IEC 61968-5 Bulk Energy Management (EMS) IEC 61970 & Applicable parts of IEC 61968 Series External Systems: Customer Account Management (ACT) Financial (FIN) Business .

IEC 60634-1 IEC 60050-826 IEC 60364-4-41 IEC 60364-4-42 IEC 60364-5-52 IEC/DIS 64(CO)9173 IEC 60204-32 IEC 60529-1989; IEC 60529 IEC 60529 Accident prevention regulation "Electrical systems and apparatus" Accident prevention regulatio

IEC 60034-7 IEC 60034-8 IEC 60034-9 IEC 60034-11 IEC 60034-12 IEC 60034-14 IEC 60034-30 IEC 60085 IEC 60038 IEC 60072 CEMER motors comply with the relevant European and International norms and regulations, in particular wi

The new IEC 61439 series is expected to have a similar structure to IEC 60439 with several new additions*: IEC 60439 IEC 61439 Series IEC 61439-1 General rules IEC 61439-2 Power switchgear and controlgear assemblies IEC 61439-6 Busbar trunking systems IEC 61439-3 Distribution boards IEC 61439-4 Assem