The encoder motor can be used as a counter. The number of revolutions is counted, not only when it is turning itself as a motor, but also when it is mechanically driven by an external force.
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:
You can insert all conditions from this category into the counter 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.