Midterm assignment
Warning
Please carefully read the information on fraud.
Introduction
The midterm assignment is a mini version of the final assignment. It follows the same procedure as the final assignment, but on a smaller scale.
There are four midterm and final assignments, one for each of the Workstation Groups:
Distributing and Handling Station (1DH) (3 students)
Testing and Buffering Station (2TB) (3 students)
Processing Station (3P) (2 students)
Sorting Station (4S) (2 students)
The midterm assignment deals with the same Workstation Group as your final assignment, so that you can continue work on the final assignment from where you ended with the midterm assignment.
Getting started
The most important sources of information for the midterm assignment given below. Study them and install the associated tools in the given order.
Assignment
For more detailed information on each workstation and its components, please have a look at the Festo hardware manual.
Warning
Please make sure to commit all your work to the proper repository. The playground repository is only meant for trying things out relating to GitKraken. It is NOT meant for actual work on the assignment.
Plant and controller common info
Develop a plant model for your workstation, as described below per workstation.
Develop a controller and test it on your plant model and on the 3D digital twin. The controller should wait until the workstation is initialized. After initialization, it should wait for the start button on the User Interface panel to be pressed, then light up the green LED associated with the start button and start the control sequence.
To help you getting started, several parts of the plant and controller models are given in your midterm assignment repository. You may complete and correct them as you like.
The files in folder
lib
in your assignment repo, should not be changed.Unless specified otherwise, base your simulation and real-time control models on the specifications in the Festo manual, and on measurements on the actual Festo workstations in the lab.
Plant and controller specific info
Develop a plant model for the manipulator of the Handling Station. It should be possible to pick up a product from one of the slides of the Distributing Station and deposit the product at Transfer Station. A new product should appear in the slide at the pickup position by clicking a predefined product in the SVG visualization.
Develop a controller that waits until a product is present in the slide, picks up the product and deposits it at the Transfer Station.
Please note that the sensor s_stack1filled
is drawn at an incorrect
position in the SVG figure plant.svg
, which is supplied in the midterm
assignment repo: the actual sensor is positioned lower, at the height of the
pusher, so that it is activated when the pusher pushes a product to the
pickup position. Likewise for the other two stack filled sensors.
Develop a plant model for the elevator and pusher. The pusher should be able to push a product from the elevator in the top and bottom positions. A new product should appear on the elevator by clicking a predefined product in the SVG visualization.
Tip: In the plant model, keep the product in the pusher when the elevator moves up or down. Do not send the product back and forth between elevator and pusher in your model.
Develop a controller that starts the elevator at the bottom and waits until a product is placed on the elevator table. The elevator then should go up, push the product to the air slide and go down again.
Develop a plant model for the processing table. Carefully study the behavior of the actuator as defined in the Festo manual and as implemented in the digital twin. The turntable should work empty and with a single product that is correctly oriented (not upside down). The product may spawn either at the entry location on the turn table, or it may be supplied by the short incoming conveyer.
Develop a controller that waits until a product is present at the entry location and subsequently turns the table until the product arrives at the exit location.
Develop a plant model for the conveyer and (at least) one of the gates. The gate should function correctly for a single product, forcing it to be sorted into the corresponding slide.
Develop a controller that switches the conveyer on, waits a second, then activates the gate and waits until a product has been sorted out into one of the slides and subsequently switches off the conveyer.
Use case
Develop a use case that executes the single control cycle executed by the controller, including pressing the start button and placing the product.
Two small use cases are provided in the repository for the midterm assignment that is avalable for every group. When you are lucky, one of the provided use case can be used as is. If not, you may need to change the use case. In all cases, it is advised to take one of the provided uses cases as a starting point for your own use case.
For more information on use cases, see the two sections on use cases in the final assignment and the section Online demonstration below.
Manual versus automatic mode of operation
For manually switching actuators on and off, two tooldef files
1-manual-plant-first.tooldef
and 1-manual-plant-last.tooldef
are
provided. The only difference between these files is the option -a
for the
simulator, which is set to first
or last
for the first and second
tooldef file, respectively. The option -a first
means that whenever the
simulator has a choice between multiple events for execution, the first one is
taken. Likewise, the option -a last
always takes the last event for
execution. There is also an option -a random
, which makes a random choice
between multiple events for execution.
For automatic mode of operation, there are also two files:
2-ctrl-plant-first.tooldef
and 2-ctrl-plant-last.tooldef
with the same
difference as the two files for manual mode.
In manual mode, actuators can be switched on and off by pressing the actuator buttons. In automatic mode, the controller switches the actuators on and off.
In principle, the observed behavior of the model should not depend on the option
-a
, and models should not have livelock. The options -a first
and -a
last
make it easier to find difference in observed behavior, when present, and
also make it easier to find livelock, when compared to the option -a random
.
Simulation and visualization
For the visualization, you can use the SVG figure in the file plant.svg
. You
can find this file in the repository that was automatically created for your
group. The visualization of the simulation model should clearly show all
physical components of the part of the plant that you are modeling, including
the status of actuators, sensors and product movement. The speed at which your
actuator moves the product, should be realistic (close to the actual velocity).
For more information on the purpose of the provided files in the repository, see
the comments in the files.
Report
One A4 (single sided) maximum in English. Font size 11pt. Margins top/bottom 2cm, left/right 3 cm, as provided in the Word template.
Commit and push a digital version of the report to the repository. A paper version of the report is not needed. You may use a
docx
orpdf
file.Use this Word document:
Word template
, or use latex with similar settings and content.
Operator manual
The sections Operator manual: … in the report (see Word template of the report mentioned above), should succinctly describe the operator instructions for the respective simulation and real-time control experiments. The operator instructions should allow someone familiar with the course to operate your controller and place the required products in the plant.
If actions need to take place in a specific order, you should explain the required order. If, on the other hand, actions can take place in an arbitrary order, you should also state this. E.g. pressing of the start button and placing products.
Warning
Do NOT mention information in the operator manual that can be found on the website, such as how the PLC code should be generated or how TwinCAT should be activated. Give only the required information that is specific for your controller.
Do NOT describe in the operator manual for manual mode exactly which actuators the operator needs to push in which order. ONLY mention with actuators work as they should in manual mode and whether they work as intended only without products or also with products.
Additional requirements
Keep the structure of the files and folders that are supplied in the repository for the midterm assignment unchanged:
Do not change any filenames of the files or folders.
Do not add any files or folders. The only exception is the report which has to be added to the repository.
You may add files or folders in intermediate commits, but for the last commit for the deadline, the structure of the files and folders should be unchanged.
Do not change or add any actuators or sensors.
Ensure that the interaction between controller and plant takes place via actuators and sensors only.
Start each file with a comment including the surnames, initials and ID numbers of the three members of your group. This is needed to trace back any suspected plagiarism.
Do not add any other comments in your CIF files. If you really think you need comments, use full line comments only: do not combine code and comments on the same line by adding a comment to the end of a line of code.
Do not exceed lines beyond column number 120. You may set a line indicating column 120 in the Eclipse editor: Window > Preferences > General > Editor > Text Editors > Print margin column: 120.
Nicely format and indent your models for optimal readability. Look at the models provided in the lectures for examples.
All CIF files must compile without errors: each separate CIF file must open in Eclipse without any error indications.
Do not commit any generated PLC code.
Do not commit Eclipse workspace data from folder .metadata. If you see such files or folders in GitKraken, you have incorrectly setup your Eclipse workspace and need to contact your teacher.
Normal submission
To subit your work, you must tag the commit of your submission with tag
midterm
as follows: right-click the commit and select the before-last menu item Create tag here using namemidterm
.The
midterm
tag that you have created is a local tag, visible only to yourself on your own laptop. To make the tag visible to others it must be pushed to the server. Working with existing tags is best done via GitKraken’s left panel.Open the TAGS listing by clicking the triangle and hover your mouse over the
midterm
tag. This will show the three vertical dots at the end of the tag line. Clicking the three dots brings up the tag menu. Only the first two items of this menu are relevant.Select Push midterm to origin to push the tag to the GitLab server. When the tag has been pushed, the Push midterm to origin item will no longer be present on the tag menu.
When you add another commit after having added the
midterm
submission tag, you can update the location of the tag to the last commit in your master branch. Make sure that the master branch is active, open the tag menu shown in the previous item and select Fast-forward midterm to master, assuming your tag is namedmidterm
and your latest commit is on themaster
branch. You should then again push the tag to the server (origin).If you want to change the location of the
midterm
tag to an arbitry other commit, that does not have a branch pointing to it, you must first delete the local and remotemidterm
tags, add themidterm
tag to the desired new location and push it to the remote.For additional explanation on how to use tags in GitKraken see the online manual on tags.
Late submission
If you decide to take the late submission deadline, your submission should be tagged
midterm-late
.
Grading
Simulation example
The video below shows the result of a combination of the final assignments of four student groups from a previous year of 4TC00. The output of each workstation has been connected to the input of the next workstation. Each workstation simulation has its own visualization window.
Warning
The video of the CIF SVG simulation of the four workstations is for the purpose of illustration only. It may use older versions of SVG visualizations and it is not meant to define the midterm or final assignment in any way. The textual specification of the assignments for the four workstations is always leading.