Execution Flow Blocks

Execution Flow blocks allow to switch sections of a program during its execution among a set of pre-configured options.

Execution Flow Blocks Execution Flow Blocks

Execution Flow Blocks

Right click inside a Switch block in order to create a new block.

Execution Flow Blocks

Drag into a Switch block to create Inputs and Outputs. To remove them, right click and select Remove Input/Output

Execution Flow Blocks

Note

The size of a switch block depends on the blocks it contains. A switch block will always have the size of the biggest of its existing cases.


Switch Blocks

If/Else

Choose between two cases based on the state of a boolean variable.

If/Else Switch

If/Else Switch


Integer case

Choose a case based on the value of an integer variable.

Integer Switch

Integer Switch

Right click the Case Block to access Case configuration options

  • Add Case: Create a new empty case.
  • Copy Case: Create a copy of the current case.
  • Delete Case: Delete the current case.
  • Add Entry: Add a new entry to the current case. An entry is a condition under which the case will be selected. The same entry can on only be in one case at a time. Adding an entry that already exists will move said entry to the current case.
  • Delete Entry: Remove an entry from the current case.
  • Set as Default case: the Default case will be executed whenever the switch condition does not match any of the existing entries.

Phase case

Same as Integer case, but using Flight Phases as the switch condition.

Phase Switch

Phase Switch

Warning

Case Blocks will report a ‘PDI ERROR’ if they don’t have at least 2 cases with entries.


On Focus

On Focus Block

On Focus Block

The On Focus block outputs a boolean value, which is only True the first time the block is executed.

If used inside a Switch Block, the value will be True each time the case is selected.

On Focus can be used to trigger actions or initialize variables whenever a case is switched.

The following example would initialize User Variable 01 to 7 whenever Landing phase is selected:

On Focus Example

On Focus Example