Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
de:software:homelab:library:module:motor [2010/10/29 13:12] Wemberde:software:homelab:library:module:motor [2020/07/20 12:00] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Motoren ====== ====== Motoren ======
  
-//Related to: [HW] [[en:hardware:homelab:motor]]//+//Bezug nehmend auf: [HW] [[en:hardware:homelab:motor]]//
  
-Diese Bibliothek enthält Funktionen um die verschiedenen HomeLab Motoren zu kontrollierenEs gibt Funktionen für die DC, Stepper und Servomotoren,+Diese Bibliothek enthält Funktionen zur Steuerung der verschiedenen HomeLab Motoren. Sie enthält Funktionen für Gleichstrom- (DC-)Schritt- und Servomotoren,
  
 ===== Funktionen ===== ===== Funktionen =====
  
   * **//void dcmotor_init(unsigned char index)//** \\   * **//void dcmotor_init(unsigned char index)//** \\
-    Initializes one of the DC motor controllersParameters+    Initialisiert einen der Controller für die DC MotorenParameter
-    * //index// - Index of motor controller. 0 to 3.+    * //index// - Index des Motorencontrollers. 0 bis 3.
  
   * **//void dcmotor_drive(unsigned char index, signed char direction)//** \\   * **//void dcmotor_drive(unsigned char index, signed char direction)//** \\
-    Drives one of the DC motor controllersParameters+    Betriebt einen der Controller der DC MotorenParameter
-    * //index// - Index of motor controller. 0 to 3. +    * //index// - Index des Motorencontrollers. 0 bis 3. 
-    * //direction//Motor polarity. -1, 0 or +1. In case of motor is stoppedotherwise it turns in given direction.+    * //direction//Polarität des Motors. -1, 0 oder +1. Bei wird der Motor angehaltenansonsten bewegt er sich in die vorgegebene Richtung.
  
   * **//void unipolar_init(unsigned char index)//** \\   * **//void unipolar_init(unsigned char index)//** \\
-    Initializes one of the unipolar stepper motor controllersParameters+    Initialisiert den Controller eines der unipolaren SchrittmotorenParameter
-    * //index// - Index of motor controller. 0 or 1.+    * //index// - Index des Motorencontrollers. 0 oder 1.
  
   * **//void unipolar_halfstep(unsigned char index, signed char direction, unsigned short num_steps, unsigned char speed)//** \\   * **//void unipolar_halfstep(unsigned char index, signed char direction, unsigned short num_steps, unsigned char speed)//** \\
-    Unipolar stepper motor half-stepping commandFunctions is blocking as it is fulfilled as long as steps are doneParameters: +    Befehl zum Halbschrittbetrieb für unipolaren Schrittmotor. Die Funktion ist blockierend bis sie erfüllt ist, bis alle Schritte durchgeführt wurdenParameter
-    * //index// - Index of motor controller. 0 or 1. +    * //index// - Index des Motorencontrollers. 0 oder 1. 
-    * //direction//Directions of rotation. -1 or +1. +    * //direction//Rotationsrichtung. -1 oder +1. 
-    * //num_steps//Count of half-steps+    * //num_steps//Zählen der Halbschritte
-    * //speed// - Time of a single step in milliseconds.+    * //speed// - Zeit eines einzelnen Schritts in Millisekunden.
  
   * **//void bipolar_init(void)//** \\   * **//void bipolar_init(void)//** \\
-    Initializes bipolar stepper motor controller+    Initialisiert den Controller des bipolaren Schrittmotors
 +    
   * **//void bipolar_halfstep(signed char direction, unsigned short num_steps, unsigned char speed)//** \\   * **//void bipolar_halfstep(signed char direction, unsigned short num_steps, unsigned char speed)//** \\
-    Bipolar stepper motor half-stepping commandFunctions is blocking as it is fulfilled as long as steps are doneParameters+    Befehl zum Halbschrittbetrieb für bipolaren SchrittmotorDie Funktion ist blockierend bis sie erfüllt ist, bis alle Schritte durchgeführt wurdenParameter
-    * //direction//Directions of rotation. -1 or +1. +    * //direction//Rotationsrichtung . -1 oder +1. 
-    * //num_steps//Count of half-steps+    * //num_steps//Zählen der Halbschritte
-    * //speed// - Time of a single step in milliseconds.+    * //speed// - Zeit eines einzelnen Schritts in Millisekunden.
  
   * **//void servomotor_init(unsigned char index)//** \\   * **//void servomotor_init(unsigned char index)//** \\
-    Initializes one of a servo motor PWM signal generations units in ATmega128 timer 1. PWM signal is 50 hz with high period of 1.5 ms ± 0.5 ms. Parameters+    Initialisiert eine der PWM Signal-generierenden Einheiten eines Servomotors des ATmega128 Timers 1. Das PWM Signal beträgt 50 hz bei einer high period of 1.5 ms ± 0.5 ms. Parameter
-    * //index// - Index of servo motor. 0 or 1.+    * //index// - Index des Servomotors. 0 oder 1.
  
   * **//void servomotor_position(unsigned char index, signed short position)//** \\   * **//void servomotor_position(unsigned char index, signed short position)//** \\
-    Servo motor pulse width control commandIf positioning servo motor is driven, its position is altered, if rotating oneits rotation speed is alteredParameters+    Takt des Servomotors mit KontrollbefehlDie Position eines Servomotors verändert sich wenn dieser betrieben wird. Wird er gedrehtverändert sich seine DrehzahlParameter
-    * //index// - Index of servo motor. 0 or 1. +    * //index// - Index des Servomotors. 0 oder 1. 
-    * //position// - Position or rotation speed. -100 to +100. 0 corresponds to stop.+    * //position// - Position oder Drehzahl. -100 bis +100. Bei stoppt der Motor.
  
 ===== Beispiel ===== ===== Beispiel =====
  
-Das folgende Programm veranschaulicht das Nutzen von DC, Stepper und Servomotoren.+Nutzung von Gleichstrom- (DC-)Schritt- und Servomotoren.
  
 <code c> <code c>
Line 54: Line 54:
 int main(void) int main(void)
 { {
- // DC motors initialization.+ // Initialisierung der DC Motoren.
  dcmotor_init(0);  dcmotor_init(0);
  dcmotor_init(1);  dcmotor_init(1);
  
- // Bipolar stepper initialization.+ // Initialisierung des bipolaren Schrittmotors.
  bipolar_init();  bipolar_init();
  
- // Servo motors initialization.+ // Initialisierung der Servomotoren.
  servomotor_init(0);  servomotor_init(0);
  servomotor_init(1);  servomotor_init(1);
  
- // One DC motors drives forwardanother in backward direction.+ // Ein DC Motor fährt vorwärtsein anderer rückwärts.
  dcmotor_drive(0, -1);  dcmotor_drive(0, -1);
  dcmotor_drive(1, +1);  dcmotor_drive(1, +1);
  
- // Rotating the stepper motor 100 steps in one direction + // Bewegt den Schrittmotor 100 Schritte in eine Richtung 
- // and then back with twice the speed.+ // und daraufhin zurück mit doppelter Geschwindigkeit.
  bipolar_halfstep(1, 100, 50);  bipolar_halfstep(1, 100, 50);
  bipolar_halfstep(-1, 100, 25);  bipolar_halfstep(-1, 100, 25);
  
- // Rotating servo motors in opposite directions.+ // Bewegt Servomotoren in entgegengesetzte Richtungen.
  servomotor_position(0, -100);  servomotor_position(0, -100);
  servomotor_position(1, +100);  servomotor_position(1, +100);
 } }
 </code> </code>
de/software/homelab/library/module/motor.1288347153.txt.gz · Last modified: (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0