Neumático#

Introducción#

El módulo VEX EXP Brain puede controlar el solenoide neumático CTE para alimentar la bomba neumática y extender o retraer los cilindros neumáticos.

For the examples below, the configured CTE Pneumatic Solenoid will be named pneumatic_1 and will be used in all subsequent examples throughout this API documentation when referring to Pneumatic class methods.

A continuación se muestra una lista de todos los métodos disponibles:

Acciones: Controlar los cilindros neumáticos y la bomba de aire.

  • extend – Extends a specified pneumatic cylinder in a pneumatic system.

  • retract – Retracts a specified pneumatic cylinder in a pneumatic system.

  • pump_on – Turns the pneumatic pump on for a specified pneumatic system.

  • pump_off – Turns the pneumatic pump off for a specified pneumatic system.

Ajustadores: Enciende o apaga una bomba neumática.

  • pump – Turns the pneumatic pump on or off for a specified pneumatic system.

Constructores: Inicialicen y configuren manualmente el solenoide neumático CTE.

  • Pneumatic – Create a CTE Pneumatic Solenoid.

Comportamiento#

extend#

extend extends a specified pneumatic cylinder in a pneumatic system.

Usage:
extend(value)

Parámetro

Descripción

valor

The cylinder to extend:

  • CYLINDER1
  • CYLINDER2
  • CYLINDER3
  • CYLINDER4
  • CYLINDERALL — Extends all cylinders

# Extend the first cylinder
pneumatic_1.extend(CYLINDER1)

# Wait 2 seconds
wait(2, SECONDS)

# Retract the first cylinder
pneumatic_1.retract(CYLINDER1)

retract#

retract retracts a specified pneumatic cylinder in a pneumatic system.

Usage:
retract(value)

Parámetro

Descripción

valor

The cylinder to retract:

  • CYLINDER1
  • CYLINDER2
  • CYLINDER3
  • CYLINDER4
  • CYLINDERALL — Retracts all cylinders.

# Extend the first cylinder
pneumatic_1.extend(CYLINDER1)

# Wait 2 seconds
wait(2, SECONDS)

# Retract the first cylinder
pneumatic_1.retract(CYLINDER1)

pump_on#

pump_on turns the pneumatic pump on for a specified pneumatic system.

Usage:
pump_on()

# Turn air pump on
pneumatic_1.pump_on()

pump_off#

pump_off turns the pneumatic pump off for a specified pneumatic system.

Usage:
pump_off()

# Turn air pump off
pneumatic_1.pump_off()

Colocadores#

pump#

pump turns the pneumatic pump on or off for a specified pneumatic system.

Usage:
pump(state)

Parámetro

Descripción

estado

  • True — Turns the air pump on.
  • False — Turns the air pump off.

# Turn air pump on
pneumatic_1.pump(True)

# Turn air pump off
pneumatic_1.pump(False)

Constructores#

Pneumatic#

Pneumatic creates a Pneumatic System.

Pneumatic(smartport)

Parámetro

Descripción

smartport

The Smart Port that the Pneumatic Solenoid is connected to, written as Ports.PORTx where x is the number of the port.

# Construct a Pneumatic System "pneumatic_1" with the
# Pneumatic class
pneumatic_1 = Pneumatic(Ports.PORT1)