Usage of IEC 61131 and IEC 61499 Standards For Creating Distributed Control Systems
Usage of IEC 61131 and IEC 61499 Standards For Creating Distributed Control Systems
Vol. 3
USAGE OF
IEC 61131 AND IEC 61499 STANDARDS
FOR CREATING
DISTRIBUTED CONTROL SYSTEMS
Tomáš Bezák
Universitätsverlag Ilmenau
2012
Impressum
This scientific monograph originated from the author's dissertation thesis defended
at the Slovak University of Technology in Bratislava, Faculty of Materials Science
and Technology in Trnava.
Reviewers:
Peter Husár, Professor, Ph.D.
Aleš Janota, Professor, Ph.D.
Augustín Gese, Ph.D.
Titelfoto: photocase.com
Abstract
Key words
5
LIST OF ACRONYMS
6
CBA - Component Based Automation
SIFB - Service Interface Function Blocks
ODECE - Open Distributed Embedded Control Environment
FBDK - Function Block Development Kit
FBRT - Function Block Runtime
NCES - Net Condition / Event Systems
OPC - Open Connectivity
PN - ProfiNet
CPU - Central Processor Unit
DI - Digital Input
DO - Digital Output
AI - Analog Input
PS - Power Source
DP - Decentralized Periphery
IP - Internet Protocol
HW - Hardware
OB - Organization Block
FC - Function
SFB - System Function Block
SFC - System Function
DB - Data Block
TCP - Transmission Control Protocol
ACK - Acknowledge
RAM - Random Access Memory
EPROM - Erasable Programmable Read-Only Memory
7
LIST OF SYMBOLS
8
INTRODUCTION
9
The publication focuses on:
- IEC 61131 and IEC 61499 standards analysis and prognosis of their
development;
- Analysis of existing application of these standards in practice;
- Criteria determination to compare the suitability for system use,
designed on the base of both standards;
- Preparation of the model distributed system by using both approaches;
- To compare the influence of the chosen approach on selected criteria;
- Comparing the suitability of both approaches for real distributed
system creation based on quality parameters.
10
1. CURRENT STATUS IN INDUSTRIAL AUTOMATION
STANDARDS
Each industry sector will soon come to the development point when it
is necessary to unify different approaches. Without creating the standards,
development cannot progress.
Usage of the standards enables the following:
- To reduce installation and startup costs – installation and startup of the
systems based on the same standard is identical, or similar.
- To reduce the need to keep high level of stocks – standard devices are
widely available even after several years from placing on the market
- Components compatibility – new device should be easily compatible
with any other device built on the same standard
- Safety increase
Usage of the standards in industry:
- Improves communication
- Provides practical usage of professional skills
- Represents years of experience and reduces the need to start each
project from scratch
11
a result of its activities, IEC 61131 and IEC 61499 were designed as well,
which together with new technologies have a dramatic impact and influence
on design and implementation of the industrial control systems.
These two standards are closely connected and create the base for
control system development in the present, as well as in progressive
technologies in the near future.
IEC 61499
Protection
Functionality
independent
functionality
Integration
IEC 61131 tool
Functional
distribution
Numerical
control
Continuous
control
Mechanical
control Progressive technology
12
1.1.1 IEC 61131 standard
13
- IEC 61131-8 Directives for languages implementation used for PLC –
application and implementation directives for IEC 1131-3 languages.
14
IEC 61499 standard consists of 2 parts. Firstly, it includes the function
block architecture and concepts for block–oriented systems design and
modelling. This part includes the following spheres:
General requirements – contain introduction, focus and normative
references (for other standards as well), definitions and reference models:
- rules for the function block type declaration and the instances
behaviour of function block types,
- rules for function block usage in configuration of distributed industrial
control system (IPMCS),
- rules for function block usage in connection with communication
requirements of distributed industrial control system,
- rules for function block usage in application, resource and device
management in IPMCS,
- Requirements for system and standard compatibility.
Second part defines software tool requirements for definition design of
the function block types and management of the function block libraries. It
contains an extending supplement for type definition of XML documents
used for the function block design exchange between software tools from
different suppliers. This part focuses mainly on design, implementation,
usage and maintenance of industrial distributed control systems constructed
with architectural usage and concepts defined in the first part. The XML
language is used to store and access the function block definitions, which
enables design transmission through the internet and offers an opportunity
to browse them by using internet browsers and save different attributes,
including the information about the version and allocation of the graphic
details.
15
Faced with a large number of industrial standards remains the issue of
which norm or standard is the best solution for our application. Each
standard contains precise rules for system creation, but only in theory. It
would be a waste of time to look for a specific recommendation for real
systems usage in the standards. When creating the distributed control
systems, there are several alternatives [24] for how to proceed. It is not
simple to select a specific solution without the knowledge of appropriate
standards and issues.
16
2. IEC 61131 AND IEC 61499 STANDARDS
AND THEIR FUTURE DEVELOPMENT
17
activated, function block instances are performed in a pre-defined order.
Function block instance activation in the distributed system can be carried
out according to a predefined cyclical plan as well. However, IEC 61499
supports a more generalized model, where the central mechanism provided
by the activation under the plan, cannot exist at all. Function block
execution is controlled by events and is very fast, but can be cyclical as
well. This is important for many control programs in modern devices.
Communication and input-output functions in the IEC 61131-3 model
are only loose-bounded to the variables, which are called in program by the
"access channels" mechanism and "global and direct represented variables".
There are no communication function blocks available between systems for
industrial fieldbusses. OPC (Object language embedded for Process
Control) is used to create communication links independently from the
application. IEC 61499 contains communication function blocks, which can
be implemented very easily and support different network access, so the
function blocks can be easily distributed to network devices. Function block
model according to IEC 61499, allows the existence of several alternative
algorithms in the function block body, which are selected according to
defined external events or conditions (e.g. initialization algorithm, standard
algorithm and algorithm called when failure or defect occurs). All this is
possible because, IEC 61499 function blocks can be designed by different
programming languages. There is only limited flexibility in the case of
fieldbus, because only basic function blocks can be used.
As the production management becomes more and more distributed,
the attributes like encapsulation and the function block reusable possibility
by end users, device suppliers and system integrators, become increasingly
18
important and widespread. As an extension of the programming languages
IEC 61131-3 supports, IEC 61499 not only uses the algorithm
encapsulation, but subprograms or even system applications as well. The
system designer, without any programming experience, is able to design
applications and use them again in the future. Such technology does not
exist for use of industrial fieldbus.
Because of adaptation to frequent changes in product composition and
volume, as well as the frequent introduction of new technologies, the
industrial processes will offer more opportunities for physical reuse in the
future. There are no doubts that thanks to the use of the IEC 61499 [58]
concept, the technical costs will be reduced and systems will be more
flexible and better maintained.
19
Bradley, Implementation of Rockwell function blocks). Access to memory
also varies between individual manufacturers. Some PLC support only
variables (attributes) assigned to a block (local attributes), while others can
access the global variables as well.
a) text
20
Fig. 4 Record of program function block call in IL
b) graphic
21
Fig. 6 Program flow record in FBD
S1 N Initialization
S2 N Loading
S3 N Heating
S4 N Fermentation
S5 N Unloading
S6 N Cleaning
22
One of the main features of this standard is to use function blocks -
parts of the control program [14], which are limited so they can be used in
different parts of the same program, or in other programs or projects as
well. Function blocks can store data or algorithms. That is a great advantage
over other similar concepts in programming languages (e.g. FORTRAN, C).
The function block describes the data flow as well as its structure.
Main parts of the IEC software model are pictured in Figure 8. These
parts are needed for the PLC software environment. The model consists of
several layers, each layer absorbs features located inside of it.
23
Configuration
Resource Resource
Access channel
Communication function
FB
Variable Function Variables Control
access block implementation
channel channel
24
can read and write the input-output variables and communicate with
other programs.
d) Task – can be configured to control the program group or function
blocks, which are executed, based on periodicity or event.
e) Function block – This concept is one of the most important elements
of IEC 1131-3 standard for software support of the hierarchical design.
Using the function blocks, it is possible to create a program from
smaller, easily controlled blocks. Each block can be programmed
through using other function blocks - clear, hierarchically structured
programs can be created this way. Function blocks in distributed
systems form the base for the IEC 61499 standard. Function blocks
consist of two parts: data, which defines the inputs and outputs and the
part where the algorithm is defined; code time, which always runs
during function block execution.
f) Functions - are software elements that provide one result based on
required inputs.
g) Global and local variables – standard allows declaring of variables in
different software elements. Global variables are available to any
software elements inside the program, while the local variables are
available only for included software elements.
h) Accurately representing variables – enables the data to be recorded in
and read from known memory area in PLC.
i) Access channels – are the last element of the model. They provide
resources for data and information transmission between different
configurations. Each configuration contains variables that are
accessible to other remote configurations.
25
The concept of the application itself [1] [27] [31] [38] is not defined
by the standard. Application must contain all control requirements for
activation, control and finish. Control is necessary for physical sensors and
actuator handling, event scheduling, and interaction with operating
terminals. Because the standard allows the resources to be activated
independently, large-scale PLC system can handle multiple independent
applications simultaneously (Fig. 10).
Configuration
Application A Application B C
26
Program instance A1 of program type A
Function block,
instance R1 type R
Function block,
instance X1, type X
27
2.2 IEC 61499
28
languages, for example in languages included in IEC 61131 (ST, LAD, IL,
SFC, FBD) [55] and in high-level languages as well (e.g. C or Java).
A network of basic and composite function blocks creates a body of
composite function blocks. Hierarchical structure, which assures the code's
reuse, can be built in this way. The composite blocks have their own
interface as well as the basic function blocks. Inputs and outputs of the
composite function block can be directly connected with inputs (outputs) of
the composite function blocks.
The result is an application formed by a network of basic and
composite function blocks. System configuration combines application
logic with the device topology, abstract definition of communication
networks and accurate assignment of function blocks to the devices. Service
interfaces [6] are designed to cover hardware dependencies of the
applications. Service interface is a "Black Box". Internal logic definition of
the service interfaces is not limited much by the standard. Service interface
is defined by multiple sequence of event specifications, which describe
interaction between hardware resources and function blocks. This method of
specification can be useful for documenting the service interface operation,
especially if this interface is hidden, or created in low-level programming
languages. Service interfaces can be used for implementation of various
communication protocols, database interfaces or Human Machine Interfaces
(HMI).
IEC 61499 standard defines the basic model and methodology for a
function block describing in form, which is independent from
implementation. Standard is the first step in providing design methodology
for distributed application development and modelling. Methodology can be
29
used by system designers to build distributed control systems. System is
defined in terms of logically connected function blocks running on different
process resources. Use of the IEC 61499 standard consists of two stages in
distributed control system designing:
function design phase – function requirements are represented as
a series of blocks, defining the basic features of software components
and their main connections.
functional distribution phase – is necessary to define distribution
management to process resources. Standard provides models and
concepts to define the distribution functionality of the function blocks
into connected function blocks.
Standard enables the function blocks, which include software
functionality and algorithm to be defined in a standard form. Standard
defines the range of the communication blocks as server and client blocks,
which are used to formalize data exchange between blocks in physically
different process resources.
Programming using this standard requires similar use of function
blocks as objects in object-oriented software programming, which model
entity and concepts behaviour in real-world settings. That is why they share
many advantages from software object use:
objects reflect the real world - during design the applications are more
natural and intuitively display the real world entities associated with
applications as objects.
Objects are stable - objects demonstrate software elements that are not
changing significantly. In many cases identical object classes within a
wide application range are developed and used.
30
Objects reduce difficulty – programmer can work with objects without
knowing and understanding how these two objects operate from the
inside. Application is being developed through creating and linking
references – it is not necessary to understand the objects in detail,
specifically their inside.
Objects are reusable – immediately after object development and
testing, it can become a part of the implementation tools, or library.
It is a great advantage [16] for system developers and end users
because function blocks share many of these features:
control software range developed for the application is reduced by
functional block usage
time needed to develop management systems is minimized
control system using identical types of the functional blocks shows
more consistent behaviour
control system quality improves
Designing the software for any project can be very difficult and it
includes multiple aspects of distributed management, including the software
running on different software resources. There is a requirement for multiple
graphic design previews, which allow it to be defined and analysed in terms
of other aspects. Some of the previews express abstract design aspects,
some are needed to see the system's physical structure, or its software
31
organisation. The most complex design requires at least four different
design previews and set of scenarios. This architectural form is known as
4+1 preview model, which is used for design previews of object–oriented
software and is equally applicable for creating the same design previews
used for distributed control systems (Figure 12).
Logic preview
Process preview
32
implementation preview of the distributed system, a network of
interconnected function blocks is created.
Development preview
Physical view
33
System model
Device model
Device is able to support one or more resources. The resource of IEC 61499
has similar features as resource defined in IEC 61131-3 standard. The
resource provides independent performance and function block network
control. The model contains the device interface which provides services
that allow resources to exchange data with input-output points on the device
and communication interface providing communication services for data
exchange through external networks with remote device resources.
Resource model
34
COMMUNICATION INTERFACE
Communication
recording
Events
Data
Working Algorithm Working
interface FB interface
FB FB
Process
recording
PROCESS INTERFACE
SCHEDULING FUNCTION
Application model
35
Data and events transmitted between
Event flows applications through operating interface
RESOURCE 1 RESOURCE 2
Work Work
block block Subprog.
interface interface
Data flows
Work Work
block block
interface interface
Definition of the function block type provides formal description of the data
structure and data assigned algorithms, which exists in different instances.
Function block consists of two parts:
"Execution management" – top part of the function block records
events in algorithms, provides information about the status between
input, output and algorithm execution events.
Bottom part of the function block contains algorithms and internal
data, which are hidden inside of the function block. Function block is
36
a software component type and if it is properly developed, it should
not request detailed understanding of its internal design from the user.
Function block operates in connection with its resource, which
supplies resources for algorithms scheduling and requests recording
for communication and process interfaces.
FB type name
Data flow Algorithms Data flow
(hidden in FB)
Internal data
(hidden in FB)
Resource abilities
(scheduling, communication, process recording)
37
2.3 PROFINET CBA
38
Specification of PROFINET CBA is largely in line with the model
described in IEC 61449-1.
System System
Application Application
Conjunction Connection
System
39
System System
Communication network Communication network
Device
40
Communication line / lines Connection / Connections
Resource
41
Device 1 Device 2 Physical device 1 Physical dev. 2
Resource 1 Resource 2 Resource 3 Logic Logic Logic
device 1 device 2 device 3
Function Function Function Function a Function c Function d
block a block c block d
Function Function b
block b
Function blocks
Function blocks are the basic architecture elements of IEC 61499-1. They
contain interfaces for data receiving and transmitting, as well as containing
internal data and executable algorithms invisible from the outside.
Technological functions of PROFINET CBA are based on the application
oriented Service Interface Function Blocks (SIFB ) described in IEC 61499-
1 standard.
Function blocks [32] have a fixed structure, or they are freely
programmable.
As a result of that, these devices can have either:
- fixed functions (e.g. fieldbus devices, drivers, sensors), or
- programmable and recordable functions (e.g. PLC, personal
computers).
42
2.4 Future development of IEC 61499 standard
43
reason for these gaps and deficiencies in the standard can be interpreted
differently.
The world of industrial automation and management has changed a lot
since works on the IEC 61499 standard began. Distributed devices,
programmable input/output modules and intelligent drives are more used in
the field of automation systems. Increasing their computing power and
increasing memory allows the control programs to maintain a reasonable
size. Ethernet in industrial and automation practice is another popular
technology of recent years. This technology allows any member of the
communication system to communicate with another. Another element is
the growing complexity of the control programs. Large modular devices
consist of 60 or smaller control devices (such as woodworking and printing
machinery). There are even more devices in the case of the building
automation. Currently available development methodologies and tools
cannot handle such a complex device. The main reason is that the IEC
61131-3 standard is designed for central tightly- bound control systems.
Therefore, it is difficult to build and keep the distributed systems in
operation. Software costs grow rapidly and exceed the price of mechanical
parts of the device.
IEC 61499, as an architecture focused on distributed control systems,
can solve the majority of such problems. Basic knowledge of IEC 61499
must be put under constant technology change and development in area of
industrial automation and control systems. Otherwise the IEC 61499
standard would be a nice concept without longevity. Vyatkin came to the
same conclusion in his essay on the use of IEC 61499 [57]. He also
mentioned the large increase in the number of published works on this
44
subject in recent years. This may be a sign of future recognition of the IEC
61499 standard.
One possibility for how to get the products supporting IEC 61499 on
the market is to help the producers integrate this technology into their
products. As a result, an open source initiative named Open Distributed
Embedded Control Environment (ODECE) [60], currently operating under
the auspices of the OOONEIDA society, was founded.
The next chapter lists the best known programming tools
implementing the IEC 61499 standard, as well as their brief descriptions
and future development prognosis for this standard.
45
3. PROGRAMMING TOOLS SUPPORTING IEC 61499
IEC 61499 has been practiced in research projects for years. Several
research groups [55] around the world participated in case studies research
as well as supporting tools prototypes.
Several programming tools are used according to IEC 61499 standard
(e.g. FBDK, ISaGRAF, Fbench).
3.1 FBDK
46
FBDK is at present managed by the company, Holobloc Inc., which
provides user training, references and industrial process, measuring and
regulatory systems based on IEC 61499 standard.
3.2 ISaGRAF
47
3.3 FBench
48
3.4 Tool implementing PROFINET CBA
49
Each intelligent machine/operation is represented by PROFINET
component in connection editor. It appears in software function form.
Simatic IMap combines elements of technology - oriented libraries,
regardless of the manufacturer or functionality.
On-line functions and communication function diagnostic possibilities
make the startup more simple.
PROFINET components can be used several times in Simatic IMap
(library components reuse) but only once, if they were designated as
so-called "unique".
Machine/operation can be hierarchically structured to any depth.
All variables which are necessary for general data access (e.g.
visualisation requirements) are generated automatically from technical
information.
50
Project view – is used for project management and survey of software
features used in the project.
Graphic view – structured representation of the configurated operation.
Procedure for project designing and launching with IMap [41]
proceeds as follows:
Creating the software components for each module of
device/operation.
Linking of the technology software components using the link editor.
Configuration of assigned devices in the network typology.
Recording the control programs and communication data into devices.
51
Although the IEC 61499 standard was implemented almost
exclusively in research laboratories, a number of design models were
designed and examined.
At the present time, a majority of these tools is used mainly for
research purposes [6] and not for commercial use because they do not have
sufficient support and are not compatible with most of the PLCs.
Because each implementation of the IEC 61131 or IEC 61499
standards has some weak points for distribution control system designing
(IEC 61131 was primarily not intended for distributed systems designing
and implementation of the IEC 61499 standard are still almost exclusively
intended for research purposes), it is necessary to consider all important
aspects and decide, which standard would be better to use for a particular
distributed system. The issue of choosing the suitable standard is discussed
in the next chapters.
52
4. METHODOLOGY PROPOSAL FOR COMPARISON OF THE
APPLICATION STANDARDS AND CRITERIA SELECTION
IEC 61131 standard is still a base, on which all previously used control
systems are built. This does not include creation of distributed control
systems. Although individual producers solve communication between their
own control systems, it is not a final solution for the problem with
distributed systems design. Although such systems can be created, the
programmer must solve many actions during software creation through
creating their own program blocks and must monitor many aspects [3] [4]
[19] [21] [22] [23] [29], which are ordinarily solved by the IEC 61499
standard, and increase demands on used components and provide much
more work for the programmer.
The IEC 61499 standard is directly dedicated to creating distribution
systems. But this is a new standard (work group, which started with the
standard development was established in year 1990), which is not
implemented in many cases by hardware manufacturers. Some companies
have already started with the implementation of this standard, but so far we
speak only about a few attempts, which do not solve all problems, and can
occur during distributed systems creation. Also the use of software tools
according to the IEC 61131 standard will increase total costs for system
creation because the software tools of IEC 61131 are widespread and long
used. This raises a question of which approach to use when creating the
distributed control systems. By comparing various criteria from both
systems, it is possible to determine which individual approach is suitable for
distributed systems creation of different types and sizes. This chapter is
focused on methodology constitution, which enables the comparison of both
53
mentioned approaches during creation of distributed control systems and
following a selection of suitable approaches for a particular system.
Platform selection
IEC 61131 software system creation IEC 61499 software system creation
IEC 61131 system criteria testing IEC 61499 system criteria testing
54
still dedicated to research purposes only and are not compatible with the
devices operating under the IEC 61131 standard. It is necessary to choose
system components, which are able to operate under the IEC 61131
standard or under the new IEC 61449 standard.
Since identical devices and communication networks are used for both
cases, the assumption is that the hardware performance of an entire
distributed system will be the same (whether IEC 61131, or IEC 61499).
Selection of programming approach will influence the communication
speed and difficulty and amount of work as well, which must be carried out
by the programmer in order to design the system. The following criteria will
be influenced by approach selection for system creation:
Request
Station 1 Station 2
Response
55
It is an important data piece, which corresponds with fast system
response to the status change. It is affected by various hardware
aspects, such as network complexity, used transmission medium,
network utilization influenced by other devices, distance between
stations, line speed and others. In addition, response time can be
largely influenced by used programming approach and selection of
software tools and technologies.
b) Network utilization – Network utilization will vary depending on the
selected system. It represents amount of data transmitted through the
whole network in one second. It is expressed in kB. Various
technologies use various communication transmission protocols that
are reflected in the data frame composition and in the quantity of
transmitted data. Desired status is to reduce network utilization to a
minimum possible value.
c) Program influence on the PLC cycle time - as visible in Figure 21,
PLC executes all operations [7] cyclically.
56
First it sequentially scans input devices and updates the image of their
status in the memory. Then all program blocks will be executed. After
processing the PLC program blocks, the output device status image is
updated in the memory. Finally, it will use the output status image for
a real change in the status of outcome devices.
Cycle time can be expressed as:
Tcycle = Tinput + Tprogram + Toutput (2)
Cycle time is an important piece of data that the programmers try to
reduce to the lowest possible value. This is the time in which PLC will
process all its inputs, program blocks and outputs. If this time is
increased to too high of a value, PLC would not respond soon enough.
It could even be possible that it does not respond to the input state
change [33], when this change takes place during program block
processing in one PLC cycle (Figure 22).
Input signal 1 2 3
1
0
PROCESS PROCESS DON’T
PROCESS
Output proc.
Input process.
Output proc.
Input process.
Output proc.
Output proc.
Output proc.
Input process
Input process
execution
execution
execution
execution
Program
Program
Program
Program
Input proce.
cycle cycle
time time
57
The assumption is that all blocks and service communication blocks
will increase the processing PLC cycle time.
d) Program influence on the size of PLC consumed memory – PLC
memory [39] consists of three basic parts :
1. Program memory – is used to save programs without any
associated names or comments.
2. Work memory – contains all data needed for program running.
3. System memory – contains memory elements, which provide
processor for user program.
PLC Memory
58
code that was necessary by the programmer to generate and implement
within the system.
When creating the software project, the following steps are necessary:
- insert all stations into the programming tool,
- set hardware configuration of all stations and all their modules,
- configuration of the communication network and station
communication interfaces,
- creating the communication program blocks [13] and review of all
events that can occur when communicating,
- creation of station control system itself .
59
4.3.2 Creating the distributed IEC 61499 system
60
maximum possible speed. Each measurement must last a certain time in
order to evaluate the results as an average value transferred over a period of
time. This excludes short-term deviations from the standard status.
4.4.3 Procedure for measuring the program impact on the PLC cycle time
4.4.4 Procedure for measuring the program impact on the size of PLC
consumed memory
61
4.5 Comparing the tested criteria
62
5. METHODOLOGY VERIFICATION
63
Physical system creation
64
5.2 Creating the experimental control system
PLC Configuration:
- power supply PS 307 5A,
- CPU 315F-2 PN/DP,
- memory card 512 kB,
- digital input module DI16xDC24V,
- digital input module DI32xDC24V,
- digital input / output module DI16/DO16x24V/0,5A,
- digital output module DO16xDC24V/0,5A,
- analog input / output module AI4/AO2x8/8Bit.
65
Each station contains interface PROFINET and ProfiBUS. One station
acts within the system as a "Master" (transmits requirements and processes
responses), while three remaining stations act as a "Slave" (responds to
requests from the Master station).
The initial project design phase of the distributed system is identical
for both approaches. First, you need to create a project by using Step7, to
where all the stations and their hardware sets are configurated. This is done
using the component of Step7 [48], Simatic Manager. The common
procedure ends are discussed in the coming sections of this paper.
66
5.3.1 Creating the hardware configuration
67
5.3.2 Creating the network interface system
68
channel number, data address in local system and data address in remote
system. After calling the function, the system waits for a response, it can be
sending a confirmation or an error message. GET function is used to receive
data from a remote system and similar parameters are being called, like for
PUT function. Each of these system functions occupies one communication
channel.
69
Measuring program in master station consists of:
- Program blocks
o OB1 – within this block all function blocks ensuring the
communication are cyclically called; it also monitors the
achieved required number of transmitted data,
o OB100 – initialize the communication by system startup.
- Function blocks
o FB14 – GET communication function,
o FB100 – function block provides data sending and receiving from
the first slave, station, it also provides counting of transmitted
data and saving the information about transmission start and
finish,
o FB101 – identical to FB100, supports the second slave station,
o FB102 – identical to FB100, supports the third slave station.
- Functions
o FC1 – function detecting actual system time,
o FC8 – system time conversion.
- System function blocks
o SFB14 – GET communication function,
o SFB15 – PUT communication function.
- System functions
o SFC20 – BLKMOV, called by function GET and PUT,
o SFC51 – RDSYSST, called by function GET and PUT,
o SFC58 – WR_REC, called by function GET and PUT,
o SFC59 – RD_REC, called by function GET and PUT.
70
- Data blocks
o DB1 – store transmitted data values,
o DB2 – store time values for transmission start and finish,
o DB100 – instance data block automatically created for
communication purposes with first slave station,
o DB101 – instance data block automatically created for
communication purposes, with second slave station,
o DB102 – instance data block automatically created for
communication purposes with third slave station.
71
5.4 Creating PROFINET CBA system
The first steps when creating PROFINET CBA system are identical to
creating the IEC 61131 system. The project was designed by using Step7
[42], four stations were added and their hardware configuration set. Unlike
the connection NetPro, the PROFINET CBA works differently. First step is
to create function blocks of PROFINET CBA [41] and particular shared
data blocks. One PROFINET CBA function block was created within each
station, which was associated with a shared DB3 data block. Master station
is in DB3 three input and three output variables (Slave1In, Slave2In,
Slave3In, Slave1Out, Slave2Out, Slave3Out). Slave stations store only one
output variable in DB3.
72
Master station contains following blocks:
- program blocks
o OB1 – communication variable status is cyclically monitored
within this block, change of their values will increase the value of
transferred data counter. Measuring startup and end time is also
recorded here;
- functions
o FC1 – function detecting correct system time,
o FC8 – system time conversion;
- data blocks
o DB3 – save values of the transmitted data,
o DB2 – save time values of the transmission start and finish.
73
Slave stations contain the following blocks:
- program block OB1 – cyclically called data generator FC1,
- function FC1 – ensures cyclical values change of transmitted date,
- data block DB3 – save values of the transmitted data.
74
PROFINET components [47] were subsequently created from
PROFINET CBA function blocks, which contain inputs and outputs
(elements of shared data blocks ). These were later implemented into the
Simatic iMap tool. Individual components are in iMap [43], graphically
connected, and that created a network interface for distributed system.
Cyclic communication of each channel with minimum refresh time was
adjusted, which is 8 ms. Then, communication of the whole system was
recorded into each station.
The time in which the remote station transferred the information about
system status change was determined in this measurement.
75
5.5.1 Measuring the system response time by Step7 and NetPro
When measuring the response of one slave station, FB101 and FB102
were block calls excluded; when measuring the response of two slave
stations, FB102 block call was excluded. When the measuring started,
current start time was written to DB2 block, when the data transmission
finished, finish time was written individually for each station. The last time
is considered to be the total time of communication.
23
Time [ms]
22
21
20
30
29
Time [ms]
28
27
26
25
24
76
36
Time [ms] 35
34
33
36
Time [ms]
35
34
33
57
Time [ms]
56
55
54
77
data types from binary values to integer values did not influence the
response time.
60
50
40
Time(ms)
30
20
10
0
Response time for communication with a single station, one binary value is transmitted
Response time for communication with two stations, one binary value is transmitted
Response time for communication with three stations, one binary value is transmitted
Response time for communication with three stations, 20 integer values are transmitted
Response time for two-way communication with three stations, 20 integer values are
transmitted
Fig. 40 Overview of the average response times by using Step7 and NetPro
When begun, current start time was written into DB2 block, when
finished with data transmission, finish time was written for each station
individually. The last time is considered to be the total communication time.
Cyclic communication with cycle time of 8 ms was set for the system.
78
26
Time [ms] 25
24
23
22
25
24
Time [ms]
23
22
21
20
28
27
26
Time [ms]
25
24
23
22
21
20
79
response time, as it still fluctuates around the value of 24 ms. Set cycle
value of 8 ms was not reached, PLC reached for both communication types,
minimum time 22 to 24 ms. This is probably the lowest communication
cycle time reached with this type of processor.
26
25
Tim e (m s)
24
23
22
21
20
Response time for communication with a single station, one binary value is transmitted
Response time for communication with two stations, one binary value is transmitted
Response time for communication with three stations, one binary value is transmitted
80
end device, it is not possible to determine the utilization through connection
of measuring device (in our case, computer with installed software for
network monitoring and catching of data packets) to the network by the
same way. An alternative is to replace the network switch by hub, which
sends received data to all connected devices, but PROFINET CBA network
cannot communicate when using a hub. One functional solution offered was
to connect measuring computer between computer and switch and master
station as a transparent bridge. For this role, it is necessary to equip the PC
with two network interfaces.
To catch the packets, clear operation system Windows XP with all
unnecessary services turned off and Wireahark software, was used. Each
measuring lasted 5 minutes.
81
First measuring was performed with distributed system, which was created
by Step7.
40
Thoughput [kB/s]
30
20
10
0
1 31 61 91 121 151 181 211 241 271
Time [s]
Thoughout for communication with a single station
Thoughout for communication with two stations
Thoughout for communication with three stations
82
30
Throughput [kB/s]
25
20
15
10
5
0
1 31 61 91 121 151 181 211 241 271
Time [s]
Thoughout for communication with a single station
Thoughout for communication with two stations
Thoughout for communication with three stations
83
8
7
Thoughput [kB/s]
6
5
4
3
2
1
0
As seen in Figure 48, change of the cycle time radically decreased data
transfers between the stations, and the actual response time was
approximately 50 ms. Every communication channel to follow increased the
data transfer by 2kB/s.
Because of the apparent difference in number of transmitted data, an
analysis of transmitted packets was performed by using both
communication methods.
There is a record of transmitted datas between two system stations
created in Step7 on Figure 49. As shown, two-way communication TCP/IP
is running between the stations. Master system is cyclically sending data
packets to the slave system. The slave system responds, and after successful
sending of the whole data frame, it confirms by sending ACK packet to the
master system. Then the master system confirms that the frame was
received.
84
Fig. 49 System communication record generated in Step7
85
Fig. 50 System communication record generated in iMap
86
5.7 Comparing the program impact on the PLC cycle time
Data were collected through the Hardware Config tool. This enables
the monitoring of current PLC status, including the cycle time.
Fig. 51 Cycle time for Step7 system, communication with a single station
87
Fig. 52 Cycle time for Step7 system, communication with two stations
88
Fig. 53 cycle time for Step7 system, communication with three stations
89
Fig. 54 Cycle time for iMap system, communication with a single station
90
Fig. 55 Cycle time for iMap system, communication with two stations
91
Fig. 56 Cycle time for iMap system, communication with three stations
92
5.8 Comparing the program impact on the PLC memory size
Data was collected using the Hardware Config tool. It allows for the
monitoring of the current state of PLC, including the size of memory
consumption.
Fig. 57 PLC Memory consumption without the program, only with recorded
HW configuration
93
Fig. 58 PLC memory consumption programmed by Step7, one connection
94
Fig. 59 PLC memory consumption programmed by Step7, two connections
95
Fig. 60 PLC memory consumption programmed by Step7, three connections
96
Fig. 61 PLC memory consumption, iMap, one connection
97
Fig. 62 PLC memory consumption, programmed by iMap, two connections
98
Fig. 63 PLC memory consumption, programmed by iMap, three
connections
99
35
Memory consumption [kb]
30
25
20
15
10
5
0
without Step 7 Step7 Step7 iMap iMap iMap
program 1 conn. 2 conn. 3 conn. 1 conn. 2 conn. 3 conn.
100
6. METHODOLOGY GENERALIZATION FOR SUITABLE
APPROACH SELECTION
101
k) system hardware network resources,
l) costs.
102
parameters represents the system reaction time, it is necessary to use the
PROFINET CBA standard.
103
6.4 Program impact on the cycle time PLC
It is data that indicates the time for which the PLC process its entire
program only one time. Of course, increasing the cycle time means delayed
station reactions to system status change. By default, this time varies within
milliseconds. The following lines describe the impact of communication
method between the stations on the outcome PLC cycle time. That time
does not include the impact of the control program itself, for both systems it
is approximately the same time.
For a system designed by IEC 61131 standard the minimum
achievable time for one communication channel is approximately 1
ms. Every next communication channel will increase the response time
about 1 millisecond. For a system with the maximum number
o communication channels, the cycle time will be increased to about
16 ms.
Increasing the number of communication channels does not have any
impact on PLC cycle time for systems designed with PROFINET CBA
standard. Communication takes 1 ms for any number of stations and
communication channels in the system.
For systems where the cycle time is not very important, a system
designed by IEC 61131 is acceptable. For systems where the reaction time
is an important parameter, it is better to use a system designed by the
PROFINET CBA standard.
104
6.5 Program impact on memory consumption for PLC
105
are available in the stations, it is possible to use the system according to the
IEC 61131standard as well. If it is a high-volume program, or where the
hardware memory size is limited, it is necessary to design the system under
the PROFINET CBA standard.
106
6.7 Costs
107
Start
NO
Remote system response time
Important YES
parameter
NO
Important YES
parameter
NO
PLC cycle time
Important YES
parameter
NO
PLC memory consumption size
108
Important YES
parameter
NO
NO
Hardware network
resources
YES Network
contains hub
NO
Financial costs
NO Experience YES
with IEC
61499
Usage of IEC Usage of IEC
End
109
As shown, in most of the criteria the IEC 61499 standard achieves better
results. It is not always possible to use one of the latest approaches when
using some of the older network components. Also, in the case of small
systems, the financial costs related to purchasing of important development
tools and developers' training may determine if the IEC 61131 standard
should be used.
110
CONCLUSION
111
were used within the network, it was not possible to use this standard in
some cases. Differences were not great when small distributed control
systems were created. With the increase in the number of stations, the IEC
61131 standard still showed worse results. The disadvantage of the IEC
61499 is that it is still not widespread. System developers need to be trained
and gain experience, which requires considerable financial costs and a large
amount of time. Also, the majority of developers do not own the tools
needed for system development according to the IEC 61499 standard. That
is why it is necessary to purchase them and their prices vary from hundreds
to thousands of euros. Therefore, for small systems with low output
requirements, it still seems better to use the IEC 61131 standard. Once the
IEC 61499 standard is widely used on a global scale, use of the IEC 61131
standard for development of distributed control systems will taper off. This
is not expected to happen for several years.
This is just one view of the complex problem with distributed control
systems. To make the comparison more simpler, only components made by
single manufacturer were used. Distributed systems may be formed from
the devices made by different manufacturers and it does not necessary to
only be programmable logic controller. Also, robustness of the distributed
control systems can be much greater. Theoretically, it can consist of
hundreds of cooperating control stations located in multiple areas. This also
offers the opportunity for future research on this topic. For that reason, the
next activities should focus on:
- distributed systems consisting of devices from multiple manufacturers
and multiple types
- distributed systems consisting of more devices,
112
- distributed systems where individual stations are divided into multiple
communication networks.
113
REFERENCES
114
[12] IEC. IEC 61131-3 Programmable Controllers - Programming
Languages. Geneva: International Electrotechnical Commision,
2003. ISBN 2-8318-6653-7
[13] IEC. IEC 61131-5 Programmable Controllers – Part 5:
Communications. Geneva: International Electrotechnical
Commision, 2000. ISBN 2-8318-5510-1
[14] IEC. IEC 61131-8 Programmable Controllers – Part 8: Guidelines for
the application and implementation of programming languages.
Geneva: International Electrotechnical Commision, 2003. ISBN 2-
8318-7210-3
[15] IEC. IEC 61499-1: Function blocks - Part 1: Architecture. Geneva:
International Electrotechnical Commision, 2005. ISBN 2-12-
4869111-6
[16] IEC. IEC 61499-1: Function blocks - Part 2: Software tool
requirements. Geneva: International Electrotechnical Commision,
2005.
[17] ISPE launch GAMP 5 Good Automated Manufacturing Practice,
[online] [cit. 19.7.2010] Available online at <http://tern-
quay.com/Docs/GAMP5_is_here.pdf>
[18] JOHN, K-H., TIEGELKAMP M. IEC 61131-3: Programming
Industrial Automation Systems. Regensburg, German: Springer-
Verlag, 2001. ISBN 3-540-67752-6
[19] JOHNSON, C. D. Process Control Instrumentation Technology.
Pearson/Prentice Hall, 2006. ISBN 978-0131194571
[20] KALUŽA, F. Methodologies, Metrics and Evaluation criteria for
effective ISMS. Part II. In Security revue, 2008. ISSN 1336-9717
[21] KALSI, H. S. Electronic Instrumentation. New Delhi: Tata McGraw-
Hill Publishing Company Limited, 2004. ISBN 978-0-07-058370-2
[22] KAMEN, E. W. Industrial Controls and Manufacturing. San Diego:
Academic Press, 1999, ISBN 0-12-394850-9
[23] LEONARD, J. Systems Engineering Fundamentals: Supplementary
Text. Fort Belvoir, Virginia: Defense Systems Management College
Press, DIANE Publishing, 2001. ISBN 9781428996113
[24] LEWIS, R. Modelling control systems using IEC 61499. London:
The Institution of Engineering and Technology, 2001. ISBN
0852967969
[25] LEWIS, R. Programming industrial control systems using IEC 1131-
3 Revised edition. London: The Institution of Electrical Engineers,
1998. ISBN 0852969503
115
[26] MAJOR, L. Standardisation and Quality management systems in
software and systems engineering. In ATP Journal 7/2004, pp. 100-
103. Bratislava: HMH. ISSN 1335-2237
[27] MILLER, R., MILLER, M. R. Industrial Electricity and Motor
Controls. New York: McGraw-Hill Professional, 2007. ISBN 978-
07-154476-4
[28] MORAVČÍK, J. Directive GAMP – Forms processing and
presentation. The Thesis, 2010. Trnava: UIAM MTF STU, pp. 10-
11.
[29] NAGRATH, I. J. Control Systems Engineering. New Delhi: New
Age International, 2006. ISBN 81-224-1775-2
[30] OEM Technology Solutions PTY LTD. ISaGRAF v3.5 overview,
[online] [cit. 19.7.2010] Available online at
<http://www.rabbit.com/documentation/docs/appkits/EmbeddedPLC
/ISaGRAF35_Overview_V1.pdf>
[31] PESSEN, D. W. Industrial automation: circuit design and
components. Wiley-IEEE, 1989. ISBN 0-471-60071-7
[32] PIGAN, R., METTER. M. Automating with PROFINET: Industrial
communication based on Industrial Ethernet. Erlangen: Publicis
Publishing, 2008. ISBN 978-3-89578-294-7
[33] PLC LADDER. Scan Time of PLC. [online] [cit. 19.7.2010]
Available online at <http://program-plc.blogspot.com/2010/02/scan-
time-of-plc.html>
[34] PHIPPS, C. A. Fundamentals of electrical control. The Fairmont
Press, Inc. Lilburn, GA, USA. 1998. pp. 119-124. ISBN 0-88173-
312-1
[35] PROFIBUS Working Group "Communication Function Blocks".
PROFIBUS Communication and Proxy Function Blocks acc. To IEC
61131-3. Karlsruhe: PROFIBUS Nutzerorganisation e.V., 2001
[36] PROFIBUS Working Group 10 "PROFINET CBA". PROFINET
CBA – Architecture Description and Specification, Karlsruhe:
PROFIBUS Nutzerorganisation e.V., 2004
[37] REAL TIME AUTOMATION. PROFINET CBA – An Innovative
Distributed Automation Solution, [online] [cit. 18.7.2010] Available
online at
<http://www.rtaautomation.com/profinetcba/ProfiNet_CBA_Overvie
w_R2.pdf>
[38] ROHNER, P. Automation With Programmable Logic Controllers.
Sydney: UNSW Press, 1996. ISBN 86840-287-7
116
[39] SAMK. S7 Memory Areas, [online] [cit. 19.7.2010] Available online
at <http://www.tp.spt.fi/~salabra/ha/Automaatiotekniikka/S7-
Memory.pdf>
[40] SARDESAI, A. R., MAZHARULLAH, O., VYATKIN, V.
Reconfiguration of Mechatronic Systems enabled by IEC 61499
Function Blocks. [online] [cit. 2010-07-19] Available online at
<http://www.araa.asn.au/acra/acra2006/papers/paper_5_24.pdf>
[41] SIEMENS AG. Component based Automation Creating PROFINET
Components. Nürnberg: Siemens AG Nürnberg. 2003.
A5E00248719-01
[42] SIEMENS AG. Component based Automation Commissioning
Systems. Nürnberg: Siemens AG Nürnberg. 2003. A5E00248818-01
[43] SIEMENS AG. Component based Automation Configuring Plants
with SIMATIC iMap. Nürnberg : Siemens AG Nürnberg. 2003.
A5E00248797-01
[44] SIEMENS AG. Programming with STEP 7 - Manual. Nürnberg:
Siemens AG Nürnberg. 2006. A5E00706944-01
[45] SIEMENS AG. Statement List (STL) for S7-300 and S7-400
Programming - Reference Manual. Nürnberg: Siemens AG
Nürnberg. 2006. A5E00706960-01
[46] SIEMENS AG. Configuring Hardware and Communication
Connections with STEP7 - Manual. Nürnberg : Siemens AG
Nürnberg. 2006. A5E00706939-01
[47] SIEMENS AG. SIMATIC iMap STEP 7 AddOn Creating
PROFINET Components. Nürnberg : Siemens AG Nürnberg. 2008.
A5E00716547-02
[48] SIEMENS AG. Tools for configuring and programming SIMATIC
Controllers.
[49] Brochure. Nürnberg: Siemens AG Nürnberg. 2009. 6ZB5310-
0MM02-0BA6
[50] SIEMENS AG. Engineering communications – across all
boundaries: SIMATIC iMap. [online] [cit. 2010-07-19]. Available
online at <http://www.automation.siemens.com/>
[51] SPE Glossary of Pharmaceutical and Biotechnology Terminology
Glossary of Applied Terminology for the Pharmaceutical Industry,
[online] [cit. 2010-07-19]. Available online at
<http://www.ispe.org/glossary?term=Good+Automated+Manufacturi
ng +Practice+%28GAMP%29>
117
[52] STRASSER, T., MULLER, I., SCHUPANY, M., EBENHOFER, G.,
MUNGENAST, R., SUNDER, C., ZOITL, A., HUMMER, O.,
THOMAS, S., STEININGER, H. An Advanced Engineering
Environment for Distributed & Reconfigurable Industrial
Automation & Control Systems based on IEC 61499. [online] [cit.
2010-07-19]. Available online at
<http://conference.iproms.org/sites/conference.iproms.org/files/PID1
55260.pdf>
[53] SWAINSTON, F. A Systems Approach to Programmable
Controllers. Albany, New York: Cengage Learning, 1992. ISBN 0-
8273-4670-0
[54] TICKIT SCHEME, [online] [cit. 19.7.2010] Available online at
<http://www.tickit.org/scheme.htm>
[55] VYATKIN, V. IEC 61499 Function Blocks for Embedded and
Distributed Control Systems Design. Ottawa, Canada: O3NEIDA –
Instrumentation Society of America, ISBN 978-0-9792343-0-9
[56] VYATKIN, V., CHOUINARD, J. On comparisons of the ISaGRAF
implementation of IEC 61499 with FBDK and other
implementations. In Proceedings of Industrial June 2008, pp. 289–
294. ISBN 978-1-4244-2170-1
[57] VYATKIN, V. The Potential Impact of the IEC 61499 Standard on
the Progress of Distributed Intelligent Automation. In International
Journal of Manufacturing Technology and Management, 2006, vol.
8, pp. 107-125. ISSN 1368-2148
[58] YANG, W. Implementation of IEC61499 Distributed Function Block
Architecture for Industrial Measurement and Control Systems
(IPMCS). [online] [cit 2010-07-19] Available online at
<http://www.holobloc.com/stds/iec/tc65wg6/meetings/fla03/yangwei
.pdf>
[59] ZIMMERMAN, G. P. Programmable Logic Controllers and Ladder
Logic. Rapid City: Dr. Alfred R. Boysen, Department of Humanities,
South Dakota School of Mines and Technology, 2008
[60] ZOITL, A. Real-Time Execution for IEC 61499. Ottawa, Canada:
O3NEIDA – Instrumentation Society of America. ISBN 978193439-
4274
118
[61] ZOITL, A., STRASSER, T., HALL, K., STARON, R., SUNDER,
CH., FAVRE-BULLE, B. The Past, Present, and Future of IEC
61499, Holonic and Multi-Agent Systems for Manufacturing. In
Third International Conference on Industrial Applications of
Holonic and Multi-Agent Systems. Regensburg, German: Springer-
Verlag, 2007. pp 1-15. ISBN-10 3-540-74478-9
119
CONTENTS
Abstract 5
LIST OF ACRONYMS 6
LIST OF SYMBOLS 8
INTRODUCTION 9
1. CURRENT STATUS IN INDUSTRIAL AUTOMATION
STANDARDS 11
1.1 IEC standards 11
1.1.1 IEC 61131 standard 13
1.1.2 IEC 61499 standard 14
2. IEC 61131 AND IEC 61499 STANDARDS
AND THEIR FUTURE DEVELOPMENT 17
2.1 IEC 61131 19
2.2 IEC 61499 28
2.2.1 System design 31
2.2.2 Models and concepts 33
2.3 PROFINET CBA 38
2.4 Future development of IEC 61499 standard 43
3. PROGRAMMING TOOLS SUPPORTING IEC 61499 46
3.1 FBDK 46
3.2 ISaGRAF 47
3.3 Fbench 48
3.4 Tool implementing PROFINET CBA 49
3.5 Future development of tools implementing IEC 6149951 54
4. METHODOLOGY PROPOSAL FOR COMPARISON
OF THE APPLICATION STANDARDS AND CRITERIA
SELECTION 53
4.1 Platform selection 54
4.2 Criteria selection for comparing 55
4.3 Creating the distributed system 59
4.3.1 Creating the distributed IEC 61131 system 63
4.3.2 Creating the distributed IEC 61499 system 60
4.4 Testing of the selected criteria 60
4.4.1 Procedure for response time measuring 60
120
4.4.2 Procedure for measuring network utilization 60
4.4.3 Procedure for measuring the program impact on the PLC
cycle time 61
121