In a Natural Language sentence, there are two parts: a conditional part
and an action part.
A conditional part is a part of a sentence that triggers the action part if
valid.
An action part is a part of a sentence that contains the action to perform when
the conditional part is valid.
Each part includes different elements that are described in the following
table.
Part |
Element |
Description |
Conditional part |
Conditional operator |
Word that begins a condition.
- If: if the condition is valid, it
executes the action.
Note:
You can use this operator with event sensors
and function sensors.
- Each time: if the condition is
valid, it executes the action multiple times. The
condition repeats as soon as the action ends.
Note:
You can use this operator with event sensors
and function sensors.
- While: if the condition is valid,
it executes the action multiple times. Unlike
Each time, the value of the
condition affects the action during its execution and
stops if it is no longer valid.
Note:
You can use this operator with function
sensors.
|
Sensor block |
Block of the conditional part. |
Logical operator |
Word that connects sensor blocks.Note:
And has the priority on
Or.Example: A
And B
Or C
And D = (A
And B)
Or (C
And D)
|
Action part |
Do |
Generic operator that represents the beginning of the action
part. |
Driver block |
Block of the action part. |
Sequential operator |
Word that manages the execution sequence of the blocks.
- And: executes both actions at the
same time.
- Then: executes the second action
only when the first one is finished.
- After: executes the action before
with a delay (s or ms).
- During: executes the action for a
duration (s or ms).
|
Example of Conditional and Action Parts
Number |
Element |
C |
Conditional part |
|
1 |
Conditional operator |
2 |
Logical operator |
S1 / S2 |
Sensor blocks |
A |
Action part |
|
3 |
Do operator |
4 |
Sequential operator |
D1 / D2 |
Driver blocks |