iec 61499 tech notes...iec 61499 also has the ability to encapsulate automation functionality such...

28
IEC 61499 Tech Notes System model Device model Resource model Function Block model Application model Distribution model Execution model Execution timing Practical hints

Upload: others

Post on 01-Sep-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Tech Notes

System model •Device model •Resource model •Function Block model •Application model •Distribution model •Execution model •Execution timing •Practical hints •

Page 2: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be

reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc.

What is IEC 61499?

Developed by the International Electrotechnical Commission, IEC 61499 presents guidelines for the use of function block in distributed industrial process, measurement and control systems. This emerging standard provides a number of remarkable benefits including:

• the regulation of the flow of control decisions for an interacting distributed control system

• providing for the consistency of data • providing a means to ensure synchronous operation between devices • eliminating the need to have separate synchronization schemes • easing the development and maintenance of robust control systems

IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components of the machine and only need to assemble them to achieve the desired operation. It provides the benefits of object-oriented programming in an environment accessible to automation engineers.

Consult our IEC 61499 Technical Notes to learn more:

• System model • Device model • Resource model • Function Block model • Application model • Distribution model • Execution model • Execution timing • Practical hints

Implementing an IEC 61499 Application

In creating an automation system, one would traditionally start by looking at individual control applications and then determine how these interact with one another. Under ISaGRAF 5, although the same methodology could be used in defining the local behaviour of the control devices, one would define global diagrams using the IEC 61499 environment and would drop in function blocks to regulate the behaviour of the cooperating devices.

In fact, in using the IEC 61499 standard one can design an application distributed over multiple resources and spread over multiple devices (known as Configs under IEC 61131).

These applications are regulated through IEC 61499 function block diagrams and their collaboration is then clearly and rigorously defined and the interactions between devices are automatically regulated and synchronized by the IEC 61499 function block diagrams rather than through the use of manually implemented algorithms. The devices could be PLCs, micro-controllers or intelligent field instrumentation such as flow meters or valves.

Page 3: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 System ModelApplication Note

www.isagraf.com September 2011

IEC 61499 System Model

Definitions

The IEC 61499 standard defines a distributed model for splitting different parts of an industrial automation processand complex machinery control into functional modules called function blocks. These function blocks can bedistributed and interconnected across multiple controllers.

System: A collection of DEVICES interconnected and communicating with each other by means of acommunication network consisting of segments and links.

Device: An independent physical entity capable of performing one or more specified functions in a particularcontext and delimited by its interfaces.

Resource: A functional unit having independent control of its operation, and which provides various services toapplications including scheduling and execution of algorithms.

Application: A software functional unit that is specific to the solution of a problem in industrial-processmeasurement and control. An application may be distributed among devices and may communicate with otherapplications.

Function block: A software functional unit that is the smallest element of a distributed control system. It utilizesan execution control chart (ECC) state machine to control the execution of its algorithms.

Overview

A system model represents parts included in a measurement and control system. Figure 1 shows the parts of thissystem model. Many devices (configurations) are connected together with a communication network. The deviceis a self- contained hardware capable of executing a control loop. The device is a controller having a processor andmemory devices and may also contain a communication network when used in a distributed application. Thedevices are PLCs solving the control logic and are seen in intelligent actuators such as valves and in sensors suchas flow meters. Any field bus can do for the communication network; Industrial Ethernet, Profibus, DeviceNetamong others are often used. Some communication networks are faster while others are more deterministic,therefore, network selection depends on the process to control. Hard real-time and soft real-time applicationsrequire specialized communication networks to meet time-critical behaviors.

An automation and process control application either runs on a single device or splits the load across many devicesto use the special features of each device.

Figure 1: The IEC 61499 system model

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 1

Page 4: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 System Model

An application may consist of one or more control loops where the input sampling is performed in one device,control processing is performed in a second device, and output conversion is performed in a third device. Thesecooperative control loops share data in a predictive and deterministic way explicitly detailed in the IEC 61499standard.

In ISaGRAF, each program can be a distributed application. Figure 2 shows distributed applications acrossmultiple devices. This is the System Model displayed by the ISaGRAF toolset. All function block bitmaps (inyellow) at the right of the application name indicate the distribution across devices. A bitmap below a device meansthat the program has a running part in that device. No bitmap displayed below a device means the application hasno running part in that device. For each program built with the ISaGRAF toolset, the System Model viewer quicklydisplays the distribution of the application. Each device is represented with either a bitmap or a standard box.

The communication network connects the devices making up a distributed system. Many communication networksare displayed when configured this way in the system. Some devices may use one communication network whileother devices may be connected to another.

A distributed application exchanges data across the communication network. The ISaGRAF elements use thecommunication network transparently. Building and compiling the application generates all required linkparameters. Each distributed element of an application is connected to the others across the communicationnetwork. Upon building an ISaGRAF application, the distributed application generator automatically links thesedistributed elements together.

Figure 2 shows the devices, the communication network, the applications making up the system as well as thedistributed relationship between devices and applications. Application_A has parts running on the first, second,and third device. Application_B has parts running on the last two devices of the system. Application_C runs onlyon the first device. Each part of distributed Application_A exchanges the proper information across thecommunication network. The same information exchange applies for Application_B.

ReferencesInternational Electrotechnical Commission: Function Blocks Part 1 - Architecture (61499-1 © CEI:200X).

ICS Triplex ISaGRAF Inc.: ISaGRAF User’s Guide. November 2005.

Figure 2: ISaGRAF system model viewer

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 2

Page 5: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Device ModelApplication Note

www.isagraf.com September 2011

IEC 61499 Device Model

Definitions

The IEC 61499 standard defines a distributed model for splitting different parts of an industrial automation processand complex machinery control into functional modules called function blocks. These function blocks can bedistributed and interconnected across multiple controllers.

System: A collection of DEVICES interconnected and communicating with each other by means of acommunication network consisting of segments and links.

Device: An independent physical entity capable of performing one or more specified functions in a particularcontext and delimited by its interfaces.

Resource: A functional unit having independent control of its operation, and which provides various services toapplications including scheduling and execution of algorithms.

Application: A software functional unit that is specific to the solution of a problem in industrial-processmeasurement and control. An application may be distributed among devices and may communicate with otherapplications.

Function block: A software functional unit that is the smallest element of a distributed control system. It utilizesan execution control chart (ECC) state machine to control the execution of its algorithms.

Overview

A Device Model represents parts included in a measurement and control device. Figure 1 shows these parts of ameasurement and control device. Many resources (soft PLC) are connected together with a communicationinterface and are part of a device. The device is a self-contained hardware capable of executing a control loop. Thedevice is a controller having a processor, memory devices and may also contain a communication interface whenused in a distributed application. The devices are PLCs solving the control logic and these can be seen in intelligentactuators such as valves or in sensors such as flow meters. Each device may integrate one or more resources.

A resource is considered to be a functional unit contained in a device. The functions of a resource are to acceptinputs from the process interface (IO driver) or the communication interface (Shared memory, communicationnetwork), process the data, and return outputs to these interfaces.

An automation and process control application runs in a resource or splits the load across multiple resources to usethe special features of each resource.

Figure 1: IEC 61499 Device Model

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 1

Page 6: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Device Model

An application may consist of one or more control loops where the input sampling is performed in one resource,control processing is performed in a second resource, and output conversion is performed in a third resource. Thisdistributed application may run resources within one device or across multiple devices.

In ISaGRAF, each program can be a distributed application. Figure 2 shows distributed applications within adevice. This is the Device Model displayed by the ISaGRAF toolset. All function block bitmaps (in yellow)indicate the distribution across resources. A bitmap under a resource means that the program has a part running inthat resource. No bitmap displayed under a resource means that the application has no running part in that resource.For each program built with the ISaGRAF toolset, the Device Model viewer quickly displays the distribution ofthe application.

The communication interface connects the resources making up a distributed application.

Within a device, the communication interface is based on shared memory for speed exchange purposes.

A communication network may be used when the distributed application runs resources on many devices.

A distributed application exchanges data across the communication interface. The ISaGRAF elements use thecommunication interface transparently. Building and compiling the application generates all required linkparameters. Each distributed element of an application is connected to the others across the communicationinterface. When building an ISaGRAF application, the distributed application generator automatically linkstogether these distributed elements.

Figure 2 displays resources, applications, and the distributed relationship between resources and applications.Application_A has parts running on the first, second, and third resource. Application_B has parts running on thelast two resources of this system. And Application_C runs only on the first resource. Each part of the distributedApplication_A application exchanges the proper information over the communication interface. The sameinformation exchange applies for Application_B.

References

International Electrotechnical Commission: Function Blocks Part 1 - Architecture (61499-1 © CEI:200X).

ICS Triplex ISaGRAF Inc.: ISaGRAF User’s Guide. November 2005.

Figure 2: ISaGRAF Device Model Viewer

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 2

Page 7: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Resource ModelApplication Note

www.isagraf.com September 2011

IEC 61499 Resource Model

IEC 61499 Resource Model

Definitions

The IEC 61499 standard defines a distributed model for splitting different parts of an industrial automation processand complex machinery control into functional modules called function blocks. These function blocks can bedistributed and interconnected across multiple controllers.

System: A collection of devices interconnected and communicating with each other by means of a communicationnetwork consisting of segments and links.

Device: An independent physical entity capable of performing one or more specified functions in a particularcontext and delimited by its interfaces.

Resource: A functional unit having independent control of its operation, and which provides various services toapplications including scheduling and execution of algorithms.

Application: A software functional unit that is specific to the solution of a problem in industrial-processmeasurement and control. An application may be distributed among devices and may communicate with otherapplications.

Function block: A software functional unit that is the smallest element of a distributed control system. It utilizesan execution control chart (ECC) state machine to control the execution of its algorithms.

Overview

A Resource Model represents parts included in a measurement and control resource. Figure 1 shows these parts ofa measurement and control resource. Many function blocks are connected together with a data/event interface andare part of a resource. The device is a self-contained hardware capable of executing control loops programmed inone or multiple resources.

A resource is considered to be a functional unit contained in a device. The functions of a resource are to acceptinputs from the process interface (IO driver) or the communication interface (Shared memory, communicationnetwork), process the data, and return outputs to these interfaces.

An automation and process control application runs in a resource or splits the load across multiple resources to usethe special features of each resource.

Figure 1: IEC 61499 Resource Model

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 1

Page 8: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Resource Model

An application may consist of one or more control loops where the input sampling is performed in one functionblock, control processing is performed in a second function block, and output conversion is performed in a thirdfunction block. This distributed application may run function blocks within one resource or across multipleresources. These resources are part of one device or multiple devices.

In ISaGRAF, each program can be a distributed application. Figure 2 shows distributed applications within aresource. This is the Resource Model displayed by the ISaGRAF toolset.

A distributed application exchanges data across the communication interface. The ISaGRAF elements use thecommunication interface transparently. Building and compiling the application generates all required linkparameters. Each distributed element of an application is connected to the others across the communicationinterface. When building an ISaGRAF application, the distributed application generator automatically linkstogether these distributed elements.

Figure 2 displays function blocks, links between function blocks, and service interface function blocks. ThePublish and Subscribe function blocks are service interface function blocks. These interface the application withthe communication interface and the process interface. All other function blocks are basic, composite custombuild, or pre-defined function blocks from the library. From the Device Model viewer, clicking on an applicationpops up the Resource Model view.

References

International Electrotechnical Commission: Function Blocks Part 1 - Architecture (61499-1 © CEI:200X).

ICS Triplex ISaGRAF Inc.: ISaGRAF User’s Guide. November 2005.

Figure 2: ISaGRAF Resource Model Viewer

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 2

Page 9: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Function Block ModelApplication Note

www.isagraf.com September 2011

IEC 61499 Function Block Model

IEC 61499 Function Block Model

Definitions

The IEC 61499 standard defines a distributed model for splitting different parts of an industrial automation processand complex machinery control into functional modules called function blocks. These function blocks can bedistributed and interconnected across multiple controllers.

System: A collection of devices interconnected and communicating with each other by means of a communicationnetwork consisting of segments and links.

Device: An independent physical entity capable of performing one or more specified functions in a particularcontext and delimited by its interfaces.

Resource: A functional unit having independent control of its operation, and which provides various services toapplications including scheduling and execution of algorithms.

Application: A software functional unit that is specific to the solution of a problem in industrial-processmeasurement and control. An application may be distributed among devices and may communicate with otherapplications.

Function block: A software functional unit that is the smallest element of a distributed control system. It utilizesan execution control chart (ECC) state machine to control the execution of its algorithms.

Overview

A Function Block Model represents parts included in a measurement and control function block. Figure 1 showsthese parts of a measurement and control function block. Many function blocks are connected together with a data/event interface and are part of an application.

A function block is a functional unit of software comprising an individual instance or copy within a resource. Thealgorithms contained within a function block are hidden from the outside of the function block and are scheduledaccording to the Execution Control Chart state machine (ECC).

Figure 1: IEC 61499 Function Block Model

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 1

Page 10: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Function Block Model

Event inputs and outputs are used to synchronize function blocks within an application and to schedule thealgorithms within the function block.

Data inputs and outputs are the interface with the external of the function block since internal data is hidden. Thedata may be part of the algorithms and may also be state information for the Execution Control Chart (ECC).

Function blocks are created by defining their ECC and programming their algorithms. These function blocks arecalled basic function blocks (see Figure 1). The ECC is a state machine processing events and schedulingalgorithms. It defines the behavior of the function block upon receiving events. The algorithms operate on internalvariable values, input values, and output values. Each basic function block can run on any resource.

When function block algorithms and the control of their execution are expressed entirely in terms of interconnectedfunction blocks, these are called composite function blocks (see Figure 2). These are created by interconnectingexisting basic and composite function blocks. No ECC or algorithm is created. A composite function block runson any resource. However, the basic and composite function blocks making up a composite function block run onthe same resource as the main composite block.

An application is defined by function block (Basic and Composite) networks specifying event and data flowsthroughout function block instances. The event flow determines the scheduling and execution of the functionblocks’ algorithms. Each function block within the application can be distributed across resources and devices.

In ISaGRAF, an application can be created using custom function blocks or function blocks from libraries. Figure3 shows the basic function block editor. Figure 4 shows the composite function block editor and figure 5 showsthe function block model displayed by the ISaGRAF toolset.

Figure 3 displays a function block ECC state machine and a function block algorithm from the basic function blockeditor. The ECC is a state machine built using the SFC editor. Algorithms can use any of the IEC61131-3programming languages as well as the flow chart language provided in the ISaGRAF toolset. The availableIEC 61131-3 languages are the following: Sequential Flow Chart (SFC), Function Block Diagram (FBD), Ladder(LD), Instruction List (IL), and Structured Text (ST).

Composite function blocks can also be created in the ISaGRAF toolset using the composite function block editor(see Figure 4). ISaGRAF enables you to create a composite function block by adding any available basic andcomposite function block to the function block network.

Figure 2: Composite Function Block

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 2

Page 11: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Function Block Model

The newly created function block is available for use in any application and can be configured to run on anyresource or device part of the system.

Figure 3: ISaGRAF Basic Function Block Editor

Figure 4: ISaGRAF Composite Function Block Editor

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 3

Page 12: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Function Block Model

References

International Electrotechnical Commission: Function Blocks Part 1 - Architecture (61499-1 © CEI:200X).

ICS Triplex ISaGRAF Inc.: ISaGRAF User’s Guide. November 2005.

Figure 5: ISaGRAF Function Block Model Viewer

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 4

Page 13: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Application ModelApplication Note

www.isagraf.com September 2011

IEC 61499 Application Model

Definitions

The IEC 61499 standard defines a distributed model for splitting different parts of an industrial automation processand complex machinery control into functional modules called function blocks. These function blocks can bedistributed and interconnected across multiple controllers.

System: A collection of devices interconnected and communicating with each other by means of a communicationnetwork consisting of segments and links.

Device: An independent physical entity capable of performing one or more specified functions in a particularcontext and delimited by its interfaces.

Resource: A functional unit having independent control of its operation, and which provides various services toapplications including scheduling and execution of algorithms.

Application: A software functional unit that is specific to the solution of a problem in industrial-processmeasurement and control. An application may be distributed among devices and may communicate with otherapplications.

Function block: A software functional unit that is the smallest element of a distributed control system. It utilizesan execution control chart (ECC) state machine to control the execution of its algorithms.

OverviewAn Application Model represents parts included in a measurement and control application. Figure 1 shows theseparts of a measurement and control application. Many function blocks are connected together with a data/eventinterface and are part of an application. The device is a self-contained hardware capable of executing anapplication distributed across one or multiple resources.

A resource is considered to be a functional unit contained in a device. The functions of a resource are to acceptinputs from the process interface (IO driver) or the communication interface (Shared memory, communicationnetwork), process the data, and return outputs to these interfaces.

An automation and process control application runs in a resource or splits the load across multiple resources to usethe special features of each resource.

Figure 1: IEC 61499 Application Model

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 1

Page 14: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Application Model

An application may consist of one or more function blocks where the input sampling is performed in one functionblock, control processing is performed in a second function block, and output conversion is performed in a thirdfunction block. This distributed application may run function blocks within one resource or across multipleresources. These resources are part of one or many devices.

An application is defined by function block networks specifying event and data flow throughout function blockinstances. The event flow determines the scheduling and execution of the function blocks’ algorithms.

In ISaGRAF, each program can be a distributed application. Figure 2 shows distributed function blocks within anapplication. This is the Application Model displayed by the ISaGRAF toolset.

A distributed application exchanges data across the communication interface. The ISaGRAF elements use thecommunication interface transparently. Building and compiling the application generates all required linkparameters. Each distributed element of an application is connected to the others across the communicationinterface. When building an ISaGRAF application, the distributed application generator automatically linkstogether these distributed elements.

Figure 2 displays function blocks, links between function blocks, and service interface function blocks. ThePublish and Subscribe function blocks are service interface function blocks. These interface the application withthe communication interface and the process interface. All other function blocks are basic, composite custombuild, or pre-defined function blocks from the library.

References

International Electrotechnical Commission: Function Blocks Part 1 - Architecture (61499-1 © CEI:200X).

ICS Triplex ISaGRAF Inc.: ISaGRAF User’s Guide. November 2005.

Figure 2: ISaGRAF Application Model Viewer

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 2

Page 15: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Distribution ModelApplication Note

www.isagraf.com September 2011

IEC 61499 Distribution Model

Definitions

The IEC 61499 standard defines a distributed model for splitting different parts of an industrial automation processand complex machinery control into functional modules called function blocks. These function blocks can bedistributed and interconnected across multiple controllers.

System: A collection of devices interconnected and communicating with each other by means of a communicationnetwork consisting of segments and links.

Device: An independent physical entity capable of performing one or more specified functions in a particularcontext and delimited by its interfaces.

Resource: A functional unit having independent control of its operation, and which provides various services toapplications including scheduling and execution of algorithms.

Application: A software functional unit that is specific to the solution of a problem in industrial-processmeasurement and control. An application may be distributed among devices and may communicate with otherapplications.

Function block: A software functional unit that is the smallest element of a distributed control system. It utilizesan execution control chart (ECC) state machine to control the execution of its algorithms.

Overview

A Distribution Model represents parts included in a measurement and control system. Figure 2 shows these partsof a distribution model. An application can be distributed by allocating its function block instances to differentresources in one or more devices. Function blocks are the atomic unit of distribution. An application built withmany function blocks is displayed as one schematic while its function block instances are distributed acrossresources and devices. Figure 1 shows a control system having many devices connected together via the controlnetwork. The application built with function blocks is distributed across these devices.

Many devices (Configuration) are connected together via a communication network. The device is a self-containedhardware capable of executing a control loop. The device is a controller having a processor, memory devices andmay contain a communication network when used in a distributed application. The devices are PLCs solving the

Figure 1: Distributed Application

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 1

Page 16: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Distribution Model

control logic and can be seen in intelligent actuators such as valves or in sensors such as flow meters. Any fieldbus can serve as communication network. Industrial Ethernet, Profibus, DeviceNet are among those often used.Some networks are faster while others are more deterministic. The choice of network depends on the process tocontrol. Hard real-time or soft real-time applications need specialized communication networks to meet the time-critical behaviors.

An automation and process control application runs in a single device or across mutiple devices to split the loadand use the feature specialty of each device.

An application may consist of one or more control loops where input sampling is performed in one device, controlprocessing is performed in a second device, and output conversion is performed in a third device. Thesecooperative control loops share data in a predictive and deterministic way described in the IEC 61499 standard.

In ISaGRAF, each program can be a distributed application. Figure 3 shows distributed applications across devices.This is the Distribution Model displayed by the ISaGRAF toolset. All function block bitmaps (yellow) at the rightof the application name indicate the distribution across devices. A bitmap displayed below a device means that theprogram has a part running in that device. The absence of a bitmap below a device means that the program has nopart running in that device. For each program built using the ISaGRAF toolset, the System Model viewer quicklydisplays the distribution of the application. Each device can have either a bitmap representation or the standardicon.

The communication network connects together devices that are part of a distributed system. Many communicationnetworks are displayed if such is configured in the system. Some devices may use one communication networkwhile others may use another.

A distributed application exchanges data across the communication network. The ISaGRAF elements use thecommunication network transparently. Building and compiling the application generates all required linkparameters. Each distributed element of an application is connected to the others across the communicationnetwork. Upon building an ISaGRAF application, the distributed application generator automatically links thesedistributed elements together.

Figure 3 shows the devices, the communication network, the applications, the distributed relationship betweendevices and applications as well as the application schematic. Application_A has parts running on the first, second,and third device. Application_B has parts running on the last two devices of the system. Application_C runs onlyon the first device. Each part of Application_A exchanges the proper information across the communicationnetwork. The same applies to Application_B.

Figure 2: IEC 61499 Distribution Model

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 2

Page 17: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Distribution Model

In the System Model view, double-clicking an application displays its schematic view. The schematic view is theApplication Model. In this view, there are no device boundaries. It is a one schematic for the distributedapplication. Each function block in the application can be assigned to a resource which is also assigned to a device.The event and data signals between the function blocks are simple to draw. The ISaGRAF distribution generatorcreates all required links between these signals. These links exchange information transparently on thecommunication interface.

The functional relationships between the function blocks of an application are unaffected by its distribution. TheISaGRAF toolset takes care of the whole distributed aspect of the application. Delays are added in thecommunication interface and in the algorithms execution that must be taken into account when designing such adistributed application.

ReferencesInternational Electrotechnical Commission: Function Blocks Part 1 - Architecture (61499-1 © CEI:200X).

ICS Triplex ISaGRAF Inc.: ISaGRAF User’s Guide. November 2005.

Figure 3: The ISaGRAF Distribution Model Viewers

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 3

Page 18: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Execution ModelApplication Note

www.isagraf.com September 2011

IEC 61499 Execution Model

IEC 61499 Execution Model

Definitions

The IEC 61499 standard defines a distributed model for splitting different parts of an industrial automation processand complex machinery control into functional modules called function blocks. These function blocks can bedistributed and interconnected across multiple controllers.

System: A collection of devices interconnected and communicating with each other by means of a communicationnetwork consisting of segments and links.

Device: An independent physical entity capable of performing one or more specified functions in a particularcontext and delimited by its interfaces.

Resource: A functional unit having independent control of its operation, and which provides various services toapplications including scheduling and execution of algorithms.

Application: A software functional unit that is specific to the solution of a problem in industrial-processmeasurement and control. An application may be distributed among devices and may communicate with otherapplications.

Function block: A software functional unit that is the smallest element of a distributed control system. It utilizesan execution control chart (ECC) state machine to control the execution of its algorithms.

Overview

An Execution Model represents parts included in a function block execution mechanism. Figure 1 shows theseparts of a execution mechanism. Each function block execution follows a specific mechanism.

A function block is a functional unit of software comprising an individual instance or copy within a resource. Thealgorithms contained within a function block are hidden from the outside of the function block and are scheduledaccording to the Execution Control Chart state machine (ECC).

Event input (t2) and event output (t8) are used to synchronize function blocks within an application and to schedulethe algorithms within the function block.

Data input (t1) and data output (t5) are the interface with the external of the function block since internal data ishidden. The data may be part of the algorithms and may also be state information for the ECC.

Function blocks can be created by defining their ECC, input and output signals, and programming their algorithms.These function blocks are called Basic function block. The ECC is a state machine processing events andscheduling algorithms. The ECC defines the behavior of the function block upon receiving events. The algorithms

Figure 1: IEC 61499 Execution Model

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 1

Page 19: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Execution Model

operate on internal variable values, input values, and output values. Each Basic function block can run on anyresource.

In a Basic function block, timing is important. Data inputs are received first (t1), then the event inputs (t2) are eitherreceived at the same time or next. When event inputs trigger the ECC execution the function block must have stabledata inputs. Otherwise, erroneous behavior occurs. At t3, the resource schedules the execution of the algorithmsrelated to the event. At t4, the algorithms start running and process the input data signals. Upon completion, thealgorithm outputs the data signal (t5), then the resource is notified (t6) and the ECC takes over at t7. The ECCoutputs event signals (t8) and the execution of the function block is completed until the reception of a new event.

When function block algorithms and the control of their execution are expressed entirely in terms of interconnectedfunction blocks, these are called Composite function block. These are created by interconnecting existing Basicand Composite function blocks. No ECC and algorithms are created. A Composite function block may run on anyresource. Each function block within the Composite function block runs on the same resource as the Compositefunction block. Function blocks within of a composite function block cannot be individually distributed acrossmultiple resources.

The execution of a Composite function block differs from a Basic function block; A Composite function blockdoes not have an ECC or algorithms. At some point when breaking down a Composite function block, eachfunction block contained within is a Basic function block and executes as a standard Basic function block. Theoverall timing delay depends on the execution time of each of these internal function blocks.

In ISaGRAF, you can create applications using custom function blocks or function blocks from libraries. You canalso create Basic function blocks.

The ISaGRAF ECC is a state machine built with the SFC editor. However, the ECC has a different executionbehavior from IEC 61131 SFC. All STEPS execute in one virtual machine cycle until a FALSE transition occurs.Algorithms may use any of the IEC61131-3 programming languages as well as the flow chart language providedwith the ISaGRAF toolset. The available programming languages are the following: Sequencial Flow Chart (SFC),Function Block Diagram (FBD), Ladder (LD), Instruction List (IL), and Structured Text (ST).

Composite function blocks can also be created with the ISaGRAF toolset using the Composite FB editor.ISaGRAF enables the creation of composite function blocks by adding any available Basic and Composite functionblock to the function block network.

The creation of a new function block (basic or composite) makes it available for use in any application and maybe configured to run on any Resource or Device making up the system.

Figure 2 shows the execution mechanism used by an ISaGRAF control engine. After reading IO inputs and boundvariables, the logic is processed. Then bound variables, retain variables and output IO are written. This cycle startsover once the delay is over.

Figure 2: ISaGRAF Basic Function Block Execution Model

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 2

Page 20: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Execution Model

The ISaGRAF Basic function block execution model operates as defined in the IEC 61499 standard.

When the ISaGRAF resource consumes bound data, the resource reads the event and data input values (WITHqualifier). This is IEC 61499 t1 and t2 time (figure 1). Then the resource starts the execution of the function blockECC (t3 - figure 1) as it starts executing the TIC code. The algorithm is then running (t4 - figure 1) and uponcompletion (t5 - figure 1), the algorithm writes the output data values. The resource (t6 - figure 1) returns executionto the ECC (7). This one writes output event values. Then the resource writes bound data values (WITH qualifier).This action generates the event and data signals simultaneously.

References

International Electrotechnical Commission: Function Blocks Part 1 - Architecture (61499-1 © CEI:200X).

ICS Triplex ISaGRAF Inc.: ISaGRAF User’s Guide. November 2005.

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 3

Page 21: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Execution TimingApplication Note

www.isagraf.com September 2011

IEC 61499 Execution Timing

IEC 61499 Execution Timing

Definitions

The IEC 61499 standard defines a distributed model for splitting different parts of an industrial automation processand complex machinery control into functional modules called function blocks. These function blocks can bedistributed and interconnected across multiple controllers.

System: A collection of devices interconnected and communicating with each other by means of a communicationnetwork consisting of segments and links.

Device: An independent physical entity capable of performing one or more specified functions in a particularcontext and delimited by its interfaces.

Resource: A functional unit having independent control of its operation, and which provides various services toapplications including scheduling and execution of algorithms.

Application: A software functional unit that is specific to the solution of a problem in industrial-processmeasurement and control. An application may be distributed among devices and may communicate with otherapplications.

Function block: A software functional unit that is the smallest element of a distributed control system. It utilizesan execution control chart (ECC) state machine to control the execution of its algorithms.

Overview

A distributed application exchanges data over the communication interface. An application may consist of one ormore function blocks where the input sampling is performed in one function block, control processing isperformed in a second function block, and output conversion is performed in a third function block. Thisdistributed application may run function blocks within one resource or across multiple resources. These resourcesare part of one device or multiple devices.

A function block is a functional unit of software comprising an individual instance or a copy within a resource.

An automation and process control application distributed across multiple resources and devices requiressynchronization to guarantee data integrity and good behavior. Figure 1 shows an IEC 61499 cooperativeapplication having two function blocks that are connected together and part of a single application. When FB1outputs its data and event to FB2, it is important that the event signal correspond to the Data signal because FB2must receive the event and the data signal corresponded. The WITH qualifier from IEC 61499 indicates that thecorresponding event and data signals must be synchronised.

Since ISaGRAF applications event and data signals are synchronized, each time an event is sent from a functionblock, the corresponding data is valid. Therefore, the receiving function block has valid data associated with theevent. Each time a function block consumes its inputs, it retrieves all events and data from other function blockslinked to its inputs. Also, a function block produces all of its output signals simultaneously.

In the application shown in figure 1, FB1 can send multiple events and data regardless of what FB2 does withthese. The delay between two consecutive events is represented by Te. This time delay depends on the cycle timeof the function block. The propagation or transmission delay between FB1 and FB2 is represented by Tt. Thenetwork link adds on this communication time. Faster links provide shorter communication propagation times.The processing delay of FB2 is represented by Tp. This time delay is the cycle time of the virtual machine runningthe function block. The total time needed to process this event and data is given in the following calculation:

Total execution time = Tt + Tp

To avoid wasting events, the time between events should be greater than the total processing time. Otherwise, FB2will not have time to process all events coming from FB1. Some events could go unused since there is no queue

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 1

Page 22: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Execution Timing

or buffer. When the time Te between events is greater than the total processing time, then FB2 receives all eventswithout wasting one and has the time to process them.

Te > Tt + Tp

A programming rule such as shown in figure 1 requires time computation as well as trial and error to fine tune anapplication. The preferred method of programming a distributed system is to ensure all distributed function blocksare synchronized.

Figure 2 shows an ISaGRAF cooperative application having a synchronizing signal. This preferable programmingmethodology sets FB1 and FB2 in perfect synchronization. FB1 only produces its event and data when FB2 isready to receive them. The ACK signal from FB2 signaling its readiness to process another event accomplishesthis synchronization. After having produced its event and data, FB1 remains on standby awaiting another ACKsignal. This methodology wastes no events and data signals.

In a complex application where many function blocks are connected together, synchronization is facilitated whendefining the timing signals between the function blocks. This synchronization eliminates additional delays thatcould affect the behavior of the application. A toolset such as ISaGRAF provides all the functionalities required tobuild distributed applications. Like any other programming language, a good methodology helps build a morestable and comprehensible application.

Figure 1: IEC 61499 Cooperative Application

Figure 2: ISaGRAF Cooperative Application

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 2

Page 23: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Execution Timing

In all cases, an application is said to be real time when the total time required to transmit the signals (Tt), processthe logic in FB1 (Tp1), and process the logic in FB2 (Tp2) is faster than the process under control.

References

International Electrotechnical Commission: Function Blocks Part 1 - Architecture (61499-1 © CEI:200X).

ICS Triplex ISaGRAF Inc.: ISaGRAF User’s Guide. November 2005.

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 3

Page 24: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Practical HintsApplication Note

www.isagraf.com September 2011

IEC 61499 Practical Hints

IEC 61499 Practical Hints

Definitions

The IEC 61499 standard defines a distributed model for splitting different parts of an industrial automation processand complex machinery control into functional modules called function blocks. These function blocks can bedistributed and interconnected across multiple controllers.

System: A collection of devices interconnected and communicating with each other by means of a communicationnetwork consisting of segments and links.

Device: An independent physical entity capable of performing one or more specified functions in a particularcontext and delimited by its interfaces.

Resource: A functional unit having independent control of its operation, and which provides various services toapplications including scheduling and execution of algorithms.

Application: A software functional unit that is specific to the solution of a problem in industrial-processmeasurement and control. An application may be distributed among devices and may communicate with otherapplications.

Function block: A software functional unit that is the smallest element of a distributed control system. It utilizesan execution control chart (ECC) state machine to control the execution of its algorithms.

Overview

Building a distributed application is not always simple. What is the starting point? What is the cycling time? Howto get IO and variable values? How to exchange data between applications and devices? What are goodprogramming practices and data integrity? This application note is all about these issues.

An application may consist of one or more function blocks where input sampling is performed in one functionblock, control processing is performed in a second function block, and output conversion is performed in a thirdfunction block. This distributed application may run function blocks within a single resource or across multipleresources. These resources are part of one device or multiple devices.

A function block is a functional unit of software comprising an individual instance or copy within a resource. Anautomation and process control application having many function blocks requires synchronization to guaranteedata integrity and good behavior.

Starting Point

Figure 1 shows the RESTART function block that sets the starting point of an application. All function blockscontained in an application should be initialized and have a proper starting point. Since individual function blockscan run on any resource or device, their order of execution must be defined. The RESTART function block clearlyindicates the starting point of the application. This function block sends an event when the resource runs for thefirst time, then all other function blocks forming the application start running.

The RESTART function block can be connected to all function blocks contained in the application. In this case,when the function blocks receive the RESTART event, these switch to the running state. Also, the RESTARTfunction block can be connected to a single function block. In this case, the first function block receives theRESTART event and starts running, then its output event and data signals trigger other function block containedin the application.

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 1

Page 25: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Practical Hints

Cycling Time

An application can run one time or periodically (cyclically). Function blocks can be on standby awaiting an eventsignal to start running. Signals coming from input devices or human machine interfaces trigger these functionblocks. In applications needing to run periodically, a common practice is to use the PERIODIC function blockproviding the cycle time to the application. This PERIODIC function block sends an event signal at a specific timeinterval and sets the cycle time for the control loop. In this type of application, the PERIODIC event should exceedthe total execution time of the application. Otherwise, the function block will deviate from the defined cycle time.The total execution time of an application is equal to the propagation delay between function blocks and theinternal execution times of the algorithms defined for all individual function blocks.

Service Interface

An application needs to read and write to the external world. Accessing IO device values, variable values, andcommunication values is common in any control and automation application.

IEC 61499 application schematic disallow variables since these require declared instances on a resource anddevice. An interfacing mechanism is needed. Function blocks specializing in such purposes are called ServiceInterface Function Blocks. These function blocks are the atomic object used for distribution application rather thanvariables. Therefore, an application must contain service interface function blocks to enable reaching IOs,variables, and communication values.

Figure 3 shows an application having an input service interface (IN) and an output service interface (OUT). Theinput service interface retrieves values from IO points coming from an IO device driver as well as variable valuescoming from a resource database or a communication interface such as an OPC server or field bus link. The outputservice interface sends data values to external IO devices, variable databases, and a communication link.

Figure 1: Application Starting Point

Figure 2: Periodic (Cyclic) Application

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 2

Page 26: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Practical Hints

Individual function blocks contained in an application can reach internal variables on their own, therefore, thesefunction blocks do not require service interfaces. However, Adding service interfaces to an application increasesthe reuse of function blocks and programming flexibility.

Data Integrity

Since ISaGRAF applications event and data signals are synchronized, each time an event is sent from a functionblock, the corresponding data is valid. Therefore, the receiving function block has valid data associated with theevent. Each time a function block consumes its inputs, it retrieves all events and data from other function blockslinked to its inputs. Also, a function block produces all of its output signals simultaneously.

Figure 4 shows two function blocks interfacing with FB2. How are the event and data signals synchronized sinceFB1 and FB3 do not talk to each other? This type of programming brings about data integrity problems in theapplication. FB2 gets the event and data signals from both function blocks correctly, however, the synchronizationof the event and data signals is uncertain. Moreover, the data coming from FB3 may not be ready when FB1outputs its event signal.

Figure 5 shows FB3 receiving its event and data signals correctly. When FB1 sends its event signal, it asks FB2 toprepare the data and drive FB3 correctly. Such good programming practices save a lot of debugging time.

Figure 3: Service Interface Function Blocks

Figure 4: Absence of Data Integrity

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 3

Page 27: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

IEC 61499 Practical Hints

References

International Electrotechnical Commission: Function Blocks Part 1 - Architecture (61499-1 © CEI:200X).

ICS Triplex ISaGRAF Inc.: ISaGRAF User’s Guide. November 2005.

Figure 5: Data Integrity

© Copyright 2006 - 2011: ICS Triplex ISaGRAF Inc. All rights reserved. No portion of this work may be reproduced in any form or by any means, without the prior written permission of ICS Triplex ISaGRAF Inc. 4

Page 28: IEC 61499 Tech Notes...IEC 61499 also has the ability to encapsulate automation functionality such that machine builders can create IEC 61499 function blocks for different components

9975 Catania Avenue, Suite UBrossard, Quebec Canada J4Z 3V6Tel: +1 450 445 3353Fax: +1 450 445 3426 Email: [email protected]

North AmericaHong Ye Building,1801 Hong Mei Road, Shanghai 200233, ChinaTel.: +86 21 6128 8608Fax: +86 21 6128 8899Email: [email protected]

China6bis Chemin des Prés38240 MeylanFranceTel: +33 (0) 476 048175Fax: +33 (0) 476 413561Email: [email protected]

FranceBrüsseler Strasse 5, D-65552 LimburgGermany Tel.: + 49 (0)6431 592 66 85Fax: + 49 (0)6431 592 66 87Email: [email protected]

Germany