Module «Condition»

The modules described in this part do nothing by themselves, they should be used together with other modules. The described modules (except «Break»), in addition to the usual «Note» field, have a few more parameters that are required to fill out, but there is no separate settings window.

Module «Condition» module allows you to perform certain actions depending on the specified condition. The condition itself doesn't matter as long as it comes down to «True» or «False».

## Module interface

Module consists of the fields «Note» and «Condition». Actions that must be performed when the value of the condition is «True», are added to the «THEN» section, if the value is «False» - to the «ELSE» section. Actions are added to the module by dragging them from the menu or another place in the workspace.

![Screenshot](img/condition_1.png)

The «Note» field is designed for robot creators to leave notes/comments.

The «Condition» field is filled according to the rules of the C# programming language. For users unfamiliar with this language, help is offered in the form of a «Constructor of conditions», accessible by clicking the button ![Screenshot](img/condition_2.png) to the right of the condition. ## Constructor of conditions

Constructor of conditions allows creating conditions in accordance with the syntax of the C # language.

![Screenshot](img/condition_3.png)

### Adding

In order to make a condition, it is necessary to fill in both operands, select the type of operands (rows or numbers), select the operator between them from the proposed one and click on the «Add» button:

![Screenshot](img/condition_4.png)

![Screenshot](img/condition_5.png)

The list of operations for rows and for numbers is different, so first select the type of operands, and only then the operation. ### Binding

You can bind multiple conditions with logical «AND» or logical «OR».

This is done as follows - holding the Shift key selects several conditions that must be connected by one operator, then the button with the corresponding logical operator is pressed:

![Screenshot](img/condition_6.png)

![Screenshot](img/condition_7.png)

The «||» symbol means logical OR, the «&&» symbol means logical AND. ### Unbinding

Conditions that consist of several simple conditions, meaning, those that use a logical AND or OR, can be disconnected by clicking on the «Unbind» button. Disconnection is done by logical operators.

![Screenshot](img/condition_8.png)

![Screenshot](img/condition_9.png)

### Saving

To save the condition, press the «Save» button. The final condition is inserted to the «Condition» field of the conditional module:

![Screenshot](img/condition_10.png)

![Screenshot](img/condition_11.png)

Finished module will look like this:

![Screenshot](img/condition_12.png)

### Minimize

To reduce occupied workspace you can click the «Minimize» button to minimize actions included in this module.

![Screenshot](img/condition_13.png)

You can also change the size of sections «THEN» and «ELSE» up to completely minimizing one of them, for example, if one of them is not being used.

![Screenshot](img/condition_14.png)

![Screenshot](img/condition_15.png)