Engee documentation

Condition

State (State) stateflow state — this is one of the blocks of a finite state machine (SC). The block contains actions describing the behavior of the system in this state in the form of a program code based on Julia, transition graph or nested KA and can be configured using groups of operators.

stateflow actions en

The state blocks obey the logic of the spacecraft:

  1. In the spacecraft model, one or more states can be active at any given time if a hierarchy of states is used. In this case, the states from the most nested to its outermost parent state are active (for more information, see Hierarchy of the state machine);

  2. The state is activated if the condition for switching to it is met. If the state is the only one in the model or the only one among the nested states, then it can be activated without an incoming transition.

States maintain a hierarchy (for more information, see Hierarchy of the state machine).

Syntax of states

The rule Error in violation of the condition

Each state should have a name.

Error in the router’s result loop: ErrorException('model name/Chart': state name ' ' is incorrect.)

  • The name of the state may consist of:

    • Letters of the Latin alphabet in any case.

    • Numbers.

    • The underscore character.

  • The name must begin with a letter of the Latin alphabet.

  • The name should not be repeated at the same nesting level.

Error in the router’s result loop: ErrorException('model name/Chart': state name 'example of an incorrect name' is incorrect.)

Operator groups only support operations in the Julia language.

Model initialization error: [EXEC] Initialization error of the id_model id_simulation: UndefVarError(:incorrect syntax)

Code written in the state without specifying the prefixes entry:, during:, exit: and on is executed both when the state is activated and at each step of the model while the state remains active and is called code with an anonymous group of operators. This group of operators combines the behavior of the prefixes entry: and during:. For example, a status block with a for loop looks like this:

stateflow cycles variables

You can leave comments in the status blocks, just like in any Julia code.:

stateflow commentary 2 en