Interactive Control of A Virtual Machine
Interactive Control of A Virtual Machine
Interactive Control of A Virtual Machine
Interactive Control of a
Virtual Machine
2005
In co-operation with
Supervisors:
Gustaf Olsson, Professor, Industrial Electrical Engineering and
Automation, Lund University, Lund
Istvan Ulvros, Senior Technology Specialist, Tetra Pak Research and
Development, Lund
Copyright © Joakim Davidson and Tobias Sennö, 2005
http://www.iea.lth.se
II
Summary
The purpose of this Master thesis is to examine the market for simulation
software that can control a model of CAD-geometry by PLC-code, and then
evaluate selected software.
The main idea is to use existing CAD-geometry, add kinematics and logics,
and then control this by PLC-code. The purpose of the simulation is to
discover problems with the geometry, i.e. collisions, early in the
development process. When the geometry is determined, the verified PLC-
code can be downloaded to the real PLC and connected to the real model.
The real machine will then behave exactly as the virtual machine.
III
IV
Preface
This master thesis was done at Lund Institute of Technology (LTH) at Lund
University for a Master of Science degree. The project treats a mechatronic
problem and the authors’ background is one from electrical engineering and
one from mechanical engineering. The study was initiated by the
department of Industrial Electrical Engineering and Automation (IEA) and
was carried out in co-operation with Tetra Pak Research and Development.
First of all, we would like to thank our supervisor Professor Gustaf Olsson
at IEA for his arouse enthusiasm in share of the work.
We will thank all employees at Tetra Pak that has been involved in this
project and especially our supervisor at Tetra Pak, Istvan Ulvros.
We would also like to thank Delima and Eric Retraint for their interest in
our project and for supplying us with necessary software. Lise Upjohn at
Delia Automation’s support has been an indispensable access for help with
technical questions.
V
VI
Nomenclature
CAD Computer Aided Design
CPU Central Processing Unit
DA DELMIA Automation
DOF Degree of Freedom
FBD Function Block Diagram
HMI Human-machine interface
I/O Input Output
IC Integrated Circuit
IEC International Electrotechnical Commission
IEEE Institution of Electrical and Electronic Engineers
IL Instruction List
LD Ladder Diagram
MSE Mechanical Simulation Engine
OLE Object Linking and Embedding
OPC OLE for Process Control
PLC Programmable Logic Controller
Pro/E Pro/Engineer, 3D CAD-software from PTC
R&D Research and Development
SFC Sequential Flow Chart
SRS Software Requirement Specification
ST Structured Text
STEP Standard for Exchange of Product model data, neutral file format
in CAD-software
VRML Virtual Reality Modeling Language, neutral file format in
CAD-software
VII
VIII
Contents
1 INTRODUCTION ........................................................................... 1
1.1 Background ........................................................................... 1
1.2 The task ................................................................................. 2
1.3 Delimitation........................................................................... 2
1.4 Target group .......................................................................... 3
1.5 Company presentation........................................................... 4
Tetra Laval........................................................................ 4
Tetra Laval International.................................................. 4
Tetra Pak........................................................................... 5
DeLaval............................................................................. 6
Sidel................................................................................... 6
1.6 Overview of the project......................................................... 6
1.7 Outline of the report .............................................................. 7
3 METHODOLOGY ........................................................................ 17
3.1 Work method....................................................................... 17
3.2 Information sources............................................................. 17
3.3 Criticism of source .............................................................. 18
4 MARKET SURVEY...................................................................... 21
4.1 Requirement of the software ............................................... 21
4.2 Vendors ............................................................................... 21
Delmia – Delmia Automation.......................................... 24
Rockwell – RSTestStand.................................................. 25
Mewes & Partner – WinMOD......................................... 26
IX
Tarakos – taraVRcontrol.................................................27
4.3 Satisfying the requirements .................................................27
Conclusion ......................................................................29
4.4 Presentation of selected vendors .........................................30
Delmia .............................................................................30
Dassault Systèmes ...........................................................31
Dextus..............................................................................31
Schneider Electric ...........................................................32
5 SIMULATION ENVIRONMENT.................................................33
5.1 Programmable Logic Controller..........................................33
History of the PLC ..........................................................33
PLCs of today..................................................................34
5.2 IEC 61131-3 ........................................................................34
Sequential Function Chart ..............................................35
Ladder Diagram..............................................................37
Function Block Diagram.................................................38
Structured Text ................................................................39
Instruction List ................................................................39
5.3 Delmia Automation .............................................................40
Device Builder.................................................................41
HMI Control Panel Design .............................................43
LCM Studio .....................................................................44
Smart Device Builder ......................................................46
Controlled System Simulator...........................................47
PLC Setup .......................................................................49
5.4 Pro/Engineer........................................................................49
5.5 Simulation object.................................................................50
X
7 CONCLUSIONS............................................................................ 63
7.1 Summary of results ............................................................. 64
7.2 Recommendations ............................................................... 66
Recommendations in brief............................................... 66
Comments........................................................................ 67
7.3 Future works........................................................................ 68
REFERENCES ........................................................................................ 69
XI
XII
1 Introduction
This chapter is an introduction to the master thesis and explains why Tetra
Pak is interested in this topic. In the end of the chapter there is a short
description of how the master thesis project has proceeded and an outline of
the report.
1.1 Background
Tetra Pak R&D develops packages and filling machines for the food sector.
The new filling machines are developed at the R&D Department of
Machine Technologies, where also the capacities of the existing machines
are increased. They work with the whole process from the in-feed of
material to the package outlet via the filling process.
Tetra Pak R&D wants to find a method that improves the development
process, this can be done in many ways. If the number of errors is reduced
before the prototype is built, both money and time will be saved. By
developing the software in parallel with the mechanics also the process will
be improved. If it is possible to reject a non-working concept at an early
stage of the process much effort will be saved.
1
The project treats a mechatronical problem, which includes and combines
techniques from electrical and mechanical engineering. To take care of the
opportunities and challenges in this topic the authors’ background is from
one of each faculty.
The first part of the master thesis was to make an investigation of the
market for simulation software. The software should be able to simulate a
virtual machine together with a real PLC and the main reason to do a
simulation is to verify the mechanisms of a machine.
After the investigation, in the second part, one or more software platforms
should be chosen for practical evaluation. Tetra Pak uses the CAD-software
Pro/E for design of all their machines. For that reason the simulator must
have the ability to import a CAD-model from Pro/E. The simulator must
also handle signals between the model and a PLC. The simulated model
should behave as a real machine, and the reaction of the signals from the
PLC-system should also be as in reality.
This thesis will deliver a survey of the simulation market and an evaluation
of selected software product. With the software a simulation of a virtual
machine will be made, controlled by a PLC, and the results will be
compared with a real machine. This will also result in a demonstration
arrangement at Tetra Pak R&D.
1.3 Delimitation
In this master thesis there were several delimitations made. The
delimitations discussed in this chapter concern the thesis in general. The
limitations of the software will be discussed later on in a market survey of
the software. The limitations of the chosen software will be discussed in
Chapter 5.3.
2
software must be able to import geometry from Pro/E. A survey of CAD
suppliers will not be made even if there are suppliers who have CAD-
software that is more integrated with the simulation software than Pro/E is.
The house language at Tetra Pak is English and therefore this thesis is
written in English. Another reason is that some of the people at Tetra Pak
R&D who are interested in this project do not speak Swedish.
3
1.5 Company presentation
This master thesis was done by order of a company, Tetra Pak. In this
chapter a presentation of the group of companies that forms the Tetra Laval
group will be done.
Tetra Laval
Tetra Laval is the name of three industry groups that are focused on
systems for production and distribution of foods. The three industries are
Tetra Pak, DeLaval and Sidel. They are all autonomous. The name Tetra
Laval was founded in 1993 after Tetra Pak acquired Alfa Laval and its
activities were integrated1. Alfa Laval was issued in 2002 at the stock
exchange and no longer belongs to the Tetra Laval group.
The Tetra Laval International is responsible for the financing in the Tetra
Laval Group. The company assures that the standards and operations from
Tetra Laval Group Board are fulfilled in the three industry groups3.
1
Nationalencyklopedins Internettjänst, Tetra Laval (Internet), 2005-04-08
2
Tetra Laval, About Tetra Laval (Internet), 2005-04-08
3
Tetra Laval, About Tetra Laval (Internet), 2005-04-08
4
Tetra Pak
The founder of Tetra Pak was Dr. Ruben Rausing. He started his career
together with Erik Åkerlund by founding the packaging company Åkerlund
& Rausing, Å&R, in 19294. In this company the development of a package
for flour and sugar began. After some years of success a development of a
package for milk started. The packaging system that Å&R developed was
not only a revolution by packaging technique but also the package material,
paper with a layer of plastic. As a result of this package the new company
Tetra Pak was founded in 1950.
In 1951 AB Tetra Pak was established in Lund, Sweden. Later this year,
18th of May, a new packaging system was presented. This was a system that
created a center of attention from the press. In September one year later the
first system was installed at Lundaortens Mejeriförening5. From now on the
system was spread to dairy companies all over Sweden. Some years later
the installation of Tetra Pak machines in dairy companies in Europe began.
From this point Tetra Pak expanded worldwide and introduced new
products every year. In 1985 Tetra Pak acquired Alfa-Laval Logistics AB,
a company involved in the development and marketing of distribution
equipment for the dairy and food industries7. In 1991 this was finalized and
the Tetra Pak Alfa-Laval Group was formed.
One of Tetra Pak’s latest products is the new packaging system Tetra
Recart. The material in Tetra Recart is resistant to fruit acid, which makes
it to a competitor to the traditional tin, but still it can be recycled as
cardboard. The Tetra Recart package can be retorted, a high-pressure
cooking in an autoclave, to make it aseptic. This is done when the package
is filled and sealed. Retorting was not possible earlier with other packages
4
Region Siljan, De som lyfte landet (Internet), 2005-04-08
5
Tetra Pak, The Company History (Internet), 2005-04-08
6
Tetra Pak, The Company History (Internet), 2005-04-08
7
Tetra Pak, The Company History (Internet), 2005-04-08
5
made of paper and makes the Tetra Recart usable in many different
applications.
Today Tetra Pak is one of the largest packaging companies in the world
with over 20 000 employees in 165 countries around the world, and net
sales of 7.5 billion EUR8. In 2003 Tetra Pak broke the magical mark of
100-billion-packages delivered in a year9. Tetra Pak is a fast growing
company, especially in China.
DeLaval
Sidel
In 2003 the French company Sidel was purchased11. Sidel is one of the
world leading companies for plastic bottles. They manufacture blowing and
filling machines, and they also design bottles. The bottles are used for
liquid food such as water, oil, milk, tea, fruit juices and beer12.
A survey of the players on the software market was the next step in the
project. Simulations where a virtual machine and a real PLC are connected
to each other are a young business area and therefore it was necessary to
8
Tetra Pak, In figures (Internet), 2005-04-08
9
Tetra Laval, Tetra Laval 2004 (Internet), 2005-04-08
10
Tetra Laval, About Tetra Laval (Internet), 2005-04-08
11
Halogen, Tetra Laval (Internet), 2005-04-08
12
Tetra Laval, About Tetra Laval (Internet), 2004-04-08
6
make a software requirement specification (SRS) that clearly describes
what the software must handle. Out of the SRS an investigation was made
to get knowledge of which players there are on the market and what their
products manage. From the investigation the software was selected for
further evaluation. This part of the project was made during most part of
April and the first part of May.
The software to use for the simulations was selected and a copy from the
manufacturer was demanded. Although the manufacturer promised to send
it in a short time, it was not received until three weeks later. The theoretical
parts of the report were written during these weeks, while the contacts were
established with the vendor.
After the tests the model of the simulated object was built up in DA. This
took place during the second part of June and July.
From August the work was concentrated to write this report and do a
presentation of the project.
The last part is the practical result of the master thesis, Chapters 5, 6 and 7.
In Chapter 5 there is an overview of the used environment. Chapter 6
7
describes how a simulation can be implemented. In Chapter 7 the
conclusions are found as well as the recommendations to Tetra Pak and for
future works.
8
2 Controlling the virtual system
To take both the control system and the mechanical system into
consideration under simulation is quite an unexplored area. Therefore there
will be an introduction in this chapter to the fundamental ideas and what
kind of research that has been done. There are also some general aims why
to do simulations.
There are two types of systems to simulate, dynamical systems and discrete
event systems. Both of them can be simulated, but the result of a simulation
will never be better than the models and the data that are used. This must
always be remembered when the results are presented.
13
Olsson, Gustaf – Rosen, Christian; (2004); Industrial automation, Ch. 8
9
equations can be used to define the model and these equations must be
solved to run the simulation. The initial conditions for the model must be
known. The equations can be used together with conditional expressions,
i.e. if-then-else. The equations of the dynamical model can be used in two
ways in a dynamical system, depending on the software. To describe the
system either a conventional text editor, an equation oriented description,
or a block oriented description can be used. An example of block oriented
description is Simulink, which is a part of Matlab, from The MathWorks.
In block oriented description the model and the different parts of the system
will be defined in different blocks, such as input generating functions and
integrators. Then these symbols and blocks are connected in a flow diagram
to describe the dynamics of the process.
Often the most essential part of the simulation is the results of the
simulation. It is therefore important how the results are presented, how they
can be saved, and interact with other software systems to analyze the output
data. If it is possible to connect the simulator to a database with real data,
or to a real-time input, it is possible to incorporate real data in the
simulation. With a real-time input it is possible to do on-line analysis and
diagnosis.
For the discrete event simulators there are other parameters that are
important in the simulation results, for example in a manufacturing system,
such as utilization rate, queue lengths and production rates - both for the
whole system and for each machine.
10
connected to each other and they could not be verified as one system before
the prototypes are built up. The idea with the simulations made in this
thesis is the connection between the systems. Both the parts will be
integrated in the same system. The system consists of four parts, a virtual
machine, a virtual PLC, a real machine and a real PLC. In the first part of a
project only the virtual machine and the PLC are used. Many ideas and
codes can be tested on the virtual machine. When the geometry of the
machine is fixed, the machine can be build up and the real PLC can be
ordered. Then the real systems can be verified against each other. The real
PLC can also be run against the virtual machine during the development
process. The idea is visualized in Figure 2.1.
PLC-program
The connection between the virtual machine and the virtual PLC can be
done in several ways. The easiest case is if the software comes from the
same manufacturer and already has got a communication link between the
11
different parts. This is the case with Delmia Automation. Another case is if
the software communicates with a bus, i.e. Profibus. In this case it can
sometimes be necessary to write a handshaking-protocol. This can be
difficult to do and if the equipment is changed the handshaking-protocol
must be rewritten. The third way to communicate is via Object Linking and
Embedding for Process Control (OPC). OPC is open connectivity via open
standards. To use open standards is an advantage because many software
systems on the market can use OPC, but it is also a big drawback because
the communication over OPC is slow. Therefore many of the software
products on the market can handle several types of communication. This
usually includes both OPC for the compatibility and an own developed
system with much higher performance.
Later there were two more theses at Tetra Pak, and they have used software
from the Finish company Lumeo. The software was an add-on module in
Pro/Engineer.
14
Sivtoft, Jan-Olof (2002); The design of a simulator for the automation industry
12
verify a machine and control a machine simulated with Lumeo’s software
by a commonly used fieldbus15.
Unfortunately Lumeo was dispersed from the market and their products are
no longer available for use.
There are some other theses done at the topic of simulation and offline
verification of virtual machines. Most of them handle robots and off-line
programming of robot cells. It is mainly the automotive industry that urges
this development17.
15
Hammarlund, Ola - Persson, Dan (2003); Real Simulation Control, Design of
Communication for a Simulator Device
16
Olofsson, Annika – Lindqvist, Marie (2003); Simulation and programming of a
prototype machine as a simulator
17
CIMdata, The Benefits of Digital Manufacturing (Internet), 2005-05-13
18
Gore, Ganesh – Sharique, Farid Syed (2004); Virtual Verification of Auto-
generated PLC programs
13
2.3 Benefits of simulations
What is the purpose of doing simulations and off-line programming instead
of doing real things and on-line programming? The short answer is time
and money. Today there are less margins for mistakes, and with simulation
it is possible to discover errors early in the development process. If the
right things are done directly with the real equipment a lot of money can be
saved, see Figure 2.2. This will also give an increasing productivity and
decreasing development time. This gives a shorter time to market.
Cl
os
Idea ed Cost
Generation W
ind
ow
so
Project
fO
pp
Definition or
tu
nit
y
Concept
Development
Prototype
Development
Product
Validation
Commercial Options
Launch
Time
In the last decade the interest in simulators has increased significantly. Two
reasons to this are that computing calculation capacity has increased
19
Tech-Clarity, Digital Manufacturing (Internet), 2005-05-24
20
Tetra Pak, Tetra Pak Innovation Network (Internet), 2005-09-19
14
enormously and that the competition between the actors on the market has
increased. By doing 3D-simulations the results can also be visualized for a
non-technical person.
21
Danielsson, Fredrik (2002); Off-line programming, verification and optimisation
of industrial control systems, p93
15
One example of using simulators in the industry is the development and
production of Volvo’s new SUV XC90. This was developed, tested,
corrected and reconstructed in a virtual factory. This gave the opportunity
to start the production in 20 % shorter time that had been possible in a
traditional way. Volvo also trained their operators and assembly workers at
the production line. These digital development processes gave the result
that instead of manufacturing three test runs of cars they only needed to
manufacture one test run. The production started one year earlier and the
cost savings were, conservatively calculated, hundreds of millions of SEK
to develop and adjust the car to the production22.
22
Ny Teknik, Volvo lär Ford att bygga bilar i datorn (Internet), 2005-04-14
16
3 Methodology
How to organize the work is an important part of the master thesis. If there
is a good profile of the work from the beginning it becomes much easier to
finish the project in right time and with a good result. Another important
part is the information, how it is collected and critically inspected.
Parallel with the development of a SRS a literature study was initiated. This
study has its main part in the first period of the project, but it has continued
during the whole project when new questions have come up. A real
advantage with a literature study is the possibility to obtain much
information in a short time with small economical resources23. The
literature study was done to acquire knowledge from earlier investigations
in the topic of our thesis and also knowledge of theories, models and
methodologies24. Together with the information from Tetra Pak R&D this
formed what was essential for the project. It was also in help when the
delimitations of the project were made.
23
Björklund, Maria – Paulsson, Ulf; (2003); Seminarieboken, Ch. 4
24
Patel, Runa – Davidson, Bo; (1994); Forskningsmetodikens grunder, Ch. 3
17
Google, were used and also different forums and portals for automation.
The manufacturers’ home pages were used to get detailed information of
the software features. The vendors were also contacted to get a clearer
answer to some questions. To get an own conception of the software
features and limitations a trial run was done of some of the software
products, where this was possible. Most part of the information comes from
the manufacturers of the software but other sources were searched, for
example where the software was used by independent professionals and
specialists.
In April 11-15, 2005 the Hannover Industry Fair took place and at this fair
the four vendors in the second part of the assessment were represented. One
of the possible vendors introduced their new product on the market at this
fair. The supervisor for this master thesis at Tetra Pak went to Hannover
and this gave the opportunity to meet people from the vendors and discuss
the features and possibilities of their new product.
At Lund University Library (LUB) several searches were made for material
of research methodology and earlier theses of simulations. From the
department of Industrial Electrical Engineering and Automation (IEA)
some theses were borrowed and via the Studiecentrum at Lund Institute of
Technology (LTH) several theses were ordered from Chalmers University
of Technology, and also one Ph. D thesis from De Montfort University in
the UK.
18
things in mind. A simulation of a product from Tetra Pak has been
accomplished to give an own opinion of the software and to do a correct
evaluation of its advantages and disadvantages. As they work in practice
and not how they are described by vendors.
19
20
4 Market survey
To do good simulations it was necessary to do a market survey to get
knowledge of which actors there are on the market. In this chapter there
will be a discussion of the requirements of the software and how the
vendors meet these requirements.
One of the most important requirements is that the software can import
geometry from Pro/E, the CAD-software they use at Tetra Pak. It is also
required that the software can handle control signals from a PLC and to get
a visual display of the model during the simulation. Another requirement is
that the software and documentation must be available in English, the
house language at Tetra Pak. There were also requirements that the
software will run on a PC with MS Windows, that internal logics can be
defined and that a review of the simulation will be in real-time. Because of
demanding calculations during the simulation, it is most probably that the
simulation will not be in real-time and therefore it must be an automatic
synchronization of emulated real-time between the PLC and the virtual
machine in the PC.
4.2 Vendors
At the beginning there were proposals of vendors that got software to
handle the type of simulations that will be done. It was only proposals and
several extensive searches on the Internet were made to find even more
vendors. The searches gave some more candidates and they are included in
the list of vendors. The assessment of the vendors was made in two steps.
In the first step the software was appraised with some simpler requirements
21
together with the general impression of the software. In this step ten
vendors were available who had software that possibly could do the
simulations. They are listed in Table 4.1.
Table 4.1: The ten vendors and simulation software in the first assessment.
Vendor Software product
Cimetrix CODE
Cosimir Cosimir PLC
Delmia Delmia Automation
Fiebach-Datentechnik E-control
Mewes & Partner WinMOD
Mitsubishi GX Developer
Rockwell RSTestStand + RSLogix
Tarakos taraVRcontrol
Tecnomatix eM-PLC
Woodhead SST Pics
Because of different reasons six of the possible vendors and their software
did not qualify to the second part of the assessment. Cosimir PLC and
Woodhead SST Pics aimed at training of operators. SST Pics is mostly
aimed for the process industry and Cosimir is developed for the simulation
of robots. In Mitsubishi GX Developer it is possible to test the software but
there is no feedback from the model. In the software CODE from Cimetrix
it was not possible to import geometry from a CAD-system and the
software does not seem to have been developed during the last three years.
Except for this the software had potential to be good software for
simulation purposes. There was not sufficient information about E-Control
from Fiebach-Datentechnik, but it has the possibility to import CAD
geometry and to define sensors. A request for more information was sent to
them and an answer came that they should send it, but despite reminders
they didn’t send the information. The eM-PLC from Tecnomatix has the
direction of auto-generating PLC-code. The sequences will be defined and
then the PLC-code will be auto-generated. This code can then be verified
against a virtual model.
After the first step in the assessment had been completed there were four
vendors left: Delmia, Rockwell, Mewes & Partner and Tarakos.
22
After the survey was done and a vendor was selected a new software,
MSC.visualNastran 4D, was found. Because it was found so late there was
no complete evaluation done. It has some good potential, and can easily be
integrated with the CAD-software and changes can easily be transferred
into MSC.visualNastran 4D. It uses friction and gravity so the simulation
can be realistic. There are different kinds of possible analysis, e.g. collision
and velocity. The system can be controlled by Matlab and Simulink or via
Visual Basic. If Visual Basic is used it can be connected to a PLC. This
type of control, with a second program and a specialized communication
link feels like going backward in the development. Communication by
special written communication links and protocols has been used in earlier
master theses at Tetra Pak and was problematic and caused many problems.
23
Delmia – Delmia Automation
25
Screenshot from an example file made by Delmia, Machine14
24
Rockwell – RSTestStand
26
Rockwell Software, RSTestStand Enterprise, Getting Result Guide (Internet),
2005-05-30
25
Mewes & Partner – WinMOD
The company Mewes & Partner offers the software WinMOD. This
software is for real-time simulation, signal-management and for serving
and observing functions. Devices and component-assemblies will form the
virtual machine that is implemented as WinMOD-macros. WinMOD can be
connected to a real PLC via Profibus or to another PC via Ethernet. With
WinMOD it is possible to incorporate the real HMI in the simulation
system. In Figure 4.3 a screenshot of the interface of WinMOD is shown.
27
WinMod, Virtual machine for mechanical engineering (Internet), 2005-05-30
26
Tarakos – taraVRcontrol
28
Tarakos, IEE 11-2004, Fertige Programme für fictive Maschinen (Internet),
2005-05-30
27
questions. Some of them said they would return with answers and some did
not answer at all. The representative from Delmia answered fast and was
very positive and interested in our project. This has influenced the choice
of vendor in the way that there were answers to many of the questions in
the SRS. Also the representative for WinMOD has answered our questions
in a good way, but their answer took a long time to arrive and when their
answer arrived the vendor was already chosen.
Two of the vendors, Rockwell and Tarakos, got evaluation versions of their
software available. From Tarakos it was possible to download it free and
from Rockwell to order a CD with the software. A CD was ordered from
Rockwell, but it was never delivered. Several mail were also sent to
Rockwell with questions of their software RSTestStand, but they did not
answer it. Instead the information of their software came from their
homepage and what other people, not from Rockwell, had written about the
software.
29
Tarakos, IEE 11-2004, Fertige Programme für fictive Maschinen (Internet),
2005-05-13
28
From Delmia there was no demo-version available of DA at the time for
the assessment. The reason was that the software was not on the market at
that time; it was released on April 12. From our supervisor at Tetra Pak,
Mr. Istvan Ulvros, there was access to confidential information about DA.
At Delmia’s homepage there were also some press material, both written
and videos, available. Eric Retraint, Vice-President Sales and Channel
Delmia Automation, gave access to more information and answered the
questions of the software’s possibilities.
All of the four candidates can import geometry from Pro/E. Some of them
use VRML or other standard formats, like STEP. If Delmia’s CAD solution
Catia is used, the geometries in DA can be redefined and the original CAD
file will be changed. All of the software can handle control signals from a
PLC, both external and internal PLC. All software can handle the signals
via OPC except WinMOD that uses Profibus. RSTestStand, Delmia
Automation and WinMOD can be connected to an external HMI, while
taraVRcontrol can be used in combination with WinMOD to get this
possibility. The only software that offers real-time simulation, according to
the vendors’ specification, is WinMOD and for the others it depends on the
complexity of the simulation and on the available calculation capacity.
Real-time simulations are very demanding in computing power. It is always
an adjustment how accurate the simulation will be and how much time the
simulation will take.
Conclusion
29
solution can give rise to problems. A communication problem can come up
between the software modules, since they are not tested together by the
vendors, and two new software products must be learnt. If trouble appears
the vendors can refer to each other and no one will take responsibility for
the problem. The taraVRcontrol documentation is not completely in
English, since the help functions are written in German.
The drawback with DA is that this solution is new on the market and has
never been tested in real projects. Another drawback is that DA today does
not offer a setup tool for PLCs from B&R or for the GE Fanuc 90-30
family, which Tetra Pak R&D normally uses.
The results of the market survey are very depending of the manufacturer of
the software. Their answers, if any was received, have influenced the
results in a great way. Also other information and presentation material sent
and their treatment and establish of contacts has influenced the results. The
best evaluation method had been to do a short test run of all the software
before the choice was done.
No one of the software fulfill all requirements, not even all requirements of
highest degree. The entire SRS and the result of how all the vendors
fulfilled it are described in Appendix A.
Delmia
30
MCADCafe, Delmia V5R13 – Detailing and Validating Digital Manufacturing
Process (Internet), 2005-04-11
30
and control manufacturing processes31. Examples of products that Delmia
offers are Quest, Igrip, Human and Automation32. Quest is a 3D digital
factory environment for process flow simulation and analysis, accuracy and
profitability. Igrip is a robot simulation solution for modeling and off-line
programming of multi-device robotic work cells. Human is a solution to
create and simulate workers in the digital manufacturing environment and
to introduce human factors into the product lifecycle earlier. DA is a next-
generation collaborative environment for the automation industry. It allows
a control engineer to describe a PLC program in a logic modelling language
and validate this against a 3D model of the cell, machine or an entire line33.
A closer presentation of Delmia Automation will be done in Chapter 5.3.
Delmia has 600 employees worldwide and sales and marketing teams in 12
countries34.
Dassault Systèmes
Dextus
31
Delmia, Our History (Internet), 2005-04-11
32
Delmia, Automotive (Internet), 2005-04-11
33
Delmia, Automation (Internet), 2005-04-11
34
Dextus, Delmia (Internet), 2005-04-12
35
Dassault Systèmes, Press release (Internet), 2005-04-13
36
Dextus, Dassault Systèmes (Internet), 2005-04-12
31
solutions, and Schneider Electric's vision of automation and digital
factories introducing a breakthrough in productivity”37.
Schneider Electric
37
Dextus, Dextus (Internet), 2005-04-12
38
Scheider Electric, The year in review (Internet), 2005-04-12
39
Schneider Electric, Local operation (Internet), 2005-04-12
32
5 Simulation environment
To perform simulations different kinds of equipment and systems are
required, in this master thesis they can be split into three categories. The
first one includes standards to program a PLC defined in IEC 61131-3. The
second one is software, and in this master thesis Delmia Automation and
Pro/Engineer were used. The last category is physical equipment, where a
part of a filling machine and a PLC were used. There will be a closer
description of these categories in this chapter.
The computer used in this project was equipped with a Pentium III
processor at 850 MHz and 256 MB internal memory. In the end of the
project a more powerful computer was provided. This could run the
simulations faster and with a higher accuracy. This computer was equipped
with a Pentium 4 processor at 1.7 GHz and 1 GB internal memory.
The first PLCs were introduced in the late sixties to reduce the high cost of
the controllers being in use. When the production changed, the controller
needed to be change too. The controllers then consisted of lots of relays.
The relay was expensive to change and they were also mechanical so the
lifetime was limited and they needed maintenance. There were also other
drawbacks with the relay, and when a complex controller was built it was
hard to get an overview of it. Modular Digital Controller (MODICON) was
introduced by Bedford Associates to General Motors in 1968, and it could
solve lots of these problems. The modular system was soon abandoned
because Bedford thought an open architecture was not good40. But still it
was the MODICON that brought the PLC into a commercial market. With
40
R. Morley Inc., The History of PLC (Internet), 2005-05-26
33
this system it was possible to do changes in the program without changing
the hardware.
PLCs of today
Polling is easier to program and cheaper but if the PLC is not sufficiently
fast it can miss some external event. To use interrupt signals is more
difficult to program, and more expensive, but the risk of missing an
external event is much smaller. Therefore polling is used in simpler
systems and interrupts in more complex systems.
41
Internet FAQ Archives, Asynchronous Events: Polling Loops and Interrupts
(Internet), 2005-09-09
42
Olsson, Gustaf – Rosen, Christian (2004); Industrial Automation, Ch. 14
34
when IEC standardized the names of the standards43. The standard consist
of five parts and part three describes the language itself. It is this part that is
used and it is named 61131-3. By implementing this standard into different
environments for development, it is easy to change vendor with minimum
effort.
To a step there are none or more actions connected. A step can either be
active or inactive. In any given moment every active step is executed, and
its actions will be accomplished. If there is no action connected, the step
will act like a wait function.
43
PLCopen, 1131 or 61131: status of the Standard (Internet), 2005-04-14
44
Olsson, Gustaf – Rosen, Christian (2004), Industrial Automation
35
There are several ways to execute the code. The first and simplest way is a
simple sequence, where there is only one way to execute, see Figure 5.1.
36
After a step in an alternative branch there are two or more transitions and a
branch connected to each transition. Here only one of the transitions can be
fulfilled, and the program proceeds into that branch.
Here the entry transition will be fulfilled and all branches below will be
executed simultaneously. Not until all branches are finished the program
will proceed.
Ladder Diagram
Ladder diagram, LD, is the first graphical language in IEC 61131-3. Ladder
diagram was the traditional way to program a PLC. The language has a lot
of similarities with the relay ladder logic that was used formerly to control
industrial systems, but the IEC 61131-3 ladder diagram has been further
developed and can use predefined function blocks45. The great advantage
with ladder is for logical expressions. It is also possible to use it for
sequential programs. A simple sequence in ladder can be seen in
45
EC&M, What to know about PLC ladder diagram programming (Internet),
2005-04-19
37
Figure 5.4, where hold circuits are used for the current step and stop
conditions for the other steps.
46
PLCopen, IEC 61131-3: a standard programming resource (Internet),
2005-04-19
38
Structured Text
Instruction List
39
ld condition1
ani condition(step2)
out step1
ld condition2
and( condition(step1)
or( condition(step2)
ani condition(step3)
)
)
out step2
ld condition3
and( condition(step2)
or( condition(step3)
ani condition(step4)
)
)
out step3
Figure 5.7: A simple sequence in IL.
47
Dassault Systèmes, Delmia V5 Automation: Fact Sheet R15 (Internet),
2005-05-11
40
Device Builder
Device Builder is the module where the functional mechanical objects are
built and configured. Properties configured are i.e. the geometry,
kinematics and behavior. It is possible to import a model from a 3D CAD
system. To use geometry from a CAD-system a neutral file format, i.e.
STEP and VRML, can be used. The model can be turned into actuators and
sensors so it can be controlled by a PLC. The kinematics can be reused
from the CAD-model but it can also be added afterwards. The possibility to
import the kinematics from the CAD-model is today only available if the
CAD-model is done in Dassault’s CAD-software Catia.
41
Figure 5.8: The dialog box to define home positions. The pulled-out
icons from the toolbar show different types of joints.
Sensors
Sensors, a specific class of object in the model, are created in Device
Builder and the sensor’s geometry can be loaded as a CAD-file. The
behavior is defined as a continuous signal, a rising edge or a falling edge.
The difference between them is illustrated in Figure 5.9.
42
Figure 5.9: The behavior of the sensor is of three different modes48.
Figure 5.10: The tools those are available to design the virtual HMI.
After designing the HMI the signals will be set. A proposal of signals is
auto-generated and it is easy to change them, i.e. the type of signal from
48
Delfoi Finland, Delmia Automation (Internet), 2005-07-20
43
Boolean to integer. An overview of the signal management of an HMI is
displayed in Figure 5.11.
Figure 5.11: The internal signal management tool in the HMI module,
where the type of signals and initial value is defined.
LCM Studio
49
Phone conference with Eric Retraint, vice president sales and channels Delmia
Automation, 2005-05-09
44
mechanisms can also be analyzed in the debugger. Today these signals are
set manually, see also case 47 in Appendix D. In the Smart Device Builder
it is possible to create test logic to verify the code together with the virtual
machine. See more about this in the section below.
The PLC programs can be built up in a hierarchical model, and then macros
will be used. A macro is connected to a step and consists of a SFC that will
be executed when the step is active.
There are some differences between IEC 61131-3’s SFC and LCM Studio’s
SFC. The biggest difference is in creation of a simultaneous branch. To
create a simultaneous branch macros will be used and a special type of
transition, join transition. Join transition works in a way so all macro must
be in their last step before the transition can be fired. A screenshot from
LCM studio with macros and join transitions is displayed in Figure 5.12.
45
Smart Device Builder
Smart Device Builder is the module where the behavior for a mechanism is
defined. The behavior is built up by using any languages supported by
LCM Studio. The behavior uses the predefined tasks done by Device
Builder to do the motion for the internal logic.
Figure 5.13: Ports are defined in Smart Device Builder, to use them in
the internal code they must be mapped to a signal.
46
Figure 5.14: A screenshot from Smart Device Builder.
In the Smart Device Builder it is possible to create test logic for a testing
scenario. This is useful to automate the simulation of a device and the
signals, i.e. from an HMI, can be set in the code. The test logic is created in
SFC and the 3D-simulation is connected, but the code is not shown during
the simulation. See also case 37 in Appendix D for limitations in the
function to create test scenarios.
Controlled System Simulator acts like a link between the LCM Studio and
the Smart Device Builder. The simulations are taking place in this module.
It has the opportunity to debug PLC-code and validate the PLC-code
against the virtual machine. It is not necessary to only use the virtual PLC,
but it is also possible to use a real PLC. If a real PLC is used the PLC Setup
module must be used to map the signals.
47
Controlled System Simulator can do collision analysis to detect if parts in
the machine will crash into each other. Some other types of analyses that
can be done are distance analysis and sweep of 3D geometry. Sweep is
done to create a volume from all positions a machine can have during a run
and can be used to determine a working space for a machine.
The module is not only suitable for doing simulations to validate the PLC-
code but is also available to connect an HMI. With a full HMI it will be a
good machine operator-training simulator, see Figure 5.15 for the working
environment during a simulation.
48
PLC Setup
To compile the PLC-code to the PLC native code and transfer it to the real
PLC the module PLC Setup is used. See example in Figure 5.16 to choose
target PLC. The PLC Setup module must be compatible with the PLC
provider/type and today the PLC Setup is only available with PLCs from
Schneider Electric, Omron and Siemens. This module was not used in this
project.
5.4 Pro/Engineer
Pro/Engineer is a software for 3D-Computer Aided Design (CAD), and it
was made by the company Parametric Technology Corporation (PTC). The
company was founded in 1985 and the first version of Pro/E was launched
in 1988. Pro/E consists of several modules for different types of tasks and
the modules exist in different standards dependent of how advanced
possibilities that are needed. There are modules to buy to make NC-code to
manufacture the parts that have been designed, and also modules to analyze
the parts with the Finite Element Method. These modules enable to get the
full CAD/CAM/CAE function. CAM is an abbreviation for Computer
Aided Manufacturing and CAE is an abbreviation for Computer Aided
Engineering. Today PTC also offers a solution for Product Lifecycle
Management (PLM).
With Pro/E new parts and machines can be designed and developed. Each
part will be designed separately and then put together in an assembly. Then
49
the kinematics can be added to the model to make the model moving, in
3D. The results can also be saved as a movie or rendered pictures. The
properties and dimensions of a part can easily be changed and
automatically updated in all other modules in Pro/E that use this part, i.e.
assemblies and drawings. This is because Pro/E is fully associative. Several
different analyses can be done in Pro/E, for example if the parts intersect
when they move and the forces in different cases of load. A great
disadvantage is that the associative property is only valid in PTC’s
products. If the model is used in software from another manufacturer it is
necessary to go back to Pro/E in order to change some dimensions and then
manually import or update the model again in the software. 50, 51
The idea of this machine is that the package is positioned upside down in a
holder and this holder moves along a slider. When the package is in the
proper position a pipe will be moved down into the package and heat the
inside of the package using hot air. The pipe will then go up and the
package will move out. The model is completed with sensors that indicate
when the package is in position for the pipe to go down.
The CAD model replicates the real object to highest possible extent, which
is a necessary requirement if the result of the simulation will be applied to
50
PTC, The Product Development Company (Internet), 2005-05-04
51
PTC, Pro/Engineer Wildfire (Internet), 2005-05-04
50
the real machine. The idea to simulate the machine in Delmia Automation
is that the verified PLC-code can be used in the real PLC. Furthermore
virtual sensors can be used in the simulations to do an even more realistic
simulation.
1. Heater
2. Sensor (not visible)
3. Package
1 4. Package holder
5. Slider
51
52
6 The simulation project
In this chapter the simulation project is described in detail. How the
different parts of the virtual machine were created is described and also
how they are connected to each other to a complete model. The complete
virtual machine consists of three parts, a mechanical model, an HMI and a
virtual PLC.
In Device Builder a sensor was added to the model. The sensor will detect
if there is a package or not in the package holder. If there is not a package
present the heater will not go down and the package holder will return to its
initial position. The finished model of the machine is depicted in Figure
6.1.
The next step was to create the internal behavior of the model. The internal
behavior is how the model will react to different signals that are sent to it.
Example of signals can be MovePackage=true or EmergencyStop=true. It is
in the internal behavior the mechanisms are activated, thru TaskLists. This
was described in Section 5.3. The internal behavior of the sensor must also
53
be defined. In this project a continuous signal was requested and the sensor
was defined in that way. The internal behavior of the machine and the
sensor was defined in SFC in the LCM Studio. The signals that the internal
logic receives and sends was created and they are listed in Appendix B.
The internal logic is in the normal behavior able to receive signals from the
control logic and dependent of the signals, the machine will react on it. The
logic will react on the signal MovePackage and MoveHeater. Depending on
if they are true or false the package and heater will go in or out and up or
down. When a movement is finished the internal logic will set a signal to
tell the PLC. If the signal EmergencyStop is set, all movements are aborted
immediately and the machine cannot be operated until the emergency
signal is released. The complete code of the virtual machines’ internal logic
is in Appendix C.
1 1. Heater
2. Sensor
3. Package
4. Package holder
5. Slider
3
2
54
6.2 Creation of the HMI
A virtual HMI was created to operate the virtual machine. The HMI was
done in two modules, HMI Control Panel Design and Smart Device
Builder. At first the design was made. The machine has to be controlled in
three different modes so the HMI was designed to handle these three
modes. They are Continuous mode, Cycle mode and Step by step mode. To
indicate the buttons that belong to the different modes, a darker background
was made to group the buttons. Two lights were created to give feedback to
the operator, one indicating if the machine is busy and the other indicating
if the package is in position for heating. Finally an emergency stop was
placed at the panel. This due to the security, it will stop the machine
immediately. This is different from the stop button at the continuous mode,
which will let the whole cycle run before the machine is stopped. The
design of the HMI is in Figure 6.2.
Figure 6.2: The virtual HMI to operate the virtual machine. Note that the light
Busy and the button for Continuous mode are activated.
The HMI has an internal logic and this was created in the Smart Device
Builder. The internal logic of the HMI controls which of the buttons that
will be lighted and set the actual mode. If the emergency button is
55
activated, all the lights will be switched off. The complete code of the
HMI’s internal logic is in Appendix C. Some signals are only used
internally in the HMI. They are used to light the mode buttons to indicate in
which mode the machine is operating. The signals that the HMI uses and
can be used by other modules are listed in Appendix B.
The last layer is the main layer, which controls the machine in normal
operation. The main macro has three alternative branches, one for each
mode, see Figure 6.3. Most parts of the behavior for the Continuous and
Cycle modes are similar and therefore parts of the code are reused for both
modes. When one of these modes is selected the PLC will wait for the
signal Start or Cycle, depending of selected mode, see Appendix B for the
complete list of signals. After the signal is emitted the cycle starts,
beginning with moving the package holder, see part 4 in Figure 6.1, to a
position under the heater, see part 1 in Figure 6.1. Then the sensor, see part
2 in Figure 6.1, will detect if there is a package, see part 3 in Figure 6.1, in
the package holder. If a package is detected the heater starts moving down
and at the same time starts heating. When it has reached the lower position
it will move back to its upper position immediately and in the upper
position the heating stops. After this the package holder will move back to
its original position and a cycle is finished. Here is one difference between
the two modes. In the Cycle mode it returns to the beginning of the cycle
and waits for the signal Cycle to be emitted. In Continuous mode a new
cycle will start immediately, and after the Stop signal is emitted the current
56
cycle will be completed. The program returns to start and waits for the Start
signal.
Figure 6.3: The start sequence for the main layer in the virtual PLC.
57
Then the control logic will be added to the model, the virtual PLC. After
this the internal logic and the control logic will be connected to each other.
This is displayed in Figure 6.4. The ports in the control block are the ports
of the PLC and the ports in the simulation block are all the ports of the
different products in the model, in this project the mechanical model and
the HMI. Giving the ports in the products and the PLC good names will
make it easier to connect correct signals to each other.
During the simulation the step size of the simulation is set, it can be set
manually or the simulation can be in real-time. In real time mode the step
58
size will be configured automatically so the calculations for the simulation
are caught. Often the graphical update will slow down a simulation. To
speed up the simulation the graphical update can be set to not update the
graphic each simulation cycle. See example in Figure 6.5.
Figure 6.5: Visualization Options for a simulation. In this example, with the step
size set to 0.3 seconds, is the graphic updated every second step.
59
1 2
3 4
5 1. Start position
2. Package in position
3. Heater down
4. Heater up
5. End position
60
6.6 Reflections of the simulation project
Delmia Automation is a new software on the market, and during the
creation of the virtual machine many more or less serious bugs and
problems have appeared. There are also some usable functions that are not
yet implemented. During the project a log has been created with our
problems and observations, and also the answer from the support at Delmia
Automation. This log is in Appendix D.
In the start of the project the system requirements were not distinctly
defined. This gave the results that the computers used during the project
were not so powerful. In the end of the project a specified system
requirements list were available and then a more powerful computer was
provided. This lead to a greatly improved performance and some strange
errors in the software did not appear, i.e. graphical disturbances and
exception errors.
The delay in the beginning of the project, when waiting for software from
the selected manufacturer, caused a delay in the project that lead to that all
steps in creating a simulation were not evaluated. The steps not evaluated
were controlling a virtual machine with a real PLC and controlling a real
machine with a real PLC, with the same code used in simulations with
virtual machine and virtual PLC. Another contributory factor to that all
steps were not evaluated was the lack of documentation of the software and
all problems with the current version of the software. See more details in
the log in Appendix D.
61
62
7 Conclusions
In this section the conclusions from the master thesis are presented. First is
a summary of the results and then is a recommendation to pass on, based on
our experience. Finally some proposals for future work are presented.
52
University of Trollhättan/Uddevalla (Internet), 2005-09-09
53
Stiftelsen för Kunskap och Kompetensutveckling (Internet), 2005-09-09
54
Meeting with Henrik Carlsson, Fredrik Danielsson, Bo Svensson from HTU,
2005-09-28
63
7.1 Summary of results
A virtual machine has been controlled by a virtual PLC. A conclusion is
that it is possible to control a virtual machine with PLC code. It will react
as the real machine would have done with the code written in the
simulation program.
In the market survey several different software products are included but
many of them are focusing on one part in a simulation. Delmia Automation
was the software that offered the most from the different parts to simulate
and control a virtual machine. Including CAD-import, use of PLC-language
defined in IEC 61131-3 and export of the finished, verified, code. Many of
the other software products use their own developed programming
language, have poor support for import of CAD-files or were directed for a
specified type of industry. Delmia Automation was, at the moment for the
market survey, the most all-round software that fulfilled the most of the
requirements of the software included in the survey.
Even after the vendor was selected and more information from the vendors
was received and more understanding of principles for simulation was
experienced, the choice of Delmia Automation as the best alternative for
further evaluation was correct.
During the project to create the virtual machine many problems, bugs and
limitations in the software DA were discovered. To handle these a log was
created, Appendix D. This log was sent to the manufacturer of the software
several times during the project to inform them of the project. Delmia have
taken the comments into consideration and have reacted to them. Their
answers and comments were also recorded in the log.
Hiding and showing parts in a simulation is not possible to control from the
code. This feature is very useful to visualize a simulation, and also in
debugging of the code and logic. There is no support for changing color of
64
parts of a machine from the code. This can be used in the same way of
hiding/showing parts.
There are no included help-files in the DA. This has lead to many contacts
with the support team at the manufacturer, and much time has been spent
on this instead of creating and developing the virtual model.
The step-size of the virtual PLC can be set automatically to get a simulation
in real-time. It can also be set manually to get a more or less detailed
65
simulation. A great disadvantage with great step-size is if sensors are used
in the model. They can be hard to check and debug if a part passes a sensor
position during a step in the PLC, due to the sensor will not set a signal.
Delmia and Dassault Systèmes are large companies with great resources.
They can invest much money to the software and have a low risk to be
liquidated. Therefore it is most probably that this program will not
disappear from the market in the near future, instead there will be
continued development of it.
7.2 Recommendations
As a result of this master thesis there are some recommendations for Tetra
Pak. This project is a part of a pre-study if it is interesting for Tetra Pak to
implement a simulation-tool to the development process and how to
proceed further in the subject.
Recommendations in brief
66
Comments
There are some major requirements that Delmia Automation today not
fulfilled and for that reason it can be hard to entirely implement it in Tetra
Pak’s development process at this stage. One of the most important
requirements was to have the availability to import CAD-geometry from
Pro/E and update the geometry in an easy way. Today it is possible to
import the CAD-geometry, but still it needs lots of work to make the
geometry usable in DA. There is no easy way to update the geometry
without the need to redefine the kinematics. There is one possibility to have
a good CAD import and it is to use Dassault’s own CAD-system Catia, but
Tetra Pak uses Pro/Engineer and has no plan to change and therefore this is
not an option.
Tetra Pak uses many different ways to control a motion, for one example
see Figure 7.1. In the current release of DA it is only possible to control a
motion by moving between predefined positions and changing the time it
takes. This is not sufficiently good to fulfill Tetra Pak’s requirements of
controlling a motion.
55
Documentation to the mc_lib for B&Rs programming tool for their PLCs.
67
at Tetra Pak is from GE-Fanuc, and today there are no supports for these
systems in DA.
There have been software products with great potential that have not been
investigated. WinMOD and MSC.visualNastran 4D should be explored
further. It is also interesting to check if PTC is introducing some simulation
software for PLC-code, and in that case integrate them in Pro/E. When
Delmia has corrected problems discovered during this project and added
demanded features it is recommended to make a new evaluation of DA.
The SRS is for a basic simulation tool or a little more complex tool. For
further works it is recommended to develop the SRS. A couple of new
requirements that can be added, based on the experience from this project,
are listed below.
• Better CAD-support where it is possible to update the geometry
from Tetra Pak’s CAD-system.
• Support for Tetra Pak’s PLC-systems.
• More developed and advanced control of motion, where it is
possible to control velocity, acceleration and use motion profile.
68
References
Text books
Björklund, Maria – Paulsson, Ulf; (2003); Seminarieboken, Chapter 4,
Studentlitteratur, Lund
Theses
Danielsson, Fredrik (2002); Off-line programming, verification and
optimisation of industrial control systems, page 93, Doctoral Dissertation,
Högskolan Trollhättan/Uddevalla, Trollhättan
69
Internet
CIMdata, The Benefits of Digital Manufacturing;
http://www.delmia.com/gallery/pdf/CIMdata_ROI_Study.pdf, 2005-05-13
Delmia, Automation;
http://www.delmia.com/solutions/html/automation.htm, 2005-04-11
Delmia, Automotive;
http://www.delmia.com/solutions/html/automotive.htm, 2005-04-11
Dextus, Delmia;
http://www.dextus.net/fo/pages/php/delmia/delmia.php, 2005-04-12
Dextus, Dextus;
http://www.dextus.net/fo/pages/php/dextus/dextus.php, 2005-04-12
70
Internet FAQ Archives, Asynchronous Events: Polling Loops and
Interrupts;
http://www.faqs.org/docs/javap/c1/s2.html, 2005-09-09
71
Schneider Electric, The year in review (2003);
http://wib-prod.schneider-
electric.com/publicprogram/corp/corp_elibrary.nsf/0/84280984FE88F4648
5256EC500552CA2/$file/Essentiel_2004_en.pdf, 2005-04-12
University of Trollhättan/Uddevalla
http://www.htu.se, 2005-09-09
72
WinMOD, Virtual machine for mechanical engineering;
http://www.winmod.de/eng/reports/winmod_report_04.18_en.pdf,
2005-05-30
Other
Documentation to the mc_lib for B&Rs programming tool for their PLCs.
Phone conference with Eric Retraint, vice president sales and channels
Delmia Automation, 2005-05-09
73
74
Appendix A
Software requirements specification
Program: DA=Delmia Automation
RST=RSTestStand + RSLogix
WM=WinMod
TC=taraVRcontrol
Requirements: R=Required
O=Optional
D=Desired
Table A.1: The requirements used for assessment of the four software
products in the second part of the assessment.
Requirement DA RST WM TC
• The software can import geometry, in X X X X R
Pro/E or neutral format like VRML
o The software can import - X O
kinematics from Pro/E
o Can make changes of dimensions P* P* O
of the geometry
• The software can handle control X X X X R
signals from PLC
o Use OPC for communication X X - X O
o Can handle external control signals X X X X O
Use OPC for external control X X - X D
signals
Use Profibus for external control X D
signals
Emulated PLC in the software X X X D
Import existing PLC-code X - D
Export of PLC-code to existing X X - D
environment
Make changes in the PLC-code X X - D
Connect to external HMI X X X D
75
Requirement DA RST WM TC
• Visual display of the model during X X X X R
the simulation
• Automatic synchronization of X X R
emulated real-time between the PLC
and the virtual machine
• A review of the simulation should be - - R
in real-time
The simulation should be in real- X X D
time
• Internal logics can be defined X X R
o Standard libraries for internal X X O
logics can be defined
o Internal logics are defined in IEC X - O
61131-3 or in C
Possibility to resize standard X D
libraries
• The software and documentation are X X X R
available in an English version
• The software will run on a PC with X X X X R
MS Windows
o The PLC-code support X X - O
IEC 61131-3
o Collision analyze X X X O
Set sensors for collision analyze X X X D
only at critical places
o Plot of time-space results for one - X O
signal
Plot of time-space results for - X D
many signals
o Plot of time-sequence results for - X O
one signal
Plot of time-sequence results for - X D
many signals
o Easy handle of sensors, i.e. X X X O
graphical configuration
76
Table A.2: Summary of how many requirements in the software requirements
specification the four different software fulfill.
Summary:
Software ΣR ΣO ΣD Σ total
(max 8) (max 11) (max 12) (max 31)
Delmia Automation 7 7 7 21
RSTestStand + RSLogix 5 3 6 14
WinMod 7 7 8 22
TaraVRcontrol 4 4 2 10
Some of the vendors say their product will fulfill some of the requirements
in the future. In this case it has been marked as the requirement not is
fulfilled in the table because they do not have the function today.
77
78
Appendix B
List of signals
Here follows a list of signals that are used as interface between the
equipment and the virtual PLC.
Three types of signals have been used, Boolean can only take the value of
true or false, integer can be any integer between –2147483648 to
2147483647, pure is a signal that gives a pulse when it is emitted.
Machine
Input
Name Type Value Comment
false Move package to origin
MovePackage Boolean true Move package to position for
heating
false Move heater to origin
MoveHeater Boolean
true Move heater to position for heating
EmergencyStop Boolean true No operation is possible at all
Heating Boolean true Set the heater to “On”
Homing Pure Starting the homing of the machine
Output
Name Type Value Comment
PackageEnd Pure Acknowledge signal for movement
of the package is finished
HeaterEnd Pure Acknowledge signal for movement
of the heater is finished
Sensor
Output
Name Type Value Comment
SensorDetection Boolean true A package is in position for
heating
79
HMI
Input
Name Type Value Comment
Busy Boolean true Light the “Busy”-light
InPosition Boolean true Light the “Package in position”-
light
Output
Name Type Value Comment
Start Pure Signal for start continuous
operation
false Continuous operation is possible
Stop Boolean true Continuous operation is not
possible
Signal for start operation of one
Cycle Pure
cycle
Signal for move one step forward
NextStep Pure
in the program
1 Set mode into “Continuous”
Mode Integer 2 Set mode into ”Cycle”
3 Set mode into ”Step by step”
EmergencyStop Boolean true No operation is possible at all
80
Appendix C
Code for the virtual machine
In this section the internal logic of the mechanical model and the HMI are
displayed, and also the control logic of the virtual PLC. The internal logic
is the behavior of the different parts and the control logic describes how the
virtual PLC will react on different input signals and what it outputs.
To clarify where in the structure the different code is, a figure of the code
structure is placed above every block of code.
Root
This is the root of the internal logic for the mechanical model, an overview
is showed in Figure C.1 and the code in Figure C.2. This will start up the
other activities.
ROOT
MainAndEmergencyStop
Main Homing
MovePackage MoveHeater
81
Macro: MainAndEmergencyStop
The MainAndEmergencyStop macro is the next layer under Root, see
Figure C.3, and takes care of the signals EmergencyStop and Homing, see
Figure C.4. If the EmergencyStop becomes true it will stop any active
movement of the machine. The macro Homing will be activated when the
signal Homing is emitted.
ROOT
MainAndEmergencyStop
Main Homing
MovePackage MoveHeater
82
Macro: Homing
At layer three the Homing will be found, see Figure C.5. Because of some
limits in the possibilities to control a movement a real homing could not be
done. Therefore a simulated homing has been written, see Figure C.6, to
imitate the real process.
ROOT
MainAndEmergencyStop
Main Homing
MovePackage MoveHeater
83
Macro: Main
The Main macro will start one of the macros MovePackage or MoveHeater
depending of which of the signals are emitted, see Figure C.8. See Figure
C.7 for the overview of the layers.
ROOT
MainAndEmergencyStop
Main Homing
MovePackage MoveHeater
Macro: MovePackage
The MovePackage macro is at the lowest layer, see Figure C.9. This macro
will move the package holder to its origin or to a position under the heater,
see Figure C.10.
ROOT
MainAndEmergencyStop
Main Homing
MovePackage MoveHeater
84
Figure C.10: The code for the MovePackage macro.
Macro: MoveHeater
The macro MoveHeater is at the same layer as MovePackage, see Figure
C.11. This macro will move the heater to the origin position or move it to
the lower position, see Figure C.12.
ROOT
MainAndEmergencyStop
Main Homing
MovePackage MoveHeater
85
Figure C.12: The code for the MoveHeater macro.
Root
The root will start up the main program and TestriggsHMI_TestPanel, see
Figure C.14. The TestriggsHMI_TestPanel is an auto-generated program
done by DA during the creation of the HMI. For example the program
emits signals when a button is pushed.
ROOT
Main TestriggsHMI_TestPanel
Mode Emergency
86
Figure C.14: The code for the root for the HMI.
Macro: Main
The Main macro is at the layer below the root, see Figure C.15. This macro
will activate the Mode macro immediately. If the emergency stop button is
pushed the Emergency macro will be activated, see Figure C.16.
ROOT
Main TestriggsHMI_TestPanel
Mode Emergency
Macro: Mode
The Mode macro is at the lowest layer, see Figure C.17. There was no
possibility to have buttons that affect each other, therefore it was needed to
write this function. The mode macro lights and switches off the buttons
depending on which mode is activated. A signal is also set depending on
which mode is activated. This signal is an integer that is used by the PLC,
see Figure C.18 for the code.
87
ROOT
Main TestriggsHMI_TestPanel
Mode Emergency
Figure C.18: The code for the macro Mode in the HMI.
Macro: Emergency
The Emergency is in the same layer as the Mode macro, see Figure C.19.
The Emergency macro will switch off all lights when the emergency stop
button is pushed, see Figure C.20.
ROOT
Main TestriggsHMI_TestPanel
Mode Emergency
88
Control logic of the virtual PLC
The internal logic of the virtual PLC is divided in one root block and three
macros, at two levels, see Figure C.21.
Root
The root is the basis for the control logic. It starts with emitting the homing
for the machine. When the homing is finished it will activate the macro
MainAndReset. This macro will be running until the PLC receives an
emergency stop signal, and then stops the machine and switches off the
lights at the HMI, see Figure C.22.
ROOT
MainAndReset
Main Reset
89
Figure C.22: The code for the root for the PLC.
Macro: MainAndReset
The MainAndReset layer has two macros below, see Figure C.23. The first
macro is the Main macro that will be activated until the mode is changed
and then activate the Reset macro. When the Reset macro is done the Main
macro will be reactivated, see Figure C.24.
ROOT
MainAndReset
Main Reset
90
Figure C.24: The code for the macro MainAndReset.
Macro: Main
This macro is where all control logic is placed. In Figure C.25 an overview
of the code structure can be seen. The Main macro has three alternative
branches, one for each mode, see Figure C.26. In each branch all steps will
be executed so a complete cycle is done and then start over again.
ROOT
MainAndReset
Main Reset
91
Figure C.26: The code for the Main macro.
Macro: Reset
The reset macro will be run each time the mode is changed and is at the
lowest layer in the PLC, see Figure C.27. It first stops the machine and then
moves the heater back to the upper position and then moves the package
92
holder back to its origin, see Figure C.28. By moving the heater and the
package holder in this order there will be no chance to harm the package.
ROOT
MainAndReset
Main Reset
Figure C.28: The code for the Reset macro in the PLC.
93
94
Appendix D
Delmia Automation comments from Tetra Pak
Case# Date of Sent to Received Problem Description By Customer Module Corr. Reason / Correction Planned Version
discover Delmia answer solved Planned
1 2005-06-01 2005-06-01 2005-06-01 No There are no documentation included and no All We did not include the documentation in V5R15
help-files available in the software. our Standard Dassault Systèmes format in
R15.
2 2005-06-07 2005-06-09 2005-06-09 Yes Tools to create sensors are not visible. DB Incorrect installation, you must enter two V5R15SP1
environment variables manually.
DLM_ENABLE_SENSORS value:1 and
DLM_WSU_PRODUCT value:1 (enable
display of sensor tools and creating robot
tasks)
3.1 2005-06-07 2005-06-09 2005-06-10 Yes, Problems with importing STEP-files. All Problems with importing STEP-files is due V5R15SP1
2005-07-11 to our license and that the MULTICAx is
needed. See also case #40.
3.2 2005-06-07 2005-06-09 2005-06-10 No Problems with importing VRML-files. All Problems with importing VRML-files is a V5R15SP1
95
7 2005-06-21 2005-09-19 2005-09-22 No There are no PLCs in the list to download the CSS A 'PLC setup' program has to be installed V5R15SP1
logic to a real PLC. on your PC and the path of this program
has to be added to the installation path of
Delmia automation.
For the R15 version, the list of the 'PLC
setup' is the following one:
- OMRON
- SIEMENS
- SCHNEIDER
The ‘PLC setup’ translates the LCM
application to an application compatible
with a specific PLC. Schneider and Omron
developp their PLC setup. We developp
the Siemens PLC setup. So, the
installation depends of the PLC you use.
8 2005-06-23 2005-09-19 2005-09-22 Partly Pictures in HMI, both background and Create HMI In the menu "Tool" -> "Options", directory V5R15SP1
96
12 2005-06-29 2005-09-19 2005-09-22 No In Time Table Editor for Mechanisms, DB I have forwarded this as bug to the V5R15SP1
decimal must be entered as a dot but is development team. Unfortunately, I have
showed as a comma. If you only change the no workaround to propose to you. The
integer part you get an error message. objective date for the correction of the bug
is the next release, so there is no solution
available before few months.
13 2005-06-29 2005-09-19 2005-09-22 No Mechanisms are dependent of in which order DB I have forwarded this as bug to the V5R15SP1
you click on Angle driven and Length driven. development team. Unfortunately, I have
We use cylindrical joint and if we change no workaround to propose to you. The
order to click on angle and length driven the objective date for the correction of the bug
joint began to rotate instead of translate. is the next release, so there is no solution
available before few months.
14 2005-06-29 2005-06-29 2005-06-29 Partly Motions with mechanisms do not follow the DB Time for a mechanism to move is defined V5R15SP1
times defined in the Time Table Editor. in Tasklists -> MoveHomeActivity, RMB ->
Properties, Specified Cycle Time.
97
15 2005-06-29 2005-07-04 2005-09-22 No When trying to check which home-position DB There is no definition for an activity, this is V5R15SP1
that is in a MoveHomeActivity in a TaskList, why you have an error message. Once a
via Definition, we get the message "This task is created, you are not able to find
action is not supported". which home position was initially
selected.The recommendation is to create
the task with the name of the home
position.
Case# Date of Sent to Received Problem Description By Customer Module Corr. Reason / Correction Planned Version
discover Delmia answer solved Planned
16 2005-05-09 2005-05-09, Partly Asked Eric Retraint at Delmia about All Received some User's Guide and Training V5R15
see documentation for DA. Also asked Lise Manuals. We also get some Powerpoint
comments for Upjohn at Delmia Automation Support for presentations.
more dates. documentation continuously. 25/5 Sensor function (DELMIA Automation
- Sensor1.ppt)
1/6 LCM Editor User's Guide
1/6 Smart Device Builder User's Guide
1/6 Controlled System Simulator User's
Guide
16/6 Controlled System Simulator Training
Manual (Complete_Simulation.ppt)
16/6 LCM Editor Training Manual
(LCM.ppt)
17/6 Smart Device Builder Training
Manual (Smart_Device.ppt)
23/6 Device Builder User's Guide
23/6 Robot Task Definition User's Guide
13/7 Resource Sensor (Sensors.ppt)
17 2005-06-08 2005-06-09 2005-06-13 Yes Problems to create mechanisms with DB First create Frames of Interest and then V5R15SP1
imported CAD-files from Pro/E. use Joint from Axis to create mechanisms.
98
18 2005-06-29 2005-06-29 2005-06-28 No Debugging HMI with No Fixed buttons and SDB, Forwarded to the development team at V5R15SP1
using Next Cycle is not possible. LCM Delmia by Lise Upjohn.
19 2005-06-29 2005-06-29 2005-06-29 Yes Parallel branches cannot be made in SFC. SDB, Use many actions in a block, i.e. macros. V5R15SP1
LCM According to Delmia this is a quite flexible
solution. With Join at the transition it will
wait until all actions at the previous step
are finished
20 2005-06-30 2005-09-19 2005-09-22 No Simulation with sensors only works first time. SDB To be The "Jump to start" command resets the V5R15SP1
After Pause and Jump to Start the sensor corrected in graphic and resets the SFC cod (that
signal is true even if the object not is on R17 means the code goes back to the first
position. step) but the port and signal values are not
reset, they keep their last value. I agree
with you , this behavior is not very
coherent. In the next release, it is planned
to reset all the ports and signals values.
The "Jump to start" will be in fact a
complete reset.
21 2005-06-30 When changing times in a MoveHomeActivity SDB, V5R15SP1
and then run the simulation, the simulation CSS
will stop after a while and will not continue.
Case# Date of Sent to Received Problem Description By Customer Module Corr. Reason / Correction Planned Version
discover Delmia answer solved Planned
After escape from the simulation and then go
in to the simulation again and run it, it will
work.
22 2005-07-01 In Device Task, Task Operations, it's not DB V5R15SP1
possible to redefine or delete operation.
23 2005-07-04 In an HMI, when grouping two groups of HMI V5R15SP1
object they move and is placed over each
other.
24 2005-07-04 You can only move a label in an HMI when HMI V5R15SP1
you are over a sign, you can not mark the
label only over the background of the label.
25 2005-07-04 2005-07-04 2005-07-04 Partly You can only have one delay on a DB, SDB The delay for a mechanism is only V5R15SP1
mechanism in a tasklist. If there is a delay on considered the first time a tasklist is
the second mechanism it will not be running, and the delay starts from the
considered. Deleting the delay in the first beginning of the tasklist and not from when
mechanism lead to the delay in the second the mechanisms move-activity starts. Add
mechanism will be considered. a Delay in the tasklist instead of specify it
in the mechanisms properties.
26 2005-07-04 2005-07-04 2005-07-04 No It's not possible to control the time of a LCM This functionality is not available for the V5R15SP1
motion for a mechanism in the SFC-code. present moment and is not planned for the
99
35 2005-07-06 2005-07-06 2005-07-07 No Deleting a sensor will demand a restart of the DB To be There is a bug in in the refresh of the V5R15SP1
DA to let the sensor disappear at the model. corrected in screen after deleting a sensor, confirmed
R16. by Lise Upjohn 2005-07-07. The sensor is
however deleted, its not displayed in the
specification tree.
36 2005-07-06 2005-07-06 2005-07-07 No In the SFC-code it's not possible to switch SDB, This functionality is not available and is not V5R15SP1
between hiding and showing a part in the LCM forecasted for the next release.
model.
37 2005-07-06 2005-06-06 2005-07-07 No You can only create one testscenario. SDB There is only one Testing Scenario by V5R15SP1
Internal Logic level. A workaround is to got
two steps with a False transition between
and then create several macros with
different testscenarios. Drag the
testscenario you will test to the initial step
to be executed.
38 2005-07-08 2005-07-12 2005-07-13 No The autogenerated Program1 in a sensor SDB The user has to rewrite it, the default V5R15SP1
resource must be completed to work behavior is not very useful.
properly. Between the step
SensorLogicStep0 and the transition
'SensorLoopTrans' an action with the
condition Sensor.Initiate=false and a step
Case# Date of Sent to Received Problem Description By Customer Module Corr. Reason / Correction Planned Version
discover Delmia answer solved Planned
with the same action as to SensorLogicStep0
is inserted.
39 2005-07-08 2005-07-15 2005-08-01 No After mapping signals, at an expanded port, CSS, When you map signals of structured ports, V5R15SP1
between ports in CSS and shrink the port the SDB, all the signals are mapped element by
mapping disappear. Expansion of the port LCM element. If then you use shrink ports, this
again will not map the signals, it must be means that you break the mapping
redone. element by element. The mapping has to
be done at the top of the structure.
40 2005-07-11 2005-07-12 2005-07-12 Yes Still problem with importing STEP-files All New licenses New licenses were sent. Then it will work. V5R15SP2
though MultiCax and a license is installed. sent.
41 2005-07-12 2005-07-15 A port with the name EmergencyStop is LCM See case #42. V5R15SP2
mapped to a signal EmergencyStop.
Connection between them and a virtual PLC
will not work, but if the port's name is
changed to Estop it will work.
42 2005-07-13 2005-07-15 Two ports, under two different levels, cannot SDB, V5R15SP2
have the same name. No error message will LCM
101