FSM#

block

Block appearance in REPEAT VISION#

 The Finite State Machine (FSM) block. To access this block, use one of the following methods:

By double-clicking on the block LMB

  1. Select a block by clicking on it with LMB;

  2. Click on the ‘Edit’ button located in the ‘Actions’ section of the right panel for working with the block.

Fig. 1 The second method of getting into the Finite state machines block

Fig. 1 The second method of getting into the Finite state machines block#

 While in the block, two blocks will appear in the left panel of the block library under the External models section (see Fig. 2 below):

  • state – state block;

  • start — start point.

Рис. 2 Блоки state и start

Рис. 2 Блоки state и start#

Important

These blocks can only be used inside the FSM block, they are not available in the block library itself.

1.  State block state#

 When adding this block to the work surface, we get this window, Fig. 3:

Fig. 3 State block

Fig. 3 State block#

 The block consists of two fields:

  1. Title A;

  2. Action.

Hint

  • In order to start editing these fields, you need to click on the button_edit button located in the upper right corner of the block.

  • To leave the editing mode, click on the button_accept button, which appeared instead of the button_edit button after activating the block field editing mode.

 When adding multiple state blocks, you can connect them. To do this, hover the cursor over the block and, when the cursor changes to cursor, hold down LMB and drag the connection to another block, Fig. 4:

Fig. 4 Example of connection between blocks

Fig. 4 Example of connection between blocks#

Hint

Each connection from the block is assigned a number (see Fig. 5 below), which is located in the upper left corner of the window (transition between states).

Fig. 5 Example of numbering of transitions between statuses

Fig. 5 Example of numbering of transitions between statuses#

Important

Numbering of transitions between blocks is not end-to-end. For each block, the numbering of transitions begins with 1.

 A window (transition between statuses) also appears on each link in which, when you press the LMB once, you can set:

  1. Condition, to be met;

  2. The Action after which the above condition shall be met.

2.  Block Start point start#

 The block for starting transitions between statuses, Fig. 6:

Fig. 6 Start point

Fig. 6 Start point#

 When you hover over this block, similar to the state block, the cursor changes its appearance to cursor, and it can also be connected to other blocks by holding down LMB and then dragging the link to another block, Fig. 7:

Fig. 7 Block connection Start point

Fig. 7 Block connection Start point#

 While in the block, the following window appears in the right panel of the project, Fig. 8:

Fig. 8 Variables

Fig. 8 Variables#

 The variables table contains two columns:

  1. Type:

  • Input;

  • Output;

  • Internal,

which will have a port on the FSM block;

  1. Name, that will be displayed at the FSM block port.

Hint

By clicking on the button_add button located in the lower right corner, you can add Variables, and when you click on the button_delete button, delete them.

Note

To exit the block and return to the project, you need to click on the Back to the schema button, located in the right panel in the Actions section.

3.  Properties#

No

4.  Inputs and outputs#

Appear when appropriate variables are entered