iec_61131_compliance.pdf

25
Copyright  Siemens AG 2013 1 Standards compliance according to IEC 61131-3 1. Introduction:  The IEC 61131 standard is applicable for the programmable logic controllers (PLC). In accordance with the rules of the European Union, this international standard has been 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 st andard defines the "Area of application" in Section 1. " This Part of IEC 61131 specifies syntax and semantics of programming languages for programmable controllers as defined in Part 1 of this Standard .  The functions of program entry, testing, monitoring, operating system, etc., are specified in Part 1. This part of IEC 61131 specifies the syntax and semantics of a unified suite of programming languages for PLCs. These consist of textual languages, IL (Instruction List) and ST (Structured Text), and two graphical languages, LD (Ladder Diagram) and FBD (Function Block Diagram). Sequential Function Chart (SFC) elements are defined for structuring the internal organization of programmable controller programs and function blocks. Also, configuration elements are defined which support the installation of programmable controller programs into programmable controller systems.... " The programming language elements defined in this part may be used in an interactive programming environment. The specification of such environments is beyond the scope of this standard; however, such an environment shall be capable of producing textual or graphic 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 as described below: " Section 5.3 "Compli ance declaration of the manufacturer" specifies: "The manufacturer may define any consistent subset of characteristics that are listed in the characteristic tables, and must make known the available subset in the "Compliance declaration of the manufacturer". The compliance declaration of the manufacturer must be contained in the documentation that 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 following information. Figure 4 shows an example.  The general information shall include the name and address of the manufacturer, the name and version of the product, the type and version of the controller and the revision date.  The number of the corresponding characteristics table, the characteristics number and the applicable programming language must be specified for each implemented characteristic.  The title and subtitle of the characteristics table, the description of the characteristic, examples, manufacturers remarks etc. are optional.

Upload: ioana-adriana-hirsch

Post on 01-Jun-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 1/25

Copyright  Siemens AG 2013

Standards compliance acco rding to IEC 61131-3

1. Introduction:  

The IEC 61131 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 as BS EN61131.The most important parts of the standard are quoted below. Quotes are in italics.

Part 3 of this st andard 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 this Standard . The functions of program entry, testing, monitoring, operating system, etc., are specified in Part1.

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 (StructuredText), and two graphical languages, LD (Ladder Diagram) and FBD (Function Block Diagram).

Sequential Function Chart (SFC) elements are defined for structuring the internal organization ofprogrammable controller programs and function blocks. Also, configuration elements are definedwhich support the installation of programmable controller programs into programmable controllersystems...."

The programming language elements defined in this part may be used in an interactiveprogramming environment. The specification of such environments is beyond the scope of thisstandard; however, such an environment shall be capable of producing textual or graphicprogram 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 as described below:… "

Section 5.3 "Compli ance declaration of the manufacturer" specifies:

"The manufacturer may define any consistent subset of characteristics that are listed in the characteristictables, and must make known the available subset in the "Compliance declaration of the manufacturer".

The compliance declaration of the manufacturer must be contained in the documentation that is includedwith the system, or it must be generated by the system itself.

The format of the compliance declaration of the manufacturer must provide the following information.Figure 4 shows an example.

•  The general information shall include the name and address of the manufacturer, the name andversion of the product, the type and version of the controller and the revision date.

•  The number of the corresponding characteristics table, the characteristics number and the applicableprogramming language must be specified for each implemented characteristic.

•  The title and subtitle of the characteristics table, the description of the characteristic, examples,manufacturers remarks etc. are optional.

Page 2: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 2/25

Page 3: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 3/25

Standard compliance according to IEC 61131-3

Copyright  Siemens AG 2013

IEC 61131-3 “PLC Programming Languages”

Implementer: Siemens AG.

Product:   STEP 7 V12.0

Date: 2013-04-01

This Product complies with the requirements of the standard for the following language features:

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

Table 1 – Character set

1 “ISO/IEC 10646 2011        

2a Lower case charactersa: a, b, c        

2b Number sign: # See Table 5        

2c Dollar sign: $ See Table 6        

Table 2 - Identif iers  

1 Upper case letters and numbers: I W215         

2 Upper and lower case letters, numbers, embedded underscore        

3 Upper and lower case, numbers, leading or embeddedunderscore

       

Table 3 - Comments  

1 Single-line comment with // …    

2a Multi-line comment with (* … *)  

Table 4 - Pragma 

1 Pragma with { … } curly brackets     In source filesfor blocks

Table 2 – Numeric literals  

1 Integer literal - 12         

2 Real literal - 12. 0         

3 Real literals with exponent 1. 34E- 12         

4 Binary literal 2#1111_ 1111        

5 Octal literals 8#377        

6 Hexadecimal literal 16#FF         

7 Boolean zero and one        

8 Boolean FALSE and TRUE        

9 Typed literal I NT#- 123         

Table 3 – Character string literals

Page 4: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 4/25

Page 5: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 5/25

Page 6: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 6/25

Standards compliance according to IEC 61131-3

6 Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

10 Real numbers REAL         

11 Long reals LREAL 

 

 

 

 12a Duration  TI ME         

12b Long duration LTI ME         

13a Date (only)  DATE         

14a Time of day (only)  TI ME_OF_ DAY or TOD         

14b Long time of day (only)  LTI ME_OF_DAY or LTOD         

15a Date and time of Day)  DATE_AND_TI ME or   DT         

15b Long date and time of day   LDATE_AND_TI ME or   LDT         

16a Variable-length single-byte character string  STRI NG         

17a Single-byte character   CHAR         

18 Bit string of length 8   BYTE         

19 Bit string of length 16  WORD         

20 Bit string of length 32  DWORD         

21 Bit string of length 64  LWORD         

Table 11 – Declaration of u ser-defined data typesand init ialization  

6a

6b

Structured data type        

Table 5 – Declaration o f variables  

1 Variable with elementary data type        

2 Variable with user-defined data type        

3 Array        

Table 6 – Init i alization of variables  

1 Initialization of a variable with elementary data type        

2 Initialization of a variable with user-defined data type        

3 Array        

4 Declaration and initialization of constants         Global constants

Table 7 – Directl y represented vari ables 

Location (NOTE 1) 

1 Input location I          

2 Output location Q         

3 Memory location M        

Size

Page 7: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 7/25

Page 8: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 8/25

Standards compliance according to IEC 61131-3

8 Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

2c In-outs

VAR_ I N_OUT. . . END_VAR

       

2d Temporary variables 

VAR_TEMP. . . END_VAR 

       

Table 11 – Function call  

1a Complete formal call (textual only)

NOTE This is used if EN/ENO is necessary in calls.

       

3 Function without function result         Void used todefine

4 Graphical representation    

5 Usage of negated boolean input and output in graphical

representation

   

Table 12 – Typed and overl oaded functi ons  

1a Overloaded function

ADD (ANY _Num to ANY _Num)

 

2a a  Typed functions:

ADD_ I NT 

    Using thecorrect functionis supported bythe editor

2b a  Conversion:

WORD_TO_I NT 

       

Table 13 – Data type conversio n fun ction  

1a Typed conversion

input_TO_output

       

2ac  “Old” overloaded truncation

TRUNC

 

2bc  Typed truncationinput_TRUNC_output

   

3ad  Typed

input_BCD_TO_output

      Convert ofBCD16 andBCD32

Table 14 – Data type conversio n of n umeric d atatypes  

1 LREAL _TO_ REAL        

2 LREAL _TO_ LINT        

3 LREAL _TO_ DINT      

4 LREAL _TO_ INT      

5 LREAL _TO_ SINT      

6 LREAL _TO_ ULINT        

Page 9: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 9/25

Standard compliance according to IEC 61131-3

Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

7 LREAL _TO_ UDINT      

8 LREAL _TO_ UINT     

9 LREAL _TO_ USINT      

10 REAL _TO_ LREAL        

11 REAL _TO_ LINT      

12 REAL _TO_ DINT      

13 REAL _TO_ INT      

14 REAL _TO_ SINT      

15 REAL _TO_ ULINT      

16 REAL _TO_ UDINT      

17 REAL _TO_ UINT      

18 REAL _TO_ USINT      

19 LINT _TO_ LREAL        

20 LINT _TO_ REAL      

21 LINT _TO_ DINT        

22 LINT _TO_ INT      

23 LINT _TO_ SINT      

24 LINT _TO_ ULINT        

25 LINT _TO_ UDINT      

26 LINT _TO_ UINT      

27 LINT _TO_ USINT      

28 DINT _TO_ LREAL      

29 DINT _TO_ REAL      

30 DINT _TO_ LINT        

31 DINT _TO_ INT      

32 DINT _TO_ SINT      

33 DINT _TO_ ULINT      

34 DINT _TO_ UDINT      

35 DINT _TO_ UINT      

36 DINT _TO_ USINT      

37 INT _TO_ LREAL      

38 INT _TO_ REAL      

39 INT _TO_ LINT      

40 INT _TO_ DINT      

41 INT _TO_ SINT      

42 INT _TO_ ULINT      

43 INT _TO_ UDINT      

Page 10: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 10/25

Standards compliance according to IEC 61131-3

10 Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

44 INT _TO_ UINT      

45 INT _TO_ USINT     

46 SINT _TO_ LREAL      

47 SINT _TO_ REAL      

48 SINT _TO_ LINT      

49 SINT _TO_ DINT      

50 SINT _TO_ INT      

51 SINT _TO_ ULINT      

52 SINT _TO_ UDINT      

53 SINT _TO_ UINT      

54 SINT _TO_ USINT      

55 ULINT _TO_ LREAL        

56 ULINT _TO_ REAL      

57 ULINT _TO_ LINT        

58 ULINT _TO_ DINT      

59 ULINT _TO_ INT      

60 ULINT _TO_ SINT      

61 ULINT _TO_ UDINT        

62 ULINT _TO_ UINT      

63 ULINT _TO_ USINT      

64 UDINT _TO_ LREAL      

65 UDINT _TO_ REAL      

66 UDINT _TO_ LINT      

67 UDINT _TO_ DINT      

68 UDINT _TO_ INT      

69 UDINT _TO_ SINT      

70 UDINT _TO_ ULINT        

71 UDINT _TO_ UINT      

72 UDINT _TO_ USINT      

73 UINT _TO_ LREAL      

74 UINT _TO_ REAL      

75 UINT _TO_ LINT      

76 UINT _TO_ DINT      

77 UINT _TO_ INT      

78 UINT _TO_ SINT      

79 UINT _TO_ ULINT      

80 UINT _TO_ UDINT      

Page 11: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 11/25

Standard compliance according to IEC 61131-3

Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

81 UINT _TO_ USINT      

82 USINT _TO_ LREAL     

83 USINT _TO_ REAL      

84 USINT _TO_ LINT      

85 USINT _TO_ DINT      

86 USINT _TO_ INT      

87 USINT _TO_ SINT      

88 USINT _TO_ ULINT      

89 USINT _TO_ UDINT      

90 USINT _TO_ UINT      

Table 15 – Data type conversio n of b it data types  

1 LWORD _TO_ DWORD      

2 LWORD _TO_ WORD        

3 LWORD _TO_ BYTE      

4 LWORD _TO_ BOOL      

5 DWORD _TO_ LWORD      

6 DWORD _TO_ WORD      

7 DWORD _TO_ BYTE      

8 DWORD _TO_ BOOL      

9 WORD _TO_ LWORD        

10 WORD _TO_ DWORD      

11 WORD _TO_ BYTE      

12 WORD _TO_ BOOL      

13 BYTE _TO_ LWORD      

14 BYTE _TO_ DWORD      

15 BYTE _TO_ WORD      

16 BYTE _TO_ BOOL      

17 BYTE _TO_ CHAR      

18 BOOL _TO_ LWORD      

19 BOOL _TO_ DWORD      

20 BOOL _TO_ WORD      

21 BOOL _TO_ BYTE      

22 CHAR _TO_ BYTE      

23 CHAR _TO_ WORD      

24 CHAR _TO_ DWORD      

25 CHAR _TO_ LWORD      

Page 12: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 12/25

Standards compliance according to IEC 61131-3

12 Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

Table 16 – Data type conversion o f bit and nu merictypes  

1 LWORD _TO_ LREAL      

2 DWORD _TO_ REAL      

3 LWORD _TO_ LINT      

4 LWORD _TO_ DINT      

5 LWORD _TO_ INT      

6 LWORD _TO_ SINT      

7 LWORD _TO_ ULINT        

8 LWORD _TO_ UDINT      

9 LWORD _TO_ UINT      

10 LWORD _TO_ USINT      

11 DWORD _TO_ LINT      

12 DWORD _TO_ DINT      

13 DWORD _TO_ INT      

14 DWORD _TO_ SINT      

15 DWORD _TO_ ULINT      

16 DWORD _TO_ UDINT      

17 DWORD _TO_ UINT      

18 DWORD _TO_ USINT      

19 WORD _TO_ LINT      

20 WORD _TO_ DINT      

21 WORD _TO_ INT      

22 WORD _TO_ SINT      

23 WORD _TO_ ULINT      

24 WORD _TO_ UDINT      

25 WORD _TO_ UINT      

26 WORD _TO_ USINT      

27 BYTE _TO_ LINT      

28 BYTE _TO_ DINT      

29 BYTE _TO_ INT      

30 BYTE _TO_ SINT      

31 BYTE _TO_ ULINT      

32 BYTE _TO_ UDINT      

Page 13: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 13/25

Standard compliance according to IEC 61131-3

Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

33 BYTE _TO_ UINT      

34 BYTE _TO_ USINT

 

 

 

35 BOOL _TO_ LINT      

36 BOOL _TO_ DINT      

37 BOOL _TO_ INT      

38 BOOL _TO_ SINT      

39 BOOL _TO_ ULINT      

40 BOOL _TO_ UDINT      

41 BOOL _TO_ UINT      

42 BOOL _TO_ USINT      

43 LREAL _TO_ LWORD      

44 REAL _TO_ DWORD      

45 LINT _TO_ LWORD      

46 LINT _TO_ DWORD      

47 LINT _TO_ WORD      

48 LINT _TO_ BYTE      

49 DINT _TO_ LWORD      

50 DINT _TO_ DWORD      

51 DINT _TO_ WORD      

52 DINT _TO_ BYTE      

53 INT _TO_ LWORD      

54 INT _TO_ DWORD      

55 INT _TO_ WORD      

56 INT _TO_ BYTE      

57 SINT _TO_ LWORD      

58 SINT _TO_ DWORD      

59 SINT _TO_ WORD      

60 SINT _TO_ BYTE      

61 ULINT _TO_ LWORD        

62 ULINT _TO_ DWORD      

63 ULINT _TO_ WORD      

64 ULINT _TO_ BYTE      

65 UDINT _TO_ LWORD      

66 UDINT _TO_ DWORD      

67 UDINT _TO_ WORD      

Page 14: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 14/25

Standards compliance according to IEC 61131-3

14 Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

68 UDINT _TO_ BYTE      

69 UINT _TO_ LWORD

 

 

 

70 UINT _TO_ DWORD      

71 UINT _TO_ WORD      

72 UINT _TO_ BYTE      

73 USINT _TO_ LWORD      

74 USINT _TO_ DWORD      

75 USINT _TO_ WORD      

76 USINT _TO_ BYTE      

Table 17 – Data type conversion of date and time types

1 LTIME _TO_ TIME      

2 TIME _TO_ LTIME      

3 LDT _TO_ DT      

4 LDT _TO_ DATE      

5 LDT _TO_ LTOD      

6 LDT _TO_ TOD      

7 DT _TO_ LDT      

8 DT _TO_ DATE      

9 DT _TO_ LTOD      

10 DT _TO_ TOD      

11 LTOD _TO_ TOD      

12 TOD _TO_ LTOD      

Table 18 – Data type conversio n of c haracter types  

4 STRING _TO_ CHAR      

7 CHAR _TO_ STRING      

Table 19 – Numerical and arith metic func tions

General funct ions

1 ABS( x)        

2 SQRT( x)

 

 

 

 Logar i thmic funct ions

3 LN( x)        

4 LOG( x)

5 EXP( x)        

Trigonometr ic funct ions

6 SI N( x)        

Page 15: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 15/25

Standard compliance according to IEC 61131-3

Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

7 COS( x)        

8  TAN( x)       

9 ASI N( x)        

10 ACOS( x)        

11 ATAN( x)        

Table 20 – Arithmetic fun ction s  

Extensible arithmetic funct ions

1    Add it ion       

2 Multiplication       

Non-extensible arithmetic funct ions

Subtraction 

 

 

 

4   Division       

5   Modulo       

6   Exponentiation       

7   Move      

Table 21 – Bit shift fun ction s

1 Shift left SHL         

2 Shift right SHR        

3 Rotation left ROL         

4 Rotation right ROR        

Table 31 – Bitwise Boolean functi ons

1 And (&)        

2 Or (>=1)        

3 Exclusive Or        

4 Not        

Table 22 – Selection fun ction s

1 Move(assignment)

MOVE        

2 Binary selection SEL         

3 Extensiblemaximum function 

MAX         

4 Extensibleminimum function 

MIN         

5 Limiter LIMIT         

6 Extensible multiplexer MUX       

Page 16: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 16/25

Standards compliance according to IEC 61131-3

16 Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

Table 23 – Comparis on fun ctions

1 Decreasing sequence  GT >        

2 Monotonic sequence  GE >=        

3 Equality EQ =        

4 Monotonic sequence  LE <=        

5 Increasing sequence  LT <        

6 Inequality NE <>        

Table 24 – Character strin g funct ions

1 String length LEN        

2 Left LEFT         

3 Right RI GHT        

4 Middle MI D        

5 Extensibleconcatenation

CONCAT        

6 Insert I NSERT        

7 Delete DELETE        

8 Replace REPLACE         

9 Find FI ND        

Table 25 – Numerical fun ction s of t ime and duratio ndata types

1a ADD  

1b ADD_TI ME    

1c ADD_LTI ME    

2a ADD  

2b ADD_TOD_TI ME    

2c ADD_LTOD_LTI ME    

3a ADD  

3b ADD_DT_ TI ME    

3c ADD_LDT_LTI ME    

4a SUB  

4b SUB_TI ME    

4c SUB_LTI ME    

5a SUB  

5b SUB_DATE_ DATE    

5c SUB_LDATE_L DATE    

6a SUB  

6b SUB_TOD_TI ME    

Page 17: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 17/25

Standard compliance according to IEC 61131-3

Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

6c SUB_LTOD_LTI ME    

7a SUB  

7b SUB_TOD_TOD    

7c SUB_TOD_TOD    

8a SUB  

8b SUB_DT_TI ME    

8c SUB_LDT_LTI ME    

9a SUB  

9c SUB_LDT_LDT    

10a MUL  

11a DI V  

Table 26 – Addition al functio ns of t ime data types

CONCAT and SPLIT

1a CONCAT_ DATE_ TOD      

1b CONCAT_ DATE_ LTOD      

Table 27 – Function block type declaration

1 Declaration of function block typeFUNCTI ON_BLOCK . . .

END_FUNCTI ON_BLOCK  

       

2a Declaration of inputsVAR_ I NPUT . . . END_VAR

       

2b Declaration of outputsVAR_OUTPUT . . . END_VAR

       

2c Declaration of in-outsVAR_ I N_OUT . . . END_VAR

       

2d Declaration of temporary variables VAR_TEMP  . . . END_VAR 

       

2e Declaration of stat ic  variables VAR . . . END_VAR

       

3a Initialization of inputs        

3b Initialization of outputs        

3c Initialization of static variables         

- EN/ ENO inputs and outputs See table 18

4a Declaration of   RETAI N qualifieron input variables

       

4b Declaration of   RETAI N qualifieron output variables

       

4c Declaration of   NON_RETAI N qualifieron input variables

       

4d Declaration of   NON_RETAI N qualifieron output variables

       

Page 18: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 18/25

Standards compliance according to IEC 61131-3

18 Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

4e Declaration of   RETAI N qualifieron static variables

       

4f Declaration of   NON_RETAI N qualifieron static variables

       

Table 41 – Function block instance declaration

1 Declaration of FB instance(s)        

Table 28 – Function block call

1 Complete formal call (textual only)

Is used if EN/ENO is necessary in calls.

   

2  Incomplete formal call (textual only)    

3 Graphical call    

4 Graphical call with negated boolean input and output    

6a Textual Call with separate assignment of input

FB_I nst ance. I nput : = x;  

   

6b Graphical call separate assignment of input    

7 Textual Output read after FB call

x: = FB_I nst ance. Out put ;  

   

8a Textual output assigned in FB call    

Table 29 – Standard bistabl e function bl ocks

1a Bistable function block (set dominant): SR( S1, R, Q1)  

+- - - - - +| SR |

BOOL- - - | S1 Q1| - - - BOOLBOOL- - - | R |

+- - - - - + 

       

2a Bistable function block (reset dominant): RS( S, R1, Q1)  

+- - - - - +| RS |

BOOL- - - | S Q1| - - - BOOLBOOL- - - | R1 |

+- - - - - + 

       

Table 30 – Standard edge detection fu nctio n bloc ks

Page 19: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 19/25

Standard compliance according to IEC 61131-3

Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

1  Rising edge detector: R_TRI G( CLK, Q)  

+- - - - - - - - +| R_TRI G |BOOL - - | CLK Q| - - BOOL

+- - - - - - - - + 

 

 

 

2  Falling edge detector: F_TRI G( CLK, Q)  

+- - - - - - - - +| F_TRI G |

BOOL - - | CLK Q| - - BOOL+- - - - - - - - + 

     

Table 31 – Standard coun ter functi on blo cks

Up-Counter

1a   CTU_I NT( CU, R, PV, Q, CV) or   CTU( . . )          

+- - - - - +| CTU |

BOOL- - - >CU Q| - - - BOOLBOOL- - - | R |

I NT- - - | PV CV| - - - I NT+- - - - - + 

and also:

+- - - - - - - - - - - - +| CTU_I NT |

BOOL- - - >CU Q| - - - BOOLBOOL- - - | R |I NT- - - | PV CV| - - - I NT

+- - - - - - - - - - - - +

1b CTU_DI NT PV, CV: DI NT        

1c CTU_LI NT  PV, CV: LI NT 

       

1d CTU_UDI NT PV, CV: UDI NT        

1e CTU_ULI NT(CD, LD, PV, CV) PV, CV: ULI NT         

Down-counters

2a CTD_I NT(CD, LD, PV, Q, CV) or   CTD        

+-- - - -+  | CTD |

BOOL- - - >CD Q| - - - BOOLBOOL- - - | LD |I NT- - - | PV CV| - - - I NT

+- - - - -+

and also:

+- - - - - - - - - - - +  | CTD_I NT |BOOL- - - >CD Q| - - - BOOLBOOL- - - | LD |I NT- - - | PV CV| - - - I NT

+- - - - - - - - - - - +

 

2b CTD_DI NT PV, CV: DI NT        

2c CTD_LI NT PV, CV: LI NT        

2d CTD_UDI NT PV, CV: UDI NT        

Page 20: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 20/25

Standards compliance according to IEC 61131-3

20 Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

2e CTD_ULI NT PV, CV: UDI NT        

Up-down counters3a CTUD_I NT( CD, LD, PV, Q, CV) or   CTUD( . . )        

+- - - - - - - - - - - +  | CTUD |

BOOL- - - >CU QU| - - - BOOLBOOL- - - >CD QD| - - - BOOLBOOL- - - | R |BOOL- - - | LD |I NT- - - | PV CV| - - - I NT

+- - - - - - - - - - - +

and also:

+- - - - - - - - - - - +  | CTUD_I NT |

BOOL- - - >CU QU| - - - BOOLBOOL- - - >CD QD| - - - BOOL

BOOL- - - | R |BOOL- - - | LD |I NT- - - | PV CV| - - - I NT

+- - - - - - - - - - - +

 

3b CTUD_DI NT PV, CV: DI NT        

3c CTUD_LI NT PV, CV: LI NT        

3d CTUD_UDI NT PV, CV: UDI NT        

3e CTUD_ULI NT PV, CV: ULI NT         

Table 32 – Standard timer fun ction b locks

1a Pulse, overloaded  TP 

1b Pulse using TIME        

1c Pulse using LTIME        

2a On-delay, overloaded  TON 

2b On-delay using TIME        

2c On-delay using LTIME        

2d On-delay, overloaded (Graphical)

3a Off-delay, overloaded  TOF 

3b Off-delay using TIME        

3c Off-delay using LTIME        

Table 33 – SFC step Valid for SFC(Graph)

1a Step – graphical form with directed links  

1b Initial step – graphical form with directed link  

3a Step flag – general form *** . X = BOOL#1 when ***  is active, BOOL#0 otherwise

 

3b Step flag – direct connection of Boolean variable  * ** . X toright side of step

 

4 Step elapsed time – general form  

Page 21: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 21/25

Standard compliance according to IEC 61131-3

Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

* ** . T =a variable of type TI ME 

Table 34 – SFC transiti on and transit ion con ditio nValid for SFC(Graph) 

2 Transition condition physically or logically adjacent to thetransition using LD language

 

3 Transition condition physically or logically adjacent to thetransition using FBD language

 

9 Use of transition name  

Table 35 – SFC declaration o f action s Valid for SFC(Graph) 

1  Any Boo lean var iable dec lared in a VAR o r VAR_OUTPUT block, or their graphical equivalents, can be an action.

 

Table 36 – Step/action asso ciation Valid for SFC

(Graph) 

1 Action block physically or logically adjacent to the step  

2 Concatenated action blocks physically or logically adjacent tothe step

 

Table 37 – Action qualif i ers Valid for SFC(Graph) 

2 Non-stored N   

3 overriding Reset R   

4 Set (Stored) S   

5 time L imited L   

6 time Delayed D   

Table 38 – Action cont rol features

1 With final scan  

Table 39 – Sequence evolutio n – graphic al Valid for SFC(Graph) 

1 Single sequence  

2a Divergence of sequencewith left to right priority

 

3 Convergence of sequence  

4a Simultaneous divergenceafter a single transition

 

4b Simultaneous divergenceafter conversion

 

4c Simultaneous convergencebefore one transition

 

4d Simultaneous convergencebefore a sequence selection

 

5a,b,c Sequence skip  

6a, b, Sequence loop  

Page 22: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 22/25

Page 23: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 23/25

Standard compliance according to IEC 61131-3

Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

16b Boolean AND  AND  

17 Boolean Exclusive OR  XOR

 18 Boolean OR  OR  

Table 43 – ST language statements

 As si gnmen t

1 Variable := expression;   

1a Variable and expression of elementary data type  

1b Variables and expression of different elementary data typeswith implicit type conversion according Figure 11

 

1c Variable and expression of user-defined type  

Call 

2a Function call  

2b Function block call and FB output usage  

3 RETURN  

Select ion 

4 I F . . .

 THEN . . .

EL SI F . . . THEN . . .

ELSE . . . END_I F

 

5 CASE . . . OF

. . .

ELSE . . .

END_CASE

 

I terat ion

6 FOR . . . TO . . . BY . . . DO

. . .END_FOR

 

7 WHI LE . . . DO

. . .

END_WHI LE

 

8 REPEAT . . .

UNTI L . . .

END_REPEAT 

 

9 CONTI NUE  

10 EXI T an iteration  

11 Empty Statement  

Table 44 – Graphic executi on cont rol elements

Page 24: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 24/25

Standards compliance according to IEC 61131-3

24 Copyright  Siemens AG 2013

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

Uncondit ional ju mp

1a FBD language 1- - - - >>LABELA   

1b LD language |  +- - - - >>LABELA|  

 

Condit ional jump

2a FBD language Example: jump condit ion, jum p t arget

X- - - - >>LABELB 

+- - - +bvar 0- - - | & | - - - >>NEXTbvar50- - | |

+- - - +NEXT:

+- - - +bvar 5- - - | >=1| - - - bOut 0bvar60- - | |

+- - - +

   

2b LD language Example: jump condi tion, jum p target

| X+- | | - - - - >>LABELB||| bvar0 bvar 50+- - - | | - - - - - | | - - - >>NEXT

||NEXT:| bvar5 bOut 0 |+- - - - | | - - - - +- - - - ( ) - - - +| bvar 60 | |+- - - - | | - - - - + || |  

 

Condit ional return

3a LD language  | X+- - | | - - - <RETURN>|  

 

3b FBD language  X- - - <RETURN>   

Uncondit ional

return

4 LD language  |+- - - <RETURN>|  

 

Table 45 – Power rails and link elements

1 Left power rail(with attached horizontal link)

|+- - -|

 

Page 25: IEC_61131_compliance.pdf

8/9/2019 IEC_61131_compliance.pdf

http://slidepdf.com/reader/full/iec61131compliancepdf 25/25

Standard compliance according to IEC 61131-3

FeatureNo.

Table Number and Title /

Feature Descript i on  

Compliant lyimplemented

in the language ()

Implementer’snote

LD FBD IL ST

3 Horizontal link -----------  

4 Vertical link(with attached horizontal links) |- - - - +- - - -- - - - +

|+- - - -

 

Table 46 – Contacts

Static contacts

1 Normally open contact ***- - | | - -

 

2 Normally closed contact ***- - | / | - -

 

Transit ion-sensing contacts

3 Positive transition-sensing contact ***- - | P | - -

 

4 Negative transition-sensing contact ***- - | N| - -

 

5a Compare contact (typed)

<cmp>

<operand 1>

<operand 2>

 DT

 

 

Table 47 – Coils

1 Coil ***- - ( ) —

 

2 Negated coil ***- - ( / ) —

 

Latched coils

3 Set (latch) coil ***- - ( S ) —

 

4 Reset (unlatch) coil.

***- - ( R) —

 

Transit ion-sensing coils

8 Positive transition-sensing coil ***- - ( P ) —

 

9 Negative transition-sensing coil ***- - ( N) —