SinelaboreRT Header Logo


It's better when it's simple!

User Tools

Site Tools


UML-Tool specific Intro

Language Backends



Designers Toolbox

Integrated state-chart editor with auto-layout

Focus on modeling and not on moving states around to create a nice looking diagram! Syntax aware text fields offer a comfortable way to specify actions, guards etc. When the diagram passed the model checker it can be directly simulated. Connect the diagram to the real hardware to monitor the state machine in action.

There are better ways to model state machines than using spread sheets!

In the past different μC manufacturers have published application notes about the benefit of using state machines for the design of embedded software. An example is the application note SLAA402 from Texas Instruments (TI). It suggests to generate source code based on a spread sheet table. Nowadays several affordable UML modeling tools are available supporting the efficient design of state machines in a graphical way. SinelaboreRT generates production quality source code from state diagrams created with many different UML tools. Give it a try!

Latest Changes

Model-based testing of state machines 2020/02/23 19:32 Peter Mueller  
DCF77 Radio Clock 2020/02/23 19:27 Peter Mueller ,
Getting started with a Traffic Lights example on MSP430 - part 1 2020/02/23 19:26 Peter Mueller , , , ,
Astah SysML 2020/02/23 19:22 Peter Mueller  
Generate production quality code from state diagrams created with Enterprise Architect 2020/02/23 19:20 Peter Mueller  
Features 2020/02/23 19:18 Peter Mueller  
Generate efficient source code from UML state diagrams and activity diagrams! 2020/02/22 20:00 Peter Mueller  

Vending Machine example on GitHub


A new fully functional vending machine example is available now. It is now hosted on GitHub so you can quickly check out the model and code yourself. Link to the repository:

The envisioned machine is shown below.

To compile the example just call make. It is assumed that you have installed the code generator from sinelabore and the Astah* Community UML tool (locations see Makefile).

After startup you can select a product “A”, “B” or “C” by pressing one of theses buttons on your keyboard.

Then you have to insert the coins to pay for the product. Only 10Ct, 20Ct and 50Ct coins are supported. To “insert” them click “1”,“2” or “5” on your keyboard.

After you paid the product will be released and you receive back your change.


Most of the code is automatically generated from the UML model. It contains two state machines and an activity diagram. The state machines receive events from a message queue and can also send messages to other state machines. This is a well known design pattern to decouple objects. A timer service provides basic timer services that can be used from the state machines to realize delays or repetitive activities.

Product Store State Machine

The “product_store_sm” implements a simple product store containing the goods. It is responsible to release the products by turning on the motor etc.

Vending Machine

This is the controller machine keeping things together.

Change Algorithm

This is a simple algorithm modeled with the help of an activity diagram to release the right amount of money if the user overpaid. It takes care if one coin type is empty.

Have fun!

How do you like this article?
 stars  from 3 votes

Leave your comments

Enter your comment. Wiki syntax is allowed:
If you can't read the letters on the image, download this .wav file to get them read to you.
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
wiki/news/22may2016.txt · Last modified: 2019/12/09 20:00 by pmueller