Download Archimedes Archimedes ESS 0.8 User's Guide

Transcript
Archimedes
A System Platform for Distributed Control and Automation
Archimedes ESS 0.8 User’s Guide
Version 0.8
Release 27-01-2005
January 2005
Software Engineering Group
Electrical & Computer Engineering
University of Patras, Greece
Copyright © 2005 Software Engineering Group
All rights reserved
http://seg.ee.upatras.gr/Archimedes
http://seg.ee.upatras.gr/MIM
Archimedes System Platform
Archimedes
A System Platform for Distributed Control and Automation
Archimedes is based on the Model Integrated Mechatronics
(MIM) paradigm.
Archimedes ESS 0.8 User’s Guide
Version 0.8
Release 27-01-2005
January 2005
Software Engineering Group
Electrical & Computer Engineering
University of Patras, Greece
Copyright © 2004, 2005 Software Engineering Group http://seg.ee.upatras.gr/
All rights reserved
http://seg.ee.upatras.gr/Archimedes
http://seg.ee.upatras.gr/MIM
Archimedes ESS 0.8 User’s Guide
2
Archimedes System Platform
Contents
Introduction
Archimedes ESS
The Teabag Boxing Case Study
Using Archimedes ESS
Open a project
Navigate through the project components
Create a project
Import a FB Type
Create a FB Type
Create an Execution Control Chart (ECC)
Create a FBNetwork
Using the interpreters
Create the project’s implementation model
Executing the implementation model
Archimedes ESS 0.8 User’s Guide
3
Archimedes System Platform
Introduction
Archimedes is a System Platform specifically created for the development of
Distributed Control and Automation systems.
It is a first step for the implementation of a System Platform that should exploit the
MIM paradigm (Model Integrated Mechatronics) towards the development of a new
generation Manufacturing systems [1].
Its is composed of :
• A methodology,
• A framework,
• A run-time environment, and
• An Engineering Support System.
Archimedes ESS
The Archimedes ESS (Engineering Support System) is a Toolkit that supports the
construction of IEC1 61499-compliant Function Block based design models for
distributed control and automation and their subsequent transformation to executable
systems.
Archimedes ESS is constructed using the Generic Modeling Environment (GME), a
configurable toolkit for creating domain-specific modeling and program synthesis
environments.
Archimedes in its current form appears as a modeling paradigm in GME that defines
the control and automation family of FB-based models that can be created using the
resultant modelling environment, i.e., the Archimedes ESS.
The Archimedes ESS User’s Guide contains a brief description of the Toolkit.
The Teabag Boxing case study
The Teabag Boxing System is a simplified version of a real system used in the
production chain of packed teabags.
A distributed control application for the TBS has been developed as example
application and is used in the context of this document. For more information on the
Teabag Boxing system please refer to the ArchimedesTeabagBoxingExample
document.
1
The International Electrotechnical Commission (IEC) is the leading global organization that prepares
and publishes international standards for all electrical, electronic and related technologies.
Archimedes ESS 0.8 User’s Guide
4
Archimedes System Platform
Using Archimedes ESS
Archimedes ESS can be used in two different ways:
A) In co-operation with CORFU ESS
CORFU ESS is used to capture the control application requirements using UML, as
described in [2]. The UML-based analysis model of the application is automatically
translated by specific CORFU model-to-model transformers to FB-based design
diagrams that consist of FBTypes and FBNetworks.
The so created FB-based design diagrams are imported in Archimedes ESS (the
FBNetworkImport Interpreter is not ready for this version). The design diagram is
refined and the resulting models are automatically transformed by specific interpreters
to implementation models.
B) As stand-alone IEC-compliant Engineering Support System
In this scenario the engineer has to start the development from FB-based diagrams as
is defined in IEC61499.
The basic features of the Archimedes ESS are presented in this section using the
Teabag Boxing control application example.
Basic Terms of GME
In this section the basic GME features and components associated with the GME main
editing window are presented. A detailed description of this features can be found in
the GME Manual and User Guide that is been distributed with the GME toolkit. The
following figure taken from page 13 of this manual presents the main components of
the main editing window. Special attention should be given to the names of the
components since these names are used in this section to present the basic features of
Archimedes.
Archimedes ESS 0.8 User’s Guide
5
Archimedes System Platform
The GME main editing window has the following components, as described in the
GME Manual and User Guide:
•
Titlebar: Indicates the currently loaded project.
•
Menubar: Commands for certain operations on the model.
•
Toolbar: Icon button shortcuts for several editing functions. Placing the
mouse cursor over a toolbar button briefly displays the name/action of the
button.
•
Modebar: Buttons for selecting and editing modes.
•
Editing area: The main model editing area containing the model editing
windows.
•
Partbrowser: Shows the parts that can be inserted in the current aspect of the
current model.
•
Statusbar: The line at the bottom, which shows status and error messages,
current edit mode (e.g. EDIT, CONNECT, etc.), zoom factor, paradigm name
(e.g. SF), and current time.
•
Attribute Browser: Shows the attributes and preferences of an object.
•
Model Browser: Shows either the aggregation hierarchy of the project, the
type inheritance hierarchy of a model, or a quick overview of the current
modeling paradigm.
Open a project
To open the Teabag Boxing project select from the MenuBar
File -> Open Project
On the “Open” window check the “open project file” and proceed with “Next”.
In the MSwindow “open” window select the Examples\Teabag folder and then the
TeabagSystem, and proceed with “open”.
The following screen will appear in your desktop.
You can click on the + sign in front of the “TeabagSystem” in the Model Browser to
see the folders of the Teabag Boxing project.
Archimedes ESS 0.8 User’s Guide
6
Archimedes System Platform
You can open the FBTypeRep folder to see the Function Block types that has been
created for the TBS. You may double click on any FBType to see its specification.
The snapshot of figure 1 shows the specification of the Belt Function Block type. The
Model Editing Window acts a FBType Editor that can be used to define new FB types
or modify existing ones.
Figure 1. The Belt Function Block type of the TBCS.
Navigate through the project components
The Model Editing Window presents the head and the body of this FB type. As you
can see the graphical representation proposed by IEC61499 is not supported in this
version of the tool. However, this has nothing to do with the compliance of
Archimedes ESS with the IEC61499 standard. An IEC-compliant representation is
planned for the next version.
In figure 1 event inputs are shown on the left upper corner, while event outputs are
shown on the upper right corner. The BasicEvent icon in the Model Editing Window
represents the type of the event. In our case all of our input and output events are of
type BasicEvent.
Archimedes ESS 0.8 User’s Guide
7
Archimedes System Platform
The ECCRef is a reference to the function block’s execution control chart (ECC). You
can double clik on the corresponding icon to see the ECC of the FB (see figure 2).
Alternatively you can select the ECCRep folder from the Model Browser and double
click on the BeltECC that is in the ECCRep folder.
Figure 2. The ECC of the Belt FB type.
Circles, with the name Alg inside, represent the algorithms of the FB. You can click
on an algorithm to see its body in the Attribute Browser (right down corner of the
window). Figure 3 shows the body of algorithm INC that is very simple i.e., count =
count + 1;
Figure 3. Selecting and editing an algorithm.
The icon with the name count represents an internal variable. To see the type of this
variable you have to double click on the IntVarRef (INTernalVARiableREFerence)
icon.
The folder DataTypeRef in the Model Browser contains the data types that have been
defined for the specific project. Int is the only type that has been defined for the
TBCS.
The folder EECRep contains the ECCs of the Function Block types used in the
project.
Archimedes ESS 0.8 User’s Guide
8
Archimedes System Platform
The folder EventTypeRep contains the event types that that have been defined for the
specific project.
The file FBNetRep contains the Function Block networks that have been constructed
for the specific project. You can double click on a selected FB network to see it in the
Model Editing Window. Figure 4 shows a Function Block network that was
constructed as the design model of the TB control application. You can select from
the two available aspects i.e., connectivity (see figure 4) or topology (see figure 5).
Topology aspect is used to capture the deployment issues of the FB network.
Figure 4. The Function Block network of the Teabag Boxing control application
(connectivity aspect).
You can click on each function block instance of the FB network to see the
specification of the corresponding FB type.
Archimedes ESS 0.8 User’s Guide
9
Archimedes System Platform
Figure 5. The Function Block network of the Teabag Boxing control application
(topology aspect).
Create a project
To create a new project select from the Menubar File->New project
The Select Paradigm window is displayed
From the Select Paradigm window highlight the “Archimedes” paradigm and then
select “create new”.
From the New window select “Create Project File” and then click Next.
In the MSWindows “open” window select the folder to store the project and specify
the project’s name e.g. MyProject.
Note! In the current version (due to an error that will be fixed soon) the project is
named Root Folder. You have to select the name Root Folder in the Model Browser
(upper right corner) and change it to be the name of your project, i.e., MyProject.
Create the project folders
To create the project folders you have to select from the context menu the Insert
Folder option. The context menu appears if you select the project in the Model
Browser and press right click. The folder types are displayed to select one as shown in
figure 6, and next define the folders name. You can define more than one folder for
each type.
Archimedes ESS 0.8 User’s Guide
10
Archimedes System Platform
Figure 6. Inserting folders in project.
Re-using already defined DataTypes, EventTypes, FBTypes
You can reuse existing already defined DataTypes and EventTypes. Such types may
be defined for the corresponding types of the IEC-61499 and stored in the form of a
project. These types can be re-used by following the process described below:
In the Model Browser right click on the Root Folder that has the name of your project
and select “Attach Library”
Select the DataEventLib (or your project in which generic data types or event types
have been defined) directory and next the DataEventLib file.
The selected component has been attached as a library and is shown as in figure 7.
You can browse the library to see the its components.
Figure 7. Re-using event types in the form of a library.
Import a FB Type
This feature allows the developer to import in his project FBTypes defined by any
tool that supports the IEC-compliant format using XML. Such tools at the moment are
the FBDK of Rockwell Automation and the CORFU FBDK by SEG University of
Patras.
Archimedes ESS 0.8 User’s Guide
11
Archimedes System Platform
To import a FB type you have to activate the FBTypeImport interpreter. You can
either click the FB icon on the Toolbar or from the menubar select File->Run
Interpreter (you should have selected before a FBType and double click on it).
From the open window select the folder FBTypesInXML where many FBTypes taken
from the FBDK of Rockwell Automation have been stored.
Select the FBType you want to import.
Note! The current version of the interpreter requires for the ECCRep folder to exist in
the Model Browser before importing FBTypes.
The selected FBType has been imported and can be used. You can use the Model
Browser to see the structure of the imported FBType.
Create a FB Type
Select in the Model Browser a folder of type FBTypeRep. Right click and context
menu select Insert Model. A new model with name NewDataType has been created in
the folder. Define the new FBType name by editing the proposed NewDataType.
Name it for example MyBeltFB.
Double click on the created entry in the Model Browser (the one with the name
MyBeltFB) to see the Partbrowser that includes the parts that can be used in the
construction of the FBType model.
Define event and data I/Os
Drag and drop the EventIn part to the Model Editing Window. An instance of the
selected type has been inserted in the FBType under construction. You can define the
name of the event by editing the default one in the attribute browser (right down
window). The attribute browser displays the name of the event as well as its attributes,
preferences and properties. To see its properties select the event instance in the Model
Editing window. The Properties are displayed on the properties tab of the Attribute
Browser.
To define the event’s type you have to select from the parts window the
EventTypeRef icon and drag it in the main window. Since this is only a reference you
have to define the type that will reference to. To define the Event type that this
reference will refer to, select the proper EventType from a folder of type
EventTypeRep and drag it on the created reference. To make the model readable you
can rename the EventTypeRef to the name of its event type. Next you have to create
a connection between the EventIn instance and the EventTypeRef instance in the
Model Editing Window.
Select the icon “connect mode” fro the Modebar (upper left border of the main
window). Click on the EventIn instance and next on the EventTypeRef instance.
Archimedes ESS 0.8 User’s Guide
12
Archimedes System Platform
In the same way event outputs and the input and output data are defined. The same
EventRef instance can be used to connect more than one input or output events in case
they are of the same type.
Internal variables are also defined in the same way.
Define Algorithms
To define an algorithm drag and drop the Algorithm icon from the Partbrowser. Select
the algorithm and define its name in the attribute browser as shown in fig. 8.
To define the algorithm body you should have defined an external editor.
Figure 8. Defining an algorithm.
Define an External Editor
To define an external editor, select from the Menubar File->Settings.
In the GME properties window select Enable External Text Editor (see figure 9) and
specify the editor of your choice, i.e. notepad.
Select the editor icon in the attribute browser to specify the algorithm body.
Define the ECC
To create the ECC of the FBType you have to drag the ECCRef icon from the
Partbrowser and drop it in the Model Editing window. You have next to define the
type of the ECC that this reference shows. ECC types have to be defined for this
action to take place (see Create an ECC in next section).
Archimedes ESS 0.8 User’s Guide
13
Archimedes System Platform
Figure 9. Defining an external editor.
Create an Execution Control Chart (ECC)
Create a folder of type ECCRef or select an existing one. From the context menu
select Insert Model and next ECC.
An ECC entry is appended in the Model Browser. Define the name of the ECC by
editing the default one.
Double click on the created ECC to see in the Partbrowser the components
corresponding to this model type.
Using these parts you can create the ECC.
Drag and drop the icon Action to append an action in the ECC. To define the
algorithms and the output events of this specific action double click on the action.
The model editor allows you to define algorithms and event outputs for this action.
Drag and drop the corresponding references and next assign these references to actual
model elements.
Note! There are some known errors in the metamodel of the ECC (version 0.8) that
will be fixed in the next version.
Archimedes ESS 0.8 User’s Guide
14
Archimedes System Platform
Create a FBNetwork
Create a folder of type FBNetRep or select an existing one. From the context menu of
the Model Browser select Insert Model and next FBNet.
An FBNet entry is appended in the Model Browser. Define the name of the FBNet by
editing the default one.
Double click on the created FBNet to see in the Partbrowser the components
corresponding to this model type. Select the Connectivity aspect from the upper
border of the Model Editing Window.
Create FB instances
To create an FB instance in the Model Editing Window, you have to press ALT and
drag a type from the Model Browser and drop it in the model editing window. An
instance of this type is created in the model. Specify its name in the Attribute
Browser.
To create connections between FB instances select the “connect mode” icon from the
Modebar.
Deployment Diagram
To proceed to the deployment diagram you have to select the Topology aspect. In this
aspect you create “process collocation” instances and “Host” instances to define the
assignments of the FB instances to specific process collocation.
The “Process collocation” construct is used to represent in the model the resource
concept of the IEC61499, while the “Host” construct is used to represent the Device
concept of the IEC61499.
Using the interpreters
The following interpreters are provided in version 0.8.
1. FBType2XML Interpreter
It is used to create a file with the XML specification of a selected FB Type.
2. FBtypeImport Interpreter
It is used to import in the project a FB Type that is provided in XML
specification
3. FBType2CorbaComp Interpreter
It is used for the automatic generation of the implementation model of a
selected FB type for a CCM-compliant (CORBA Component Model)
execution environment.
4. FBNet2CorbaCcmCad Interpreter
Archimedes ESS 0.8 User’s Guide
15
Archimedes System Platform
It is used for the automatic generation of the implementation model of a
selected FB network for a CCM-compliant (CORBA Component Model)
execution environment.
In this section we consider the use of FBType2XML Interpreter and FBTypeImport
Interpreter. For the other two interpreters please refer to the next section.
Using the FBType2XML Interpreter
Select the FBType you want to export in XML specification and from the context
menu select “interpret”. Alternatively from the components window select the
FBType2XML interpreter and press “interpret”.
You have to define the folder to store the XML specification. A file, which has as
name the name of the FBType followed with the extension _xml, is created.
Using FBtypeImport Interpreter
Select the corresponding icon from the toolbar or select from the Menubar
File->Run Interpreter->FBImportInterpreter.
Select the FBType that you want to import (it must be in XML specification).
FBTypes in XML specification can be found in the directory FBTypesInXML.
Create the project’s implementation model
To create the implementation model for the CIAO CCM we have to create the
implementation model for the project’s FBTypes and for the project’s FBNetwork.
Create the implementation model for the project’s FBTypes
For each FBType do the following:
Select the FBType in the Model Browser and from the context menu select
“Interpret”. From the Components window select the FBType2CorbaCom interpreter
and next “interpret”. From the Browse for folder window select the folder to store the
executor files of the selected FBType. You have also to specify the folder to store the
component package files of the selected FBType.
Create the implementation model for the FBNetwork
Double click on the FBNetwork model.
Select the FBNet2CorbaCcmCad Interpreter from the corresponding icon (C) from the
Toolbar.
Define the folder to store the cad files.
Archimedes ESS 0.8 User’s Guide
16
Archimedes System Platform
Executing the implementation model
For the execution of the control application the following process is applied on the
implementation artefacts that are produced by Archimedes ESS, as described in [3].
Idl and cidl files are processed by idl and cidl compilers to generate stub, skeleton and
component implementation skeleton files, which are subsequently used to generate the
component’s dlls. These dlls along with .csd and .ssd files constitute the component’s
package. Component packages with the .cad file are utilized to initialize the
component instances, create the connections and initialize the control application.
This last process can be extended to a large extend by specific deployment tools. For
more information on running the example TBCS application on the CCM
implementation environment please refer to [3].
References
[1] K. Thramboulidis, “Model Integrated Mechatronics: An Architecture for the Model Driven
Development of Mechatronic Systems”, IEEE International Conference on Mechatronics,
Istanbul, Turkey 2004.
[2] K. Thramboulidis, “Using UML in Control and Automation: A Model Driven Approach”, 2nd
IEEE International Conference on Industrial Informatics, 24-26 June, Berlin, Germany,
(INDIN´04).
[3] K. Thramboulidis, D. Perdikis, S. Kantas, “Model Driven Development of Function Block Based
Distributed Control Applications”, 16th IFAC World Conference, Prague, July 4-8 2005.
Archimedes ESS 0.8 User’s Guide
17