Neumática#
Introducción#
The pneumatic class provides control for the CTE Pneumatic system, which uses an air pump and solenoid to control compressed air for moving cylinders. This class enables precise control of pneumatic actuators in automated workcell applications.
Note: CTE Pneumatic commands require the CTE module. Import it using using namespace cte;.
Constructores de clases#
pneumatic(
int32_t index );
Instructor de clase#
Destroys the pneumatic object and releases associated resources.
~pneumatic();
Parámetros#
Parámetro |
Tipo |
Descripción |
|---|---|---|
|
|
El puerto inteligente al que está conectado el solenoide neumático CTE (por ejemplo, PORT1). |
Notas#
Los comandos de CTE Pneumatic solo funcionarán con las piezas de CTE Pneumatic.
You must manually import the CTE module:
using namespace cte;.El sistema puede controlar hasta 4 cilindros individualmente o todos a la vez.
Ejemplo#
using namespace cte;
// Create a CTE Pneumatic Solenoid in Port 1
pneumatic ctePneumatic1 = pneumatic(PORT1);
// Turn on the pump and extend cylinder 1
ctePneumatic1.pump_on();
ctePneumatic1.extend(cylinder1);
Funciones de los miembros#
extender#
Extiende un cilindro neumático.
Available Functionsvoid extend(
cylinderType id );
Parámetro |
Tipo |
Descripción |
|---|---|---|
|
|
The cylinder to extend:
|
Esta función no devuelve ningún valor.
Examples// Extend cylinder 1
ctePneumatic1.extend(cylinder1);
// Extend all cylinders
ctePneumatic1.extend(cylinderAll);
retraer#
Retrae un cilindro neumático.
Available Functionsvoid retract(
cylinderType id );
Parámetro |
Tipo |
Descripción |
|---|---|---|
|
|
The cylinder to retract:
|
Esta función no devuelve ningún valor.
Examples// Retract cylinder 2
ctePneumatic1.retract(cylinder2);
// Retract all cylinders
ctePneumatic1.retract(cylinderAll);
bomba encendida#
Enciende la bomba de aire.
Available Functionsvoid pump_on();
Esta función no tiene parámetros.
Return ValuesEsta función no devuelve ningún valor.
Examples// Turn on the air pump
ctePneumatic1.pump_on();
bomba_apagada#
Apaga la bomba de aire.
Available Functionsvoid pump_off();
Esta función no tiene parámetros.
Return ValuesEsta función no devuelve ningún valor.
Examples// Turn off the air pump
ctePneumatic1.pump_off();
bomba#
Controla el estado de la bomba de aire.
Available Functionsvoid pump(
bool state );
Parámetro |
Tipo |
Descripción |
|---|---|---|
|
|
The air pump state:
|
Esta función no devuelve ningún valor.
Examples// Turn the pump on
ctePneumatic1.pump(true);
// Turn the pump off
ctePneumatic1.pump(false);
instalado#
Indica si el solenoide neumático CTE está conectado al cerebro.
Available Functionsbool installed();
Esta función no tiene parámetros.
Return ValuesDevuelve un valor booleano que indica si el solenoide está conectado al sistema de control o no.
trueif the solenoid is connected to the Brain.falseif the solenoid is not connected to the Brain.
// Check if the pneumatic solenoid is connected
if (ctePneumatic1.installed()) {
// Pneumatic system is ready
ctePneumatic1.pump_on();
}