Πνευματικός#
Εισαγωγή#
The VEX IQ Brain can control the VEX IQ Pneumatic system using methods from the Pneumatic class. These methods allow the Brain to control the pneumatic pump and extend or retract pneumatic cylinders.
This page uses pneumatic_1 as the example Pneumatic name. Replace it with your own configured name as needed.
Παρακάτω είναι μια λίστα με όλες τις μεθόδους:
Ενέργειες — Έλεγχος πνευματικών κυλίνδρων.
Μεταλλαγμένοι — Ενεργοποιήστε ή απενεργοποιήστε την πνευματική αντλία.
pump_on— Turns the pneumatic pump on.pump_off— Turns the pneumatic pump off.pump— Turns the pneumatic pump on or off.
Αναλυτές — Ελέγξτε αν είναι συνδεδεμένο το σωληνοειδές.
installed— Returns whether or not a solenoid is connected to the Brain.
Κατασκευαστές — Μη αυτόματη αρχικοποίηση και ρύθμιση παραμέτρων του Pneumatics.
Pneumatic— Creates a Pneumatics object.
Ενέργειες#
extend#
extend extends a pneumatic cylinder.
Usage:
pneumatic_1.extend(cylinder)
Παράμετροι |
Περιγραφή |
|---|---|
|
The cylinder to extend:
|
retract#
retract retracts a pneumatic cylinder.
Usage:
pneumatic_1.retract(cylinder)
Παράμετροι |
Περιγραφή |
|---|---|
|
The cylinder to retract:
|
Μεταλλάκτες#
pump_on#
pump_on turns the pneumatic pump on.
Usage:
pneumatic_1.pump_on()
Παράμετροι |
Περιγραφή |
|---|---|
Αυτή η μέθοδος δεν έχει παραμέτρους. |
pump_off#
pump_off turns the pneumatic pump off.
Usage:
pneumatic_1.pump_off()
Παράμετροι |
Περιγραφή |
|---|---|
Αυτή η μέθοδος δεν έχει παραμέτρους. |
pump#
pump turns the pneumatic pump on or off.
Usage:
pneumatic_1.pump(state)
Παράμετροι |
Περιγραφή |
|---|---|
|
The state to set: |
Αποκτητές#
installed#
installed returns a Boolean indicating whether the solenoid is connected to the Brain.
True— The solenoid is connected to the Brain.False— The solenoid is not connected to the Brain.
Usage:
pneumatic_1.installed()
Παράμετροι |
Περιγραφή |
|---|---|
Αυτή η μέθοδος δεν έχει παραμέτρους. |
Κατασκευαστές#
Constructors are used to manually create Pneumatic objects, which are necessary for configuring Pneumatics outside of VEXcode.
Pneumatics#
The Pneumatic constructor creates a Pneumatic object in the specified Smart Port.
Usage:
pneumatic_1 = Pneumatic(smartport)
Παράμετρος |
Περιγραφή |
|---|---|
|
Η Έξυπνη Θύρα στην οποία είναι συνδεδεμένο το σωληνοειδές, γράφεται ως PORTx όπου x είναι ο αριθμός της θύρας. |
# Create a Pneumatic object in Port 1
pneumatic_1 = Pneumatic(Ports.PORT1)