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

ভূমিকা#

VEX V5 ব্রেইন pneumatic ক্লাস ব্যবহার করে CTE নিউম্যাটিক সিস্টেম নিয়ন্ত্রণ করতে পারে। এই ক্লাসটি ব্রেইনকে নিউম্যাটিক পাম্প নিয়ন্ত্রণ করতে এবং নিউম্যাটিক সিলিন্ডার প্রসারিত বা সংকুচিত করতে দেয়।

দ্রষ্টব্য: CTE নিউম্যাটিক কমান্ডগুলির জন্য CTE মডিউল প্রয়োজন। এটি ইম্পোর্ট করতে using namespace cte; . ব্যবহার করুন।

ক্লাস কনস্ট্রাক্টর#

pneumatic( 
  int32_t index );

ক্লাস ডেস্ট্রাক্টর#

pneumatic অবজেক্টটি ধ্বংস করে এবং সংশ্লিষ্ট রিসোর্সসমূহ মুক্ত করে।

~pneumatic();

প্যারামিটার#

প্যারামিটার

প্রকার

বর্ণনা

index

int32_t

যে স্মার্ট পোর্টের সাথে CTE নিউম্যাটিক সোলেনয়েডটি সংযুক্ত থাকে (যেমন, পোর্ট ১)।

নোট#

  • CTE নিউম্যাটিক কমান্ডগুলো শুধুমাত্র CTE নিউম্যাটিক যন্ত্রাংশগুলোর সাথেই কাজ করবে।

  • আপনাকে অবশ্যই ম্যানুয়ালি CTE মডিউলটি ইম্পোর্ট করতে হবে: using namespace cte;.

  • সিস্টেমটি সর্বোচ্চ ৪টি সিলিন্ডারকে আলাদাভাবে অথবা একসাথে নিয়ন্ত্রণ করতে পারে।

উদাহরণ#

using namespace cte;

// Create a CTE Pneumatic Solenoid in Port 1
pneumatic ctePneumatic1 = pneumatic(PORT1);

// Turn on the pump and extend cylinder 1
ctePneumatic1.pump_on();
ctePneumatic1.extend(cylinder1);

সদস্যদের কার্যাবলী#

pneumatic ক্লাসে নিম্নলিখিত সদস্য ফাংশনগুলো অন্তর্ভুক্ত রয়েছে:

  • extend — একটি সিলিন্ডার প্রসারিত করুন।

  • retract — একটি সিলিন্ডার প্রত্যাহার করুন।

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

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

  • pump — নিউম্যাটিক পাম্পটি চালু বা বন্ধ করে।

  • installed — সোলেনয়েডটি মস্তিষ্কের সাথে সংযুক্ত আছে কি না তা ফেরত দেয়।

যেকোনো pneumatic মেম্বার ফাংশন কল করার আগে, pneumatic ইনস্ট্যান্স অবশ্যই তৈরি করতে হবে, যেমনটি নিচে দেখানো হয়েছে:

using namespace cte;

/* This constructor is required to use a
CTE Pneumatic Solenoid. Replace the values
as needed. */

// Create the pneumatic instance on Port 1
pneumatic ctePneumatics1 = pneumatic(PORT1);

extend#

একটি বায়ুচালিত সিলিন্ডারকে প্রসারিত করে।

Available Functions
void extend( 
  cylinderType id );

Parameters

প্যারামিটার

প্রকার

বর্ণনা

id

cylinderType

যে সিলিন্ডারটি প্রসারিত করতে হবে:

  • cylinder1
  • cylinder2
  • সিলিন্ডারcylinder3
  • cylinder4
  • cylinderAll – সব ৪টি সিলিন্ডার

Return Values

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

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

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

retract#

একটি বায়ুচালিত সিলিন্ডারকে গুটিয়ে নেয়।

Available Functions
void retract( 
  cylinderType id );

Parameters

প্যারামিটার

প্রকার

বর্ণনা

id

cylinderType

যে সিলিন্ডারটি গুটাতে হবে:

  • cylinder1
  • cylinder2
  • cylinder3
  • cylinder4
  • cylinderAll – ৪টি সিলিন্ডারই

Return Values

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

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

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

pump_on#

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

Available Functions
void pump_on();

Parameters

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

Return Values

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

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

pump_off#

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

Available Functions
void pump_off();

Parameters

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

Return Values

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

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

pump#

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

Available Functions
void pump( 
  bool state );

Parameters

প্যারামিটার

প্রকার

বর্ণনা

state

bool

যে অবস্থাটি নির্ধারণ করতে হবে: true নিউম্যাটিক পাম্প চালু করে। false নিউম্যাটিক পাম্প বন্ধ করে।

Return Values

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

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

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

installed#

সিটিই নিউম্যাটিক সোলেনয়েডটি মস্তিষ্কের সাথে সংযুক্ত আছে কিনা তা জানায়।

Available Functions
bool installed();

Parameters

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

Return Values

সোলেনয়েডটি ব্রেইনের সাথে সংযুক্ত আছে কি না, তা নির্দেশ করে একটি বুলিয়ান মান প্রদান করে।

  • true যদি সোলেনয়েডটি মস্তিষ্কের সাথে সংযুক্ত থাকে।

  • false যদি সোলেনয়েডটি মস্তিষ্কের সাথে সংযুক্ত না থাকে।

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