Αεριολογία#

Εισαγωγή#

The VEX V5 Brain can control a V5 Pneumatics system using the pneumatics class. This class allows the Brain to open or close the system, extending or retracting pneumatic cylinders.

Η πνευματική συσκευή πρέπει να κατασκευαστεί χειροκίνητα στον κώδικα και δεν μπορεί να προστεθεί χρησιμοποιώντας το Μενού Συσκευής στο VEXcode V5.

Κατασκευαστές κλάσεων#

pneumatics( 
  triport::port &port );

Καταστροφέας κλάσης#

Destroys the pneumatics object and releases associated resources.

~pneumatics();

Παράμετροι#

Παράμετρος

Τύπος

Περιγραφή

&port

triport::port

The 3-Wire Port the Pneumatic Solenoid is connected to, written as Brain.ThreeWirePort.X or ExpanderName.X, where X is the port letter (for example, Brain.ThreeWirePort.A or Expander1.A).

Σημειώσεις#

  • Αυτή η κλάση μπορεί να κατασκευαστεί μόνο χειροκίνητα στον κώδικα, καθώς δεν μπορεί να κατασκευαστεί χρησιμοποιώντας το Μενού Συσκευής στο VEXcode V5.

  • A Brain or 3-Wire Expander must be created first before they can be used to create an object with the pneumatics class constructor.

Παράδειγμα#

// Create the pneumatics instance on 3-Wire Port A
pneumatics PneumaticsA = pneumatics(Brain.ThreeWirePort.A);

Συναρτήσεις Μελών#

The pneumatics class includes the following member functions:

  • open — Sets the Pneumatic Solenoid to the open state, allowing air to flow into the cylinder.

  • close — Sets the Pneumatic Solenoid to the close state, stopping air from flowing into the cylinder.

Before calling any pneumatics member functions, a pneumatics instance must be created, as shown below:

/* This constructor is required to use a
V5 Pneumatics Solenoid when not configured as
a Digital Out device. Replace the values
as needed. */

// Create the pneumatics instance on 3-Wire Port A
pneumatics PneumaticsA = pneumatics(Brain.ThreeWirePort.A);

open#

Θέτει την πνευματική ηλεκτρομαγνητική βαλβίδα στην ανοιχτή κατάσταση, επιτρέποντας στον αέρα να ρέει μέσα στον κύλινδρο.

Available Functions
void open();

Parameters

Αυτή η συνάρτηση δεν δέχεται καμία παράμετρο.

Return Values

Αυτή η συνάρτηση δεν επιστρέφει τιμή.

Examples
// Open the solenoid to extend the cylinder
PneumaticsA.open();

close#

Θέτει την πνευματική ηλεκτρομαγνητική βαλβίδα στην κατάσταση κλειστή, σταματώντας τη ροή αέρα στον κύλινδρο.

Available Functions
void close();

Parameters

Αυτή η συνάρτηση δεν δέχεται καμία παράμετρο.

Return Values

Αυτή η συνάρτηση δεν επιστρέφει τιμή.

Examples
// Close the solenoid to retract the cylinder
PneumaticsA.close();