F O U N D A T I O N
®
PLCopen and OPC Foundation:
OPC UA Information Model
for IEC 61131-3
-
Release 1.00
March 24, 2010
OPC UA Information Model for IEC 61131-3 – ii – Release 1.00
CONTENTS
Page
1 Scope ............................................................................................................................... 1
2 Reference documents ....................................................................................................... 1
3 Terms, definitions, and conventions .................................................................................. 2
3.1 Use of terms ............................................................................................................ 2
3.2 IEC 61131-3 ............................................................................................................ 2
3.3 OPC UA Part 1 terms .............................................................................................. 2
3.4 OPC UA Part 3 terms .............................................................................................. 3
3.5 OPC UA DI terms .................................................................................................... 3
3.6 IEC 61131-3 UA Information Model terms ................................................................ 3
3.6.1 Controller .................................................................................................... 3
3.7 Abbreviations and symbols ...................................................................................... 3
3.8 Fundamentals .......................................................................................................... 3
3.8.1 Introduction to IEC 61131-3 ......................................................................... 3
3.8.2 Introduction to OPC Unified Architecture ..................................................... 7
3.8.3 Introductory Example ................................................................................. 11
3.8.4 Use Cases ................................................................................................. 13
3.9 Conventions used in this document ....................................................................... 15
3.9.1 Conventions for Node descriptions ............................................................ 15
3.9.2 NodeIds and BrowseNames ....................................................................... 16
3.9.3 Common Attributes .................................................................................... 17
3.9.4 Reference to IEC 61131-3 Definitions ........................................................ 18
4 Model ............................................................................................................................. 19
4.1 General ................................................................................................................. 19
4.2 CtrlConfigurationType ............................................................................................ 21
4.2.1 ObjectType definition ................................................................................. 21
4.2.2 Resources components ............................................................................. 22
4.2.3 MethodSet components ............................................................................. 23
4.3 CtrlResourceType .................................................................................................. 23
4.3.1 ObjectType definition ................................................................................. 23
4.3.2 Tasks components ..................................................................................... 25
4.3.3 Programs components ............................................................................... 25
4.3.4 MethodSet components ............................................................................. 25
4.4 CtrlProgramOrganizationUnitType ......................................................................... 26
4.4.1 CtrlProgramType ....................................................................................... 28
4.4.2 CtrlFunctionBlockType ............................................................................... 29
4.5 CtrlTaskType ......................................................................................................... 30
4.6 SFCType ............................................................................................................... 31
4.7 Reference Types ................................................................................................... 31
4.7.1 General ..................................................................................................... 31
4.7.2 HasInputVar .............................................................................................. 32
4.7.3 HasOutputVar ............................................................................................ 32
4.7.4 HasInOutVar .............................................................................................. 33
4.7.5 HasLocalVar .............................................................................................. 33
4.7.6 HasExternalVar ......................................................................................... 34
4.7.7 With ........................................................................................................... 34
5 Definition of Ctrl Variable Attributes and Properties ........................................................ 35
OPC UA Information Model for IEC 61131-3 iii Release 1.00
5.1 Common Attributes ................................................................................................ 35
5.2 DataType............................................................................................................... 35
5.2.1 Mapping of elementary data types ............................................................. 35
5.2.2 Mapping of generic data types ................................................................... 36
5.2.3 Mapping of derived data types ................................................................... 37
5.3 Variable specific Node Attributes ........................................................................... 41
5.3.1 General ..................................................................................................... 41
5.3.2 Access Level ............................................................................................. 42
5.4 Variable Properties ................................................................................................ 42
5.4.1 IEC Ctrl Variable Keywords ....................................................................... 42
5.4.2 Configuration of OPC UA defined Properties.............................................. 43
6 Objects used to organise the AddressSpace structure .................................................... 44
6.1 DeviceSet as entry point for engineering applications (Mandatory) ........................ 44
6.2 CtrlTypes Folder for server specific Object Types (Mandatory) .............................. 44
6.3 Entry point for Observation and Operation (Examples) .......................................... 45
7 System Architecture and Profiles .................................................................................... 47
7.1 System Architecture .............................................................................................. 47
7.1.1 General ..................................................................................................... 47
7.1.2 Embedded OPC UA Server ........................................................................ 47
7.1.3 PC based OPC UA Server ......................................................................... 47
7.1.4 PC based OPC UA Server with engineering capabilities ............................ 47
7.2 Conformance Units and Profiles ............................................................................ 47
7.3 Handling of OPC UA namespaces ......................................................................... 48
Annex A (normative): IEC 61131-3 Namespace and Mappings .............................................. 51
A.1 Namespace and identifiers for IEC61131-3 Information Model ............................... 51
A.2 Profile URIs for IEC61131-3 Information Model ..................................................... 52
A.3 Namespace for IEC61131-3 Function Blocks ......................................................... 52
Annex B (informative): PLCopen XML Additional Data Schema ............................................. 53
B.1 XML Schema ......................................................................................................... 53
OPC UA Information Model for IEC 61131-3 iv Release 1.00
FIGURES
Figure 1 – Software Model ...................................................................................................... 4
Figure 2 – OPC UA Graphical Notation for NodeClasses ......................................................... 8
Figure 3 – OPC UA Graphical Notation for References ........................................................... 8
Figure 4 – OPC UA Graphical Notation Example ..................................................................... 9
Figure 5 – OPC UA Devices Example ................................................................................... 10
Figure 6 – OPC UA Devices Example ................................................................................... 10
Figure 7 – Ctrl Function Block CTU_INT declaration ............................................................. 11
Figure 8 – Ctrl Function Block MyCounter / MyCounter2 instantiation and usage .................. 12
Figure 9 – Introductory Example – OPC UA representation ................................................... 13
Figure 10 – Use case diagram .............................................................................................. 15
Figure 11 – OPC UA IEC 61131-3 ObjectTypes Overview ..................................................... 19
Figure 12 – OPC UA IEC 61131-3 Object Instance Example ................................................. 20
Figure 13 – CtrlConfigurationType Overview ......................................................................... 21
Figure 14 – CtrlResourceType Overview ............................................................................... 24
Figure 15 – CtrlProgramOrganizationUnitType Overview ....................................................... 26
Figure 16 – CtrlProgramType Overview................................................................................. 28
Figure 17 – CtrlFunctionBlockType Overview ........................................................................ 29
Figure 18 – CtrlTaskType Overview ...................................................................................... 30
Figure 19 – Reference Types Overview................................................................................. 31
Figure 20 – Mapping of structure data types ......................................................................... 40
Figure 21 – Mapping of structure data types to Variable components .................................... 41
Figure 22 – DeviceSet as entry point for engineering applications ......................................... 44
Figure 23 – CtrlTypes Folder used to structure POU types .................................................... 45
Figure 24 – Browse entry point for Operation with Ctrl Resource .......................................... 46
Figure 25 – Browse entry point for Operation with simplified Folder ...................................... 46
Figure 26 – System Architecture ........................................................................................... 47
Figure 27 – Example for the use of namespaces in NodeIds and BrowseNames ................... 50
OPC UA Information Model for IEC 61131-3 v Release 1.00
TABLES
Table 1 – Type Definition Table ............................................................................................ 15
Table 2 – Examples of DataTypes ......................................................................................... 16
Table 3 – Common Node Attributes ....................................................................................... 17
Table 4 – Common Object Attributes ..................................................................................... 17
Table 5 – Common Variable Attributes .................................................................................. 18
Table 6 – Common VariableType Attributes .......................................................................... 18
Table 7 – CtrlConfigurationType Definition ............................................................................ 22
Table 8 – Components of the Resources Object .................................................................... 23
Table 9 – Components of the CtrlConfigurationType MethodSet ............................................ 23
Table 10 – CtrlResourceType Definition ................................................................................ 24
Table 11 – Components of the Tasks Object ......................................................................... 25
Table 12 – Components of the Programs Object ................................................................... 25
Table 13 – Components of the CtrlResourceType MethodSet ................................................ 26
Table 14 – CtrlProgramOrganizationUnitType Definition........................................................ 27
Table 15 – CtrlProgramType Definition ................................................................................. 28
Table 16 – CtrlFunctionBlockType Definition ......................................................................... 29
Table 17 – CtrlTaskType Definition ....................................................................................... 30
Table 18 – SFCType Definition ............................................................................................. 31
Table 19 – HasInputVar ReferenceType ................................................................................ 32
Table 20 – HasOutputVar ReferenceType ............................................................................. 32
Table 21 – HasInOutVar ReferenceType ............................................................................... 33
Table 22 – HasLocalVar ReferenceType ............................................................................... 33
Table 23 – HasExternalVar ReferenceType ........................................................................... 34
Table 24 – With ReferenceType ............................................................................................ 34
Table 25 – Common Node Attributes ..................................................................................... 35
Table 26 – Mapping IEC 61131-3 elementary data types to OPC UA built in data types ........ 36
Table 27 – Mapping IEC 61131-3 generic data types to OPC UA data types ......................... 37
Table 28 – Enumeration Data Type Definition ....................................................................... 38
Table 29 – Subrange Property Definition ............................................................................... 38
Table 30 – Array Data Type Property Definition .................................................................... 39
Table 31 – Variable Node Attributes ...................................................................................... 42
Table 32 – IEC 61131-3 Variable Key Word Property Definition ............................................ 42
Table 33 – Range XML attributes .......................................................................................... 43
Table 34 – CtrlTypes definition ............................................................................................. 45
Table 35 – Controller Operation Server Facet Definition ....................................................... 48
Table 36 – Controller Engineering Server Facet Definition .................................................... 48
Table 37 – Controller Engineering Client Facet Definition ..................................................... 48
Table 38 – Namespaces used in a Controller Server ............................................................. 49
Table 39 – Numeric Identifiers for IEC 61131-3 defined nodes .............................................. 51
Table 40 – Profile URIs ......................................................................................................... 52