ന്യൂമാറ്റിക്സ്#

ആമുഖം#

pneumatics ക്ലാസ് ഉപയോഗിച്ച് VEX IQ ബ്രെയിനിന് VEX IQ ന്യൂമാറ്റിക് സിസ്റ്റം നിയന്ത്രിക്കാൻ കഴിയും. ന്യൂമാറ്റിക് പമ്പ് നിയന്ത്രിക്കാനും ന്യൂമാറ്റിക് സിലിണ്ടറുകൾ നീട്ടാനോ പിൻവലിക്കാനോ ഈ ക്ലാസ് ബ്രെയിനിനെ അനുവദിക്കുന്നു.

ക്ലാസ് കൺസ്ട്രക്‌ടറുകൾ#

pneumatics( 
  int32_t index );

ക്ലാസ് ഡിസ്ട്രക്റ്റർ#

pneumatics വസ്തുവിനെ നശിപ്പിക്കുകയും അനുബന്ധ വിഭവങ്ങൾ പുറത്തുവിടുകയും ചെയ്യുന്നു.

~pneumatics();

പാരാമീറ്ററുകൾ#

പാരാമീറ്റർ

ടൈപ്പ് ചെയ്യുക

വിവരണം

index

int32_t

ന്യൂമാറ്റിക് സോളിനോയിഡ് ബന്ധിപ്പിച്ചിരിക്കുന്ന സ്മാർട്ട് പോർട്ട്, PORTxഎന്ന് എഴുതിയിരിക്കുന്നു, ഇവിടെ x എന്നത് പോർട്ട് നമ്പറാണ് (ഉദാഹരണത്തിന്, PORT1).

ഉദാഹരണം#

// Create the pneumatics instance on Port 1
pneumatics Pneumatic1 = pneumatics(PORT1);

അംഗ പ്രവർത്തനങ്ങൾ#

pneumatics ക്ലാസിൽ ഇനിപ്പറയുന്ന അംഗ പ്രവർത്തനങ്ങൾ ഉൾപ്പെടുന്നു:

  • extend — ഒരു സിലിണ്ടർ എക്സ്റ്റെൻഡ് ചെയ്യുക.

  • retract — ഒരു സിലിണ്ടർ പിൻവലിക്കുക.

  • pump_on — ന്യൂമാറ്റിക് പമ്പ് ഓണാക്കുന്നു.

  • pump_off — ന്യൂമാറ്റിക് പമ്പ് ഓഫ് ചെയ്യുന്നു.

  • pump — ന്യൂമാറ്റിക് പമ്പ് ഓൺ അല്ലെങ്കിൽ ഓഫ് ചെയ്യുന്നു.

  • installed — സോളിനോയിഡ് തലച്ചോറുമായി ബന്ധിപ്പിച്ചിട്ടുണ്ടോ ഇല്ലയോ എന്ന് നൽകുന്നു.

ഏതെങ്കിലും pneumatics അംഗ ഫംഗ്ഷനുകൾ വിളിക്കുന്നതിന് മുമ്പ്, താഴെ കാണിച്ചിരിക്കുന്നതുപോലെ ഒരു pneumatics ഉദാഹരണം സൃഷ്ടിക്കണം:

/* This constructor is required to use an
IQ Pneumatics Solenoid. Replace the values
as needed. */

// Create the pneumatics instance on Port 1
pneumatics Pneumatic1 = pneumatics(PORT1);

extend#

ഒരു ന്യൂമാറ്റിക് സിലിണ്ടർ നീട്ടുന്നു.

Available Functions
void extend( 
  cylinderType id );

Parameters

പാരാമീറ്റർ

ടൈപ്പ് ചെയ്യുക

വിവരണം

id

cylinderType

നീട്ടേണ്ട സിലിണ്ടർ:

  • cylinder1
  • cylinder2
  • cylinderAll - രണ്ട് സിലിണ്ടറുകളും

Return Values

ഈ ഫംഗ്ഷൻ ഒരു മൂല്യം തിരികെ നൽകുന്നില്ല.

Examples
// Extend cylinder 1
Pneumatic1.extend(cylinder1);

// Extend all cylinders
Pneumatic1.extend(cylinderAll);

retract#

ഒരു ന്യൂമാറ്റിക് സിലിണ്ടർ പിൻവലിക്കുന്നു.

Available Functions
void retract( 
  cylinderType id );

Parameters

പാരാമീറ്റർ

ടൈപ്പ് ചെയ്യുക

വിവരണം

id

cylinderType

പിൻവലിക്കേണ്ട സിലിണ്ടർ:

  • cylinder1
  • cylinder2
  • cylinderAll - രണ്ട് സിലിണ്ടറുകളും

Return Values

ഈ ഫംഗ്ഷൻ ഒരു മൂല്യം തിരികെ നൽകുന്നില്ല.

Examples
// Retract cylinder 2
Pneumatic1.retract(cylinder2);

// Retract all cylinders
Pneumatic1.retract(cylinderAll);

pump_on#

ന്യൂമാറ്റിക് പമ്പ് ഓണാക്കുന്നു.

Available Functions
void pump_on();

Parameters

ഈ ഫംഗ്ഷന് പാരാമീറ്ററുകൾ ഇല്ല.

Return Values

ഈ ഫംഗ്ഷൻ ഒരു മൂല്യം തിരികെ നൽകുന്നില്ല.

Examples
// Turn the pneumatic pump on
Pneumatic1.pump_on();

pump_off#

ന്യൂമാറ്റിക് പമ്പ് ഓഫ് ചെയ്യുന്നു.

Available Functions
void pump_off();

Parameters

ഈ ഫംഗ്ഷന് പാരാമീറ്ററുകൾ ഇല്ല.

Return Values

ഈ ഫംഗ്ഷൻ ഒരു മൂല്യം തിരികെ നൽകുന്നില്ല.

Examples
// Turn the pneumatic pump off
Pneumatic1.pump_off();

pump#

ന്യൂമാറ്റിക് പമ്പ് ഓൺ അല്ലെങ്കിൽ ഓഫ് ചെയ്യുന്നു.

Available Functions
void pump( 
  bool state );

Parameters

പാരാമീറ്റർ

ടൈപ്പ് ചെയ്യുക

വിവരണം

state

bool

സജ്ജമാക്കേണ്ട അവസ്ഥ: true ന്യൂമാറ്റിക് പമ്പ് ഓണാക്കുന്നു. false ന്യൂമാറ്റിക് പമ്പ് ഓഫാക്കുന്നു.

Return Values

ഈ ഫംഗ്ഷൻ ഒരു മൂല്യം തിരികെ നൽകുന്നില്ല.

Examples
// Turn the pump on
Pneumatic1.pump(true);

// Turn the pump off
Pneumatic1.pump(false);

installed#

ന്യൂമാറ്റിക് സോളിനോയിഡ് തലച്ചോറുമായി ബന്ധിപ്പിച്ചിട്ടുണ്ടോ എന്ന് നൽകുന്നു.

Available Functions
bool installed();

Parameters

ഈ ഫംഗ്ഷന് പാരാമീറ്ററുകൾ ഇല്ല.

Return Values

സോളിനോയിഡ് തലച്ചോറുമായി ബന്ധിപ്പിച്ചിട്ടുണ്ടോ ഇല്ലയോ എന്ന് സൂചിപ്പിക്കുന്ന ഒരു ബൂളിയൻ നൽകുന്നു.

  • സോളിനോയിഡ് തലച്ചോറുമായി ബന്ധിപ്പിച്ചിട്ടുണ്ടെങ്കിൽ true.

  • സോളിനോയിഡ് തലച്ചോറുമായി ബന്ധിപ്പിച്ചിട്ടില്ലെങ്കിൽ false.

Examples
// Check if the pneumatic solenoid is connected
if (Pneumatic1.installed()) {
  // Pneumatic system is ready
  Pneumatic1.pump_on();
}