নিউম্যাটিক্স#

ভূমিকা#

VEX IQ ব্রেইন, pneumatics ক্লাস ব্যবহার করে 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 — একটি সিলিন্ডার প্রত্যাহার করুন।

  • pumpOn — Turns the pneumatic pump on.

  • pumpOff — Turns the pneumatic 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

The cylinder to retract:

  • cylinder1
  • cylinder2
  • cylinderAll – Both cylinders

Return Values

এই ফাংশনটি কোনো মান ফেরত দেয় না।

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

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

pumpOn#

নিউম্যাটিক পাম্পটি চালু করে।

Available Functions
void pumpOn();

Parameters

এই ফাংশনটির কোনো প্যারামিটার নেই।

Return Values

এই ফাংশনটি কোনো মান ফেরত দেয় না।

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

pumpOff#

নিউম্যাটিক পাম্পটি বন্ধ করে দেয়।

Available Functions
void pumpOff();

Parameters

এই ফাংশনটির কোনো প্যারামিটার নেই।

Return Values

এই ফাংশনটি কোনো মান ফেরত দেয় না।

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

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.pumpOn();
}