This site introduces some basic examples of modeling an embedded system and a detailed explanation. You can download the examples to work with them on your computer.
- The Two Hand Molding Press
A detailed simulation run of this example is explained in this section - The Alarm Device Heartbeat
You can download this example to exercise with the ActiveChartsIDE: Download MoldingPress
Description:
The requirements for a molding press are as follows:
- The piston starts moving downwards if its two buttons are pressed within 1 second. If the time span is greater, both buttons have to be released before starting again.
- When the piston moves downwards and any button is released until the “Point of no return” is reached (which is located at ¾ of the total distance), the piston stops and moves upward again in its starting position.
- If the "Point of no Return" has been reached, the piston continues moving downward even if any button is released after this time.
When the piston reached the bottom position it stops and moves upward to its starting position.
We modelled the statics and dynamics with our tool ActiveChartsIDE. You can see a screenshot of this example running in our IDE here.
Static Structure:
The following figure shows the static structure of the simple molding press. It consists of a single controller which is associated with a piston. The current position of the piston (which can move up and down) is reflected by an attribute called “position” contained in the class:

We defined four signals:
- LeftButtonPressed: this signal is raised if the left button is pressed
- RightButtonPressed: this signal is send when the right button was pressed
- AnyButtonReleased: if one of the two buttons is released, this signal is raised
- PointOfNoReturn: this signal is send, if the "Point of no Return" is reached
Notice that the “PressControler”-class is marked “active”. This indicates that this is a behavioral class. The according behavior is modelled in an Acitivity Diagram called "PressController-Behavior".
Behavior Modeling:
This section contains the modelled behavior of the molding press controller. In the following UML 2.0 activity diagram the behavior of the press controller is modelled.

The detailed modeling is explained in the following section using a simulation run.
A simulation run of the molding press:
In this section we exemplified a simulation run with our tool ActiveChartsIDE.
![]() |
The simulation starts. A token (green point) is created at the InitialNode |
![]() |
In the next simulation step, the execution of the two AcceptSignalActions is created. The "token path" is highlighted. |
![]() |
The two AcceptSignalActions are enabled. The controller waits until one button is pressed. |
![]() |
In this figure the left button was pressed, tokens are now on both outgoing edges of the AcceptSignalAction. The AcceptSignalAction is terminated (red line). |
![]() |
Now the right button was pressed. Therefore, tokens are offered on the outgoing edges . Notice that the Timer create execution was started, as a result from the token coming from the left button pressed. |
![]() |
The InterruptibleActivityRegion is left via an InterruptingEdge, caused from the tokens from the JoinNode. All tokens within this region are destroyed. On the same time the "MoveDown" activity execution is enabled and the two AcceptSignalEdges are enabled |
![]() |
As the two AcceptSignalActions, the "MoveDown" activity is enabled, too. Its behavior is shown in the following figure:
Please note that no simulation is shown here, it is posible to observe the simulation in subactivities with ActiveChartsIDE, but not obligatory. |
![]() |
The "MoveDown" activity sends the signal "PointOfNoReturn" when the position of the piston is at 75. The PressControllerBehavior gets this signal and at the AcceptSignalAction a token is offered. |
![]() |
The InterruptibleActivityRegion is left, all tokens within are destroyed. Therefore, the release of any buttons would now be ignored. |
![]() |
The piston is still moving down...
|
![]() |
...still moving, the "Point of No Return" was reached. |
![]() |
The "MoveDown" activity has ended, meaning that the piston has reached the bottom of the press (i.e. the position of the piston is 100, see "MoveDown" behavior). |
![]() |
Both incoming edges of the join node offered tokens, so the simulation continues to the activity "MoveUp". Its execution is now created. |
![]() |
The "MoveUp" activity is now enabled. Its behavior is shown in the following figure:
The piston moves up... |
![]() |
... until its position is at 0 (i.e. at top). The activity "MoveUp" ends. |
![]() |
Now the behavior starts right from the beginning, the molding press is ready for a new press operation. |
You can download this example to exercise with the ActiveChartsIDE: Download AlarmDevice
Description:
A simple alarm device consists of multiple sirens and sensors. Each sensor issues a “Heartbeat” signal every three seconds indicating it is still alive. If such a signal misses for 10 seconds, an alarm is issued by turning on all sirens.
Static Structure:
The following figure shows the static structure of the simplified alarm device. It consists of a controller which is associated with some sirens and sensors.

The “AlarmDeviceControler”-, the "Sensor"- and the "Siren"-class are marked “active”. This indicates that they are behavioral classes. The according behavior is modelled in an Acitivity Diagram, pictured with the "{activity=...}" tag.
Behavior Modeling:

![]() |
![]() |



















