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:

from cte import *

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 cte_pneumatic 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:
cte_pneumatic.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:
cte_pneumatic.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:
cte_pneumatic.pump_on()

Parámetros

Descripción

Este método no tiene parámetros.

bomba apagada#

pump_off turns the air pump off.

Uso:

cte_pneumatic.pump_off()

Parámetros

Descripción

Este método no tiene parámetros.

bomba#

pump turns the air pump on or off.

Uso:

cte_pneumatic.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:

cte_pneumatic.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 Ports.PORTx where x is the number of the port.

from cte import *

# Create a CTE Pneumatic Solenoid in Port 1
cte_pneumatic = Pneumatic(Ports.PORT1)