Motor 393#

Introducción#

Un Motor 393 es un motor de CC controlado mediante un Controlador de Motor VEX 29 (MC29). El MC29 convierte la señal de Modulación por Ancho de Pulso (PWM) de un puerto Brain de 3 cables en un voltaje variable que impulsa el Motor 393.

El controlador de motor VEX 29.

This page uses motor_393 as the example Motor 393 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 Motor 393 forward or reverse until stopped.

  • stop – Stops a Motor 393 immediately.

  • set_velocity – Sets a Motor 393’s speed as a percentage.

  • set_reversed – Sets a Motor 393 to have its direction be reversed.

Constructor – Inicializa manualmente un controlador de motor 29.

  • Motor29 – Creates a Motor Controller 29.

girar#

spin rotates a connected Motor 393 in a specified direction using the current motor velocity.

Usage:
motor_393.spin(direction, velocity, units)

Parámetros

Descripción

direction

The direction in which to spin the Motor 393:

  • FORWARD – By default, this is counterclockwise
  • REVERSE – By default, this is clockwise

velocity

Opcional. La velocidad a la que girará el motor 393, como valor de punto flotante o entero. Si no se especifica la velocidad o se estableció previamente, la velocidad predeterminada es del 50 %.

units

Optional. The unit that represents the velocity:

  • PERCENT
  • RPM (default) – Rotations per minute
  • VelocityUnits.DPS – Degrees per second

detener#

stop stops the connected Motor 393 immediately.

Usage:
motor_393.stop()

Parámetros

Descripción

Este método no tiene parámetros.

establecer_velocidad#

set_velocity sets the default spinning speed of a Motor 393 for all subsequent Motor 393 methods in the project.

Usage:
motor_393.set_velocity(value, units)

Parámetro

Descripción

velocity

La velocidad a la que girará el motor 393 como un flotante o un entero.

units

Optional. The unit that represents the velocity:

  • PERCENT
  • RPM (default) – Rotations per minute
  • VelocityUnits.DPS – Degrees per second

set_reversed#

set_reversed sets the Motor 393 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 Motor29.

Usage:
motor_393.set_reversed(value)

Parámetros

Descripción

value

Boolean value to set the direction reversed or not:

  • True – Reverse the Motor 393’s direction
  • False – Return the Motor 393’s direction to its default

Constructores#

Constructors are used to manually create Motor29 objects, which are necessary for configuring a Motor Controller 29/Motor 393 outside of VEXcode.

Motor29#

Motor29 creates a Motor Controller 29.

Usage:
Motor29(port, gears, reverse)

Parámetro

Descripción

port

The 3-Wire Port that the V5 Pneumatic Solenoid is connected to:

  • On the V5 BrainPorts.PORTx where x is the number of the port.
  • On a 3-Wire Expanderexpander.a where expander is the name of the expander instance.

reverse

Optional. Sets whether the Motor 393’s spin should be reversed.

  • TrueFORWARD will spin clockwise
  • False (default) – FORWARD will spin counterclockwise

# Create a Motor Controller 29 in Port A
motor_393 = Motor29(brain.three_wire_port.a)