Skip to main content

Engine

The Start each time block

The Start each time block offers the option of running a program when a condition is fulfilled. Therefore, it works similar to a case distinction, but runs not only one time, but rather every time the condition is fulfilled during the entire course of the program. The Start each time block:

Bild1.PNG

Is an abbreviation for the following construct:

Bild2.PNG

You can insert all conditions from this category into the motor category in the Start each time block.

Note: The program section in the Start each time block should be kept short, and should not contain any blocking calls or endless loops, so that this part of the program can be processed quickly.

Engine 

The symbol on the motor blocks represents all motors that are not encoder or servo motors.

Set

You can use the set motor speed to []... block to set the speed of a motor to a certain value (from 0 to 512). You can use the drop down menu (small triangle) to select the direction of rotation.

Call

You can use the get motor speed block to call up the speed of a motor and process it as a value.

Query

You can use the blocks if motor is running and if motor speed is ... to use the activity or speed of a motor as a condition.

Stop

You can use the block stop motor [] to stop a motor. The stop motor [] block offers the option of stopping a motor directly, or allowing it to run to a stop. You can select the desired option using the drop down menu (small triangle):

Bild3.PNG                                                                              

 

Servo motor

image-1623746331741.42.25.png

Set

You can use the set position to... block to set the position of a servo motor to a certain value (from 0 to 512). 0 and 512 are the values for the maximum deflection to the left and right. At a value of 256, therefore, the servo motor will be in the center. 

Call

You can use the get position block to call up the position of a servo motor and process it as a value.

Encoder motor

image-1623746341213.40.14.png

The encoder motor has the same functions as a normal motor, but also offers the option of counting revolutions and controlling multiple motors synchronously. A rotation is divided into ~64 steps.

Set

You can use the block 

Bild6.PNG

to set the speed of a motor to a certain value (from 0-512). You can use the drop down menu (small triangle) to select the direction of rotation. In addition, you can enter the number of steps the motor should complete. In this example, the motor turns 100 steps, or one and one third turns. As you can see in the example, this block has a plus sign that can be used to control multiple motors synchronously. It is possible to synchronize motors to the master or to an extension, however comprehensive synchronization, for instance between motors of the master and an extension, is not possible.

Note: Multiple synchronization calls in rapid sequence, such as could be caused by a loop (see example), can have a negative impact on synchronicity or prevent this entirely.

 

Stop

You can use the block stop motor ... to stop a motor. If you would like to stop multiple motors at the same time, you can add up to three additional motors by clicking the plus sign at the left of the block.

Bild7.PNG

Query

Block has reached position is used to utilize reaching the position as a condition. Position here means the end position of an encoder motor after completing the step size.