Controlador de motor 55#
Introducción#
El Controlador de motor 55 (MC55) se utiliza para controlar motores de CC estándar.

This page uses mc_55 as the example Motor Controller 55 name. Replace it with your own configured name as needed.
A continuación se muestra una lista de los métodos disponibles:
spin– Spins a DC motor forward or reverse until stopped.stop– Stops the DC motor immediately.set_velocity– Sets the DC motor’s spin speed as a percentage.set_stopping– Sets how the DC motor behaves when stopping.set_max_torque– Limits the maximum torque the DC motor can apply.set_reversed– Sets the DC motor to have its direction be reversed.current– Returns the current drawn by the DC motor.temperature– Returns the current temperature of the DC motor.
Constructor – Inicializa manualmente un controlador de motor 55.
Motor55– Creates a Motor Controller 55.
girar#
spin rotates a connected DC motor in a specified direction using the current motor velocity.
Usage:
mc_55.spin(direction, velocity, units)
Parámetros |
Descripción |
|---|---|
|
The direction in which to spin the motor:
|
|
Optional. The velocity at which the motor will spin as a float or integer. If the velocity is not specified or previously set, the default velocity is 50%. |
|
Optional. The unit that represents the velocity:
|
# Spin the motor at -2 volts
mc_55.spin(FORWARD, -2)
detener#
stop stops the connected DC motor immediately, using the current stopping mode.
Usage:
mc_55.stop(mode)
Parámetro |
Descripción |
|---|---|
modo |
Optional. The stopping behavior to use when the motor stops:
If the stopping mode is not specified or previously set, the default behavior is |
establecer_velocidad#
set_velocity sets the default spinning speed of a DC motor as a percent for all subsequent Motor Controller 55 methods in the project.
Usage:
mc_55.set_velocity(value, units)
Parámetro |
Descripción |
|---|---|
|
La velocidad a establecer para el motor de CC de 0 a 100. |
|
Optional. The unit that represents the velocity:
|
establecer_detención#
set_stopping sets how a DC motor behaves when it stops.
Usage:
mc_55.set_stopping(mode)
Parámetros |
Descripción |
|---|---|
|
How the motor will stop:
|
establecer_par_máximo#
set_max_torque sets how much force a DC motor can exert.
Usage:
mc_55.set_max_torque(value, units)
Parámetros |
Descripción |
|---|---|
|
El nuevo par máximo para un motor en forma de flotador o número entero. |
|
Optional. The unit that represents the torque:
|
conjunto_invertido#
set_reversed sets the DC motor to be reversed so that the FORWARD direction will spin clockwise. This method works the same as setting the reverse parameter to True when constructing a Motor55.
Usage:
mc_55.set_reversed(value)
Parámetros |
Descripción |
|---|---|
|
Boolean value to set the direction reversed or not:
|
actual#
current returns the amount of electrical current the DC Motor in a range from 0.0 to 1.2 amps (amperes).
Usage:
mc_55.current(units)
Parámetros |
Descripción |
|---|---|
|
Optional. The unit that represents the current:
|
temperatura#
temperature returns the current temperature of the DC Motor.
Usage:
mc_55.temperature(units)
Parámetros |
Descripción |
|---|---|
|
Optional. The units that represent the temperature:
|
Constructores#
Constructors are used to manually create Motor55 objects, which are necessary for configuring a Motor Controller 55 outside of VEXcode.
Motor55#
Motor55 creates a Motor Controller 55.
Usage:
Motor55(port, gears, reverse)
Parámetro |
Descripción |
|---|---|
|
The 3-Wire Port that the V5 Pneumatic Solenoid is connected to:
|
|
Optional. Sets whether the motor’s spin should be reversed.
|
# Create a Motor Controller 55 in Port A
mc_55 = Motor55(brain.three_wire_port.a)