Pneumatisch#

Invoering#

De VEX EXP Brain kan het CTE Pneumatic-systeem aansturen met behulp van methoden uit de Pneumatic klasse. Deze methoden stellen de Brain in staat de pneumatische pomp te besturen en pneumatische cilinders uit te schuiven of in te trekken.

Voor de onderstaande voorbeelden krijgt de geconfigureerde CTE Pneumatic Solenoid de naam pneumatic_1 en wordt deze in alle volgende voorbeelden in deze API-documentatie gebruikt bij verwijzingen naar methoden van de klasse Pneumatic.

Hieronder vindt u een lijst met alle beschikbare methoden:

Handelingen – Bediening van de pneumatische cilinders en de pneumatische pomp.

  • extend – Verlengt een pneumatische cilinder.

  • retract – Trekt een pneumatische cilinder terug.

  • pump_on – Schakelt de pneumatische pomp in.

  • pump_off – Schakelt de pneumatische pomp uit.

Instellers – Schakel de pneumatische pomp in of uit.

  • pump – Schakelt de pneumatische pomp in of uit.

Constructors – Initialiseer en configureer handmatig de CTE pneumatische solenoïde.

  • Pneumatic – Maak een CTE pneumatische solenoïde aan.

Acties#

extend#

extend verlengt een pneumatische cilinder.

Usage:
extend(cylinder)

Parameter

Beschrijving

cylinder

De cilinder die verlengd moet worden:

  • CYLINDER1
  • CYLINDER2
  • CYLINDER3
  • CYLINDER4
  • CYLINDERALL — Verlengt alle cilinders

# Extend the first cylinder
pneumatic_1.extend(CYLINDER1)

# Wait 2 seconds
wait(2, SECONDS)

# Retract the first cylinder
pneumatic_1.retract(CYLINDER1)

retract#

retract trekt een pneumatische cilinder in.

Usage:
retract(cylinder)

Parameter

Beschrijving

cylinder

De cilinder die moet worden ingetrokken:

  • CYLINDER1
  • CYLINDER2
  • CYLINDER3
  • CYLINDER4
  • CYLINDERALL — Trekt alle cilinders in.

# Extend the first cylinder
pneumatic_1.extend(CYLINDER1)

# Wait 2 seconds
wait(2, SECONDS)

# Retract the first cylinder
pneumatic_1.retract(CYLINDER1)

pump_on#

pump_on schakelt de pneumatische pomp in.

Usage:
pump_on()

Parameters

Beschrijving

Deze methode heeft geen parameters.

# Turn the pneumatic pump on
pneumatic_1.pump_on()

pump_off#

pump_off schakelt de pneumatische pomp uit.

Usage:
pump_off()

Parameters

Beschrijving

Deze methode heeft geen parameters.

# Turn the pneumatic pump off
pneumatic_1.pump_off()

Setters#

pump#

Pomp pump schakelt de pneumatische pomp in of uit.

Usage:
pump(state)

Parameter

Beschrijving

state

De in te stellen status: True schakelt de pneumatische pomp in, en False schakelt de pneumatische pomp uit.

# Turn the pneumatic pump on
pneumatic_1.pump(True)

# Turn the pneumatic pump off
pneumatic_1.pump(False)

Constructeurs#

Pneumatic#

Pneumatic creëert een pneumatisch systeem.

Pneumatic(smartport)

Parameter

Beschrijving

smartport

De slimme poort waarop de pneumatische solenoïde is aangesloten, wordt weergegeven als Ports.PORTx , waarbij x het poortnummer is.

# Construct a Pneumatic System "pneumatic_1" with the
# Pneumatic class
pneumatic_1 = Pneumatic(Ports.PORT1)