AR# 8415

Foundation State Editor/Abel - Syntax Error when //diagramm actions are used

Description

Keywords: FSM, ABEL, Foundation

When you use ABEL as your target language and you add an equation to the //diagramm actions, the generated ABEL code results in a syntax error similar to the following:

adding c=!b;

results in

Declarations

....

"diagram ACTIONS
c=!b;

"************* state machine: test *************

Equations

....

The problem here is that the equation c=!b is written to the Declaration part and not to an Equation part.

The software should write to the Equation part or add an "Equations" line automatically above the equation c=!b;

Solution

To work around this problem, write to the //diagram actions in the State Editor not just:
c=!b;
but
Equations
c=!b;

this results in the following ABEL code:

eclarations

....

"diagram ACTIONS
Equations;
c=!b;

"************* state machine: test *************

Equations

The ";" behind the Equations seem to be OK.

AR# 8415
Date 10/31/2008
Status Archive
Type General Article