Neumática#

Introducción#

The VEX V5 Brain can control a V5 Pneumatics system using the pneumatics class. This class allows the Brain to open or close the system, extending or retracting pneumatic cylinders.

El dispositivo neumático debe construirse manualmente mediante código y no puede añadirse utilizando el menú de dispositivos en VEXcode V5.

Constructores de clases#

pneumatics( 
  triport::port &port );

Instructor de clase#

Destroys the pneumatics object and releases associated resources.

~pneumatics();

Parámetros#

Parámetro

Tipo

Descripción

&port

triport::port

The 3-Wire Port the Pneumatic Solenoid is connected to, written as Brain.ThreeWirePort.X or ExpanderName.X, where X is the port letter (for example, Brain.ThreeWirePort.A or Expander1.A).

Notas#

  • Esta clase solo se puede construir manualmente mediante código, ya que no se puede construir utilizando el menú de dispositivos en VEXcode V5.

  • A Brain or 3-Wire Expander must be created first before they can be used to create an object with the pneumatics class constructor.

Ejemplo#

// Create the pneumatics instance on 3-Wire Port A
pneumatics PneumaticsA = pneumatics(Brain.ThreeWirePort.A);

Funciones de los miembros#

The pneumatics class includes the following member functions:

  • open — Sets the Pneumatic Solenoid to the open state, allowing air to flow into the cylinder.

  • close — Sets the Pneumatic Solenoid to the close state, stopping air from flowing into the cylinder.

Before calling any pneumatics member functions, a pneumatics instance must be created, as shown below:

/* This constructor is required to use a
V5 Pneumatics Solenoid when not configured as
a Digital Out device. Replace the values
as needed. */

// Create the pneumatics instance on 3-Wire Port A
pneumatics PneumaticsA = pneumatics(Brain.ThreeWirePort.A);

open#

Establece la válvula solenoide neumática en estado abierto, permitiendo que el aire fluya hacia el cilindro.

Available Functions
void open();

Parameters

Esta función no requiere ningún parámetro.

Return Values

Esta función no devuelve ningún valor.

Examples
// Open the solenoid to extend the cylinder
PneumaticsA.open();

close#

Cierra la electroválvula neumática, impidiendo que el aire fluya hacia el cilindro.

Available Functions
void close();

Parameters

Esta función no requiere ningún parámetro.

Return Values

Esta función no devuelve ningún valor.

Examples
// Close the solenoid to retract the cylinder
PneumaticsA.close();