Motion#
Spin#
The Spin block is used to spin a motor or motor group indefinitely.
This is a non-blocking block and allows any subsequent blocks to execute without delay.
Select which motor or motor group to use.
Select which direction for the motor or motor group to move in.
In this example, the motor will spin forward for 1 second before stopping.
Spin for#
The Spin for block is used to spin a motor or motor group for a given distance.
This is can be a non-blocking or blocking block depending on if the and don’t wait option is used.
Select which motor or motor group to use.
Select which direction for the motor or motor group to move in.
Set how far the motor or motor group will spin by entering a value, and choosing the unit of measurement (degrees or turns).
By default, the Spin for block will block any subsequent blocks from executing until it’s finished. By expanding the Spin for block to show and don’t wait, blocks will continue to execute while the motor or motor group is moving.
In this example, the motor will spin forward for 1 turn.
Spin to position#
The Spin to position block is used to spin a motor or motor group to a set position.
This is can be a non-blocking or blocking block depending on if the and don’t wait option is used.
Select which motor or motor group to use.
Set how far the motor or motor group will spin by entering a value, and choosing the unit of measurement (degrees or turns).
By default, the Spin to position block will block any subsequent blocks from executing until it’s finished. By expanding the Spin to position block to show and don’t wait, blocks will continue to execute while the motor is moving.
In this example, the motor will spin to the 270 degrees position.
Stop Motor#
The Stop Motor block is used to stop the motor or motor group from moving.
This is a non-blocking block and allows any subsequent blocks to execute without delay.
Select which motor or motor group to use.
In this example, the intake motors will spin in the intake direction for 1 second before stopping.
Set Motor position#
The Set Motor position block is used to set a motor or motor group’s encoder position(s) to the entered value.
This is a non-blocking block and allows any subsequent blocks to execute without delay.
Select which motor or motor group to use.
Set the unit of measurement to use, degrees or turns.
In this example, the motor’s encoder position is set to 90 degrees before the motor spins to the 0 degrees position.
Set Motor velocity#
The Set Motor velocity block is used to set the speed of a motor or motor group.
This is a non-blocking block and allows any subsequent blocks to execute without delay.
Select which motor or motor group to use.
The Set Motor velocity block will accept a range of -100% to 100%.
In this example, the motor will spin forward for 1 turn before setting the motor’s velocity to 75% before it spins in reverse for 1 turn.
Set Motor Stopping#
The Set Motor Stopping block is used to set the behavior of the motor or motor group when they stop moving.
Select which motor or motor group to use.
Select which stopping behavior to use.
The three drive stopping behaviors are as follows:
Brake - The motor or motor group will come to an immediate stop.
Coast - The motor or motor group will spin gradually to a stop.
Hold - The motor or motor group will come to an immediate stop. If the motor or motor group is rotated by an outside force, the built-in encoder will move the motor or motor group back to its initial stopped position.
In this example, the motor moves for 2 seconds before coasting to a stop.
Set Motor Max Torque#
The Set Motor Max Torque block is used to set the strength of the Smart Motor or motor group. This block accepts a range of 0% to 100%.
Select which motor or motor group to use.
In this example, the motor’s torque is set to 80% before spinning to the 350 degree position.
Set Motor timeout#
The Set Motor timeout block is used to set a time limit for Smart Motor or motor group’s movement blocks.
The motor or motor group’s time limit is used to prevent motion blocks that do not reach their position from preventing other blocks in the stack from running. An example of a motor or motor group not reaching its position is an arm or claw that reaches its mechanical limit and cannot complete its movement.
Select which motor or motor group to use.
In this example, the motor is set to spin forward for 5 turns with a timeout of 1 second. The motor won’t reach the target position within 1 second, so the Spin block will automatically stop, and the motor will return to the 0 degrees position.