Motor Controller (MC) 55#

To make Motor Controller 55 blocks appear in VEXcode V5, a Motor Controller 55 must be configured in the Devices window.

For more information, refer to these articles:

Spin Motor Controller 55#

The Spin Motor Controller 55 block is used to spin a DC Motor forever, until a new Motion block is used or the program is stopped.

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

aria-description goes here#
  spin [MC55_7 v] [forward v]

Select which DC Motor to use.

Image of Spin Motor Controller 55, used to control motor spinning and positioning in robotics applications.

Select which direction for the DC motor to move in.

Diagram illustrating motor spin directions and settings for Smart Motor and Motor Controller configurations.

In this example, the DC motor will spin forward for 2 seconds before stopping.

aria-description goes here#
  when started :: hat events
  spin [MC55_7 v] [forward v]
  wait (2) seconds   
  stop [MC55_7 v]

Spin Motor Controller 55 at Voltage#

The Spin Motor Controller 55 at Voltage block is used to spin a DC Motor at a specified voltage.

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

aria-description goes here#
  spin [MC55_7 v] [forward v] at (8) volts

Select which DC Motor to use.

Diagram of the Spin Motor Controller 55, illustrating voltage control for motor operation and settings.

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

Diagram illustrating the Spin at Voltage block for controlling a motor's direction and voltage in robotics programming.

The Spin Motor Controller 55 at Voltage block accepts a range from -8V to 8V.

Spinning a DC Motor at a negative voltage will cause the Motor to spin in the opposite direction than the one specified.

In this example, the DC Motor will spin forward at 4 volts for 2 seconds before stopping.

Diagram showing Spin Motor Controller 55 example, illustrating motor spinning at specified voltage settings.

Stop Motor Controller 55#

The Stop Motor Controller 55 block is used to stop a DC Motor from moving.

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

aria-description goes here#
  stop [MC55_7 v]

Select which DC Motor to use.

Image of the Stop Motor block in a programming interface, used to halt motor movement in robotics applications.

In this example, the DC motor will spin forward for 2 seconds before stopping.

aria-description goes here#
  when started :: hat events
  spin [MC55_7 v] [forward v]
  wait (2) seconds 
  stop [MC55_7 v]

Set Motor Controller 55 Velocity#

The Set Motor Controller 55 Velocity block is used to set the speed of a DC Motor.

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

aria-description goes here#
  set [Motor1 v] velocity to (5) [% v]

Select which DC Motor to use.

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

The Set Motor Controller 55 Velocity block will accept a range of -100% to 100%.

Setting a DC Motor’s velocity to a negative value will cause the DC Motor to spin in reverse and setting the velocity to 0 will cause the DC Motor to stop.

In this example, the DC Motor will spin forward for 1 second before setting the motor’s velocity to 100%.

aria-description goes here#
  when started :: hat events
  spin [Motor1 v] [forward v] for (1) [turns v] ▶
  set [Motor1 v] velocity to (75) [% v] 
  spin [Motor1 v] [reverse v] for (1) [turns v] ▶

Set Motor Controller 55 Stopping#

The Set Motor Controller 55 Stopping block is used to set the behavior of the DC Motor when it stops moving.

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

aria-description goes here#
  set [MC55_7 v] stopping to [brake v]

Select which DC Motor to use.

Image of the Set Motor Stopping block for controlling motor behavior when stopping, showing options for braking and coasting.

Select which stopping behavior to use.

The two 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.

By default, the DC Motor stopping behavior is brake.

Diagram illustrating various motor control blocks for setting motor position, velocity, stopping behavior, and torque.

In this example, the DC Motor spins for 2 seconds before coasting to a stop.

aria-description goes here#
  when started :: hat events
  [Set the DC Motor's stopping behavior to coast]
  set [MC55_7 v] stopping to [forward v]
  [Spin forward for two seconds before coasting to a stop]
  spin [MC55_7 v] [forward v]
  wait (2) seconds
  stop [MC55_7 v]