Neumática CTE#

Introducción#

Los comandos de CTE Neumático solo funcionan con las piezas de CTE Neumático. Para ello, deberá importar manualmente el módulo CTE:

using namespace cte;

El sistema neumático CTE utiliza una bomba de aire y un solenoide para controlar el aire comprimido que mueve los cilindros. Permite activar o desactivar la bomba y extender o retraer los cilindros mediante código.

This page uses ctePneumatic1 as the example CTE Pneumatics name. Replace it with your own configured name as needed.

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

  • extend – Extend a cylinder.

  • retract – Retract a cylinder.

  • pump_on – Turn on the air pump.

  • pump_off – Turn off the air pump.

  • pump – Set the on or off state of the air pump.

  • installed – Returns whether or not a CTE Pneumatic Solenoid is connected to the Brain.

Constructores: inicializan y configuran manualmente un solenoide neumático CTE.

  • Pneumatic – Creates a CTE Pneumatic Solenoid.

extender#

extend extends a cylinder.

Usage:
ctePneumatic1.extend(cylinder);

Parámetros

Descripción

cylinder

The cylinder to extend:

  • cylinder1
  • cylinder2
  • cylinder3
  • cylinder4
  • cylinderAll – All 4 cylinders

retraer#

retract retracts a cylinder.

Usage:
ctePneumatic1.retract(cylinder);

Parámetros

Descripción

cylinder

The cylinder to retract:

  • cylinder1
  • cylinder2
  • cylinder3
  • cylinder4
  • cylinderAll – All 4 cylinders

bomba encendida#

pump_on turns the air pump on.

Usage:
ctePneumatic1.pump_on();

Parámetros

Descripción

Este método no tiene parámetros.

bomba apagada#

pump_off turns the air pump off.

Uso:

ctePneumatic1.pump_off();

Parámetros

Descripción

Este método no tiene parámetros.

bomba#

pump turns the air pump on or off.

Uso:

ctePneumatic1.pump(state);

Parámetros

Descripción

state

The air pump state:

  • true – Turn the air pump on.
  • false – Turn the air pump off.

instalado#

installed returns a Boolean indicating whether the CTE Pneumatic Solenoid is connected to the Brain.

  • true - The solenoid is connected to the Brain.

  • false - The solenoid is not connected to the Brain.

Uso:

ctePneumatic1.installed()

Parámetros

Descripción

Este método no tiene parámetros.

Constructores#

Constructors are used to manually create Pneumatic objects, which are necessary for configuring a CTE Pneumatic Solenoid.

Pneumatic#

pneumatic creates a CTE Pneumatic Solenoid.

Usage:
pneumatic(smartport)

Parámetro

Descripción

smartport

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

using namespace cte;

// Create a CTE Pneumatic Solenoid in Port 1
pneumatic ctePneumatic1 = pneumatic(PORT1);