Πνευματικός#
Εισαγωγή#
The VEX EXP Brain can control the CTE Pneumatic system using methods from the Pneumatic class. These methods allow the Brain to control the pneumatic pump and extend or retract pneumatic cylinders.
For the examples below, the configured CTE Pneumatic Solenoid will be named pneumatic_1 and will be used in all subsequent examples throughout this API documentation when referring to Pneumatic class methods.
Παρακάτω είναι μια λίστα με όλες τις διαθέσιμες μεθόδους:
Ενέργειες – Έλεγχος πνευματικών κυλίνδρων και της πνευματικής αντλίας.
extend– Extends a pneumatic cylinder.retract– Retracts a pneumatic cylinder.pump_on– Turns the pneumatic pump on.pump_off– Turns the pneumatic pump off.
Ρυθμιστές – Ενεργοποιήστε ή απενεργοποιήστε την πνευματική αντλία.
pump– Turns the pneumatic pump on or off.
Κατασκευαστές – Χειροκίνητη αρχικοποίηση και διαμόρφωση της πνευματικής ηλεκτρομαγνητικής βαλβίδας CTE.
Pneumatic– Create a CTE Pneumatic Solenoid.
Ενέργειες#
extend#
extend extends a pneumatic cylinder.
Usage:
extend(cylinder)
Παράμετρος |
Περιγραφή |
|---|---|
|
The cylinder to extend:
|
# Extend the first cylinder
pneumatic_1.extend(CYLINDER1)
# Wait 2 seconds
wait(2, SECONDS)
# Retract the first cylinder
pneumatic_1.retract(CYLINDER1)
retract#
retract retracts a pneumatic cylinder.
Usage:
retract(cylinder)
Παράμετρος |
Περιγραφή |
|---|---|
|
The cylinder to retract:
|
# 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 turns the pneumatic pump on.
Usage:
pump_on()
Παράμετροι |
Περιγραφή |
|---|---|
Αυτή η μέθοδος δεν έχει παραμέτρους. |
# Turn the pneumatic pump on
pneumatic_1.pump_on()
pump_off#
pump_off turns the pneumatic pump off.
Usage:
pump_off()
Παράμετροι |
Περιγραφή |
|---|---|
Αυτή η μέθοδος δεν έχει παραμέτρους. |
# Turn the pneumatic pump off
pneumatic_1.pump_off()
Σέττερς#
pump#
pump turns the pneumatic pump on or off.
Usage:
pump(state)
Παράμετρος |
Περιγραφή |
|---|---|
|
The state to set: |
# Turn the pneumatic pump on
pneumatic_1.pump(True)
# Turn the pneumatic pump off
pneumatic_1.pump(False)
Κατασκευαστές#
Pneumatic#
Pneumatic creates a Pneumatic System.
Pneumatic(smartport)
Παράμετρος |
Περιγραφή |
|---|---|
|
The Smart Port that the Pneumatic Solenoid is connected to, written as |
# Construct a Pneumatic System "pneumatic_1" with the
# Pneumatic class
pneumatic_1 = Pneumatic(Ports.PORT1)