Overview

The following image shows the important object in a Weld application:

Objects

Toolbar

Toolbar is where all the tools for creating a complex and effective state machine are located. All the components are drag and drop except for the transitions.

Navigation bar can be used to navigate between sub-tasks and nested states. When you make a state a sub-task, it becomes a block when viewed from its parent state. In order to modify its content, you can double click on the body of the block and it will take you to body of the sub-task where you can add actions or nested state-machines.

Properties Tab

Inside the properties tab, you can modify the characteristics of the selected object. In order to to that, just select the object of interest, and then navigate to the properties tab.

Code Generator

In order to generate the C code for your designed state-machine, you can click on the play button on top of the chart. Once the code is generated, resulting source and header files will be placed in the folders that you chose during project creation.

Chart Objects

Chart object are located in the toolbar and you can drag and drop them on the body of your state-machine chart.

Thread

A thread represents the root state-machine of your chart. When the code is generated for the state-machine, a separate function will be created for each thread, so, all the code will be executed sequentially for each thread.

In order to create Threads, you can drag and drop a state to the root of your project. The states that are dropped on the rood will automatically be converted to threads. You will have to navigate inside the threads, by double clicking on the thread, in order to add actions and state under each thread.

State

States describe the operation mode of the state-machine. The state-machine will perform different tasks based on the active state at the current execution cycle and states become active or inactive based on transitions in each state-machine.

Each state has a parent state. Each thread is actually a state that is placed on the root of the project and it is the parent of the states that are placed inside it.

You can place state inside other states to make nested state-machines. In order to prevent cluttering of the chart, you can convert a state to a sub-task by right-clicking on the state and select sub-task. When a state is converted to a sub-task, it will show as a block in the parent state and you can navigate inside it by double clicking on the body of the sub-task block.

Transition

Transitions are the links between different states in a state-machine. The state-machine evaluates the conditions of the transition objects that are attached to a active state in order to determine whether the system state should be changed.

Start Transition

The Start Transition specifies which state (of a serial parent) should be activated when there is an ambiguity as to which state should be active. This condition usually happens when a parent state is entered and there is no active child state.

Action Block

Action Blocks are properties of each state, serial or parallel, and they specify the actions (lines of code) that the state should take upon entry or exit or during the state active time.