Neumática#
Introducción#
The pneumatics class is used to control a VEX V5 Pneumatics device connected to a 3-Wire port.
Proporciona métodos para activar un solenoide y extender o retraer un cilindro neumático. El dispositivo neumático debe construirse manualmente mediante código y no puede añadirse a través del 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 |
|---|---|---|
|
|
The 3-Wire Port the Pneumatic Solenoid is connected to, written as |
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
pneumaticsclass 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 pneumatics device to the solenoid open state allowing air to flow into the cylinder.close— Sets the pneumatics device to the solenoid close state stopping air 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#
Configura el dispositivo neumático en la posición de solenoide abierto, permitiendo que el aire fluya hacia el cilindro.
Available Functionsvoid open();
Esta función no requiere ningún parámetro.
Return ValuesEsta función no devuelve ningún valor.
Examples// Open the solenoid to extend the cylinder
PneumaticsA.open();
close#
Configura el dispositivo neumático en la posición de solenoide cerrado, impidiendo que el aire fluya hacia el cilindro.
Available Functionsvoid close();
Esta función no requiere ningún parámetro.
Return ValuesEsta función no devuelve ningún valor.
Examples// Close the solenoid to retract the cylinder
PneumaticsA.close();