Ελεγκτής κινητήρα 55#
Εισαγωγή#
Ο Ελεγκτής Κινητήρα 55 (MC55) χρησιμοποιείται για τον έλεγχο τυπικών κινητήρων συνεχούς ρεύματος.

This page uses mc_55 as the example Motor Controller 55 name. Replace it with your own configured name as needed.
Παρακάτω είναι μια λίστα με τις διαθέσιμες μεθόδους:
spin– Spins a DC motor forward or reverse until stopped.stop– Stops the DC motor immediately.set_velocity– Tells the DC motor how fast to spin.set_stopping– Sets how the DC motor behaves when stopping.set_max_torque– Sets the most torque the DC motor is allowed to use.set_reversed– Sets the DC motor to have its direction be reversed.current– Returns how much electrical current the DC motor is using.temperature– Returns the temperature of the DC motor.
Κατασκευαστής – Χειροκίνητη αρχικοποίηση ενός Ελεγκτή Κινητήρα 55.
Motor55– Creates a Motor Controller 55.
γνέθω#
spin rotates a connected DC motor in a specified direction using the current motor velocity.
Usage:
mc_55.spin(direction, velocity, units)
Παράμετροι |
Περιγραφή |
|---|---|
|
The direction in which to spin the motor:
|
|
Optional. The velocity to spin with from 0% to 100% when using |
|
Optional. The velocity unit:
|
# Spin the motor at -2 volts
mc_55.spin(FORWARD, -2)
στάση#
stop stops the connected DC motor immediately, using the current stopping mode.
Usage:
mc_55.stop(mode)
Παράμετρος |
Περιγραφή |
|---|---|
τρόπος |
Optional. The stopping behavior to use when the motor stops:
If the stopping mode is not specified or previously set, the default behavior is |
set_velocity#
set_velocity tells a DC motor how fast to spin. A higher percentage makes the DC motor spin faster and a lower percentage makes the DC motor spin slower.
Κάθε έργο ξεκινά με κάθε συνδεδεμένο κινητήρα συνεχούς ρεύματος να περιστρέφεται με ταχύτητα 50% από προεπιλογή.
Usage:
mc_55.set_velocity(value, units)
Παράμετρος |
Περιγραφή |
|---|---|
|
The velocity to spin with from 0% to 100% when using |
|
Optional. The velocity unit: |
set_stopping#
set_stopping sets how a DC motor behaves when it stops.
Usage:
mc_55.set_stopping(mode)
Παράμετροι |
Περιγραφή |
|---|---|
|
How the motor will stop:
|
set_max_torque#
Η ροπή δείχνει πόσο δυνατά μπορεί να ωθήσει ή να έλξει ένας κινητήρας συνεχούς ρεύματος ενώ περιστρέφεται.
set_max_torque sets the most torque a DC motor is allowed to use.
Usage:
mc_55.set_max_torque(value, units)
Παράμετροι |
Περιγραφή |
|---|---|
|
The maximum torque the DC motor is allowed to use. This can be an |
|
Optional. The torque unit: |
set_reversed#
set_reversed sets the DC motor to be reversed so that the FORWARD direction will spin clockwise. This method works the same as setting the reverse parameter to True when constructing a Motor55.
Usage:
mc_55.set_reversed(value)
Παράμετροι |
Περιγραφή |
|---|---|
|
Whether the DC motor’s direction is reversed:
|
ρεύμα#
current returns how much electrical current the DC motor is using, measured in amps from 0.0 to 1.2 A. Current is the amount of electricity flowing through the DC motor.
Μια υψηλότερη τιμή ρεύματος σημαίνει ότι ο κινητήρας συνεχούς ρεύματος χρησιμοποιεί περισσότερο ηλεκτρικό ρεύμα. Αυτό μπορεί να συμβεί όταν ο κινητήρας συνεχούς ρεύματος σηκώνει κάτι βαρύ, πιέζει ένα αντικείμενο ή προσπαθεί να κινηθεί όταν αυτό έχει κολλήσει.
Αυτό μπορεί να χρησιμοποιηθεί για να ελέγξετε εάν ο κινητήρας συνεχούς ρεύματος παρουσιάζει δυσκολίες κατά τη διάρκεια μιας κίνησης. Εάν το ρεύμα παραμείνει υψηλό, ο κινητήρας μπορεί να θερμανθεί ή να χρησιμοποιήσει την ισχύ λιγότερο αποτελεσματικά.
Usage:
mc_55.current(units)
Παράμετροι |
Περιγραφή |
|---|---|
|
Optional. The current unit: |
θερμοκρασία#
temperature returns the temperature of the DC motor.
Η θερμοκρασία του κινητήρα δείχνει πόσο ζεστός είναι ο κινητήρας συνεχούς ρεύματος. Μια υψηλότερη θερμοκρασία σημαίνει ότι ο κινητήρας συνεχούς ρεύματος θερμαίνεται κατά τη λειτουργία του. Ο κινητήρας θα πρέπει να παραμένει κάτω από τους 55°C για να συνεχίσει να λειτουργεί σε πλήρη απόδοση.
Εάν ο κινητήρας συνεχούς ρεύματος υπερθερμανθεί, θα μειώσει το μέγιστο ρεύμα του για να προστατευτεί. Στους 70°C, ο κινητήρας θα σταματήσει να λειτουργεί μέχρι να κρυώσει.
Αυτό μπορεί να χρησιμοποιηθεί για να ελέγξετε εάν ο κινητήρας συνεχούς ρεύματος υπερθερμαίνεται κατά τη διάρκεια επαναλαμβανόμενων κινήσεων, μεγάλων λειτουργιών ή όταν πιέζει ένα αντικείμενο.
Usage:
mc_55.temperature(units)
Παράμετροι |
Περιγραφή |
|---|---|
|
Optional. The temperature unit:
|
Κατασκευαστές#
Constructors are used to manually create Motor55 objects, which are necessary for configuring a Motor Controller 55 outside of VEXcode.
Motor55#
Motor55 creates a Motor Controller 55.
Usage:
Motor55(port, reverse)
Παράμετρος |
Περιγραφή |
|---|---|
|
The 3-Wire Port that the Motor Controller 55 is connected to:
|
|
Optional. Sets whether the motor’s spin should be reversed.
|
# Create a Motor Controller 55 in Port A
mc_55 = Motor55(brain.three_wire_port.a)