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.

Spin block illustration for motor control, allowing indefinite spinning without blocking subsequent commands.

Select which motor or motor group to use.

Diagram of a spin motor illustrating its functionality in motion control applications.

Select which direction for the motor or motor group to move in.

Diagram illustrating motor spin directions for programming motor behaviors and actions in robotics.

In this example, the motor will spin forward for 1 second before stopping.

Diagram illustrating the Spin block for motor control, showing options for spinning, stopping, and setting motor parameters.

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.

Image illustrating the Spin block used to control motor movement in various directions and settings.

Select which motor or motor group to use.

Diagram illustrating the Spin For block used to control motor movement for a specified distance in robotics programming.

Select which direction for the motor or motor group to move in.

Diagram illustrating motor control blocks for spinning, stopping, and positioning motors in programming.

Set how far the motor or motor group will spin by entering a value, and choosing the unit of measurement (degrees or turns).

Diagram illustrating the Spin For block used to control motor movement for a specified distance in 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.

Image illustrating the Spin For block used to spin a motor for a specified distance in robotics programming.

In this example, the motor will spin forward for 1 turn.

Diagram illustrating motor control blocks: Spin, Spin For, Spin to Position, Stop Motor, Set Motor Position, and more.

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.

Diagram illustrating the Spin to Position block for controlling motor movement to a specified angle in robotics programming.

Select which motor or motor group to use.

Diagram illustrating the Spin to Position block for controlling motor movement to a specified angle.

Set how far the motor or motor group will spin by entering a value, and choosing the unit of measurement (degrees or turns).

Diagram illustrating the Spin to Position block for controlling motor movement to a specified angle in degrees.

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.

Image illustrating the Spin to Position block for controlling motor movement to a specified angle in programming.

In this example, the motor will spin to the 270 degrees position.

Diagram illustrating the Spin to Position block for motor control, showing motor movement to 270 degrees.

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.

stop_block

Select which motor or motor group to use.

Diagram illustrating the Stop Motor block used to halt motor movement in programming applications.

In this example, the intake motors will spin in the intake direction for 1 second before stopping.

Diagram illustrating the Spin block for motor control, showing options for spinning, stopping, and setting motor parameters.

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.

Set Motor Position block interface showing options to set encoder position for motor or motor group in degrees or turns.

Select which motor or motor group to use.

Diagram illustrating the Set Motor Position block for controlling motor encoder position in degrees or turns.

Set the unit of measurement to use, degrees or turns.

Illustration of the Set Motor Position block for controlling motor encoder position in 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.

Diagram illustrating the Set Motor Position" block for programming motor encoder positions in robotics.

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.

Set Motor Velocity block interface for controlling motor speed with range settings and motor selection options.

Select which motor or motor group to use.

Diagram illustrating the Set Motor Velocity block for controlling motor speed in programming environments.

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.

Diagram illustrating the Set Motor Velocity block for controlling motor speed in a robotics programming context.

Set Motor Stopping#

The Set Motor Stopping block is used to set the behavior of the motor or motor group when they stop moving.

This is a non-blocking block and allows any subsequent blocks to execute without delay.

Diagram illustrating the Set Motor Stopping block options: Brake, Coast, and Hold for motor behavior when stopping.

Select which motor or motor group to use.

Diagram illustrating the Set Motor Stopping block options: Brake, Coast, and Hold for motor behavior when stopping.

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.

Diagram illustrating the Set Motor Stopping block options: Brake, Coast, and Hold for motor behavior when stopping.

In this example, the motor moves for 2 seconds before coasting to a stop.

Diagram showing motor stopping behavior options: Brake, Coast, Hold with example of coasting to a stop after 2 seconds.

Set Motor Max Torque#

The Set Motor Max Torque block is used to set the strength of the EXP Smart Motor or motor group. This block accepts a range of 0% to 100%.

This is a non-blocking command and allows any subsequent commands to execute without delay.

Set Motor Torque block interface for adjusting motor strength in a robotics programming environment.

Select which motor or motor group to use.

Diagram illustrating the process of setting motor torque in a motor control system.

In this example, the motor’s torque is set to 80% before spinning to the 350 degree position.

Diagram illustrating motor torque settings for various motor control blocks in a robotics programming environment.

Set Motor Timeout#

The Set Motor Timeout block is used to set a time limit for EXP 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.

This is a non-blocking command and allows any subsequent commands to execute without delay.

Set Motor Timeout block example, showing motor movement with a 1-second timeout to prevent blocking subsequent commands.

Select which motor or motor group to use.

Diagram illustrating the Set Motor Timeout block for controlling motor movement time limits in programming.

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.

Diagram illustrating the Set Motor Timeout block for controlling motor movement duration in robotics programming.