getting_started:tutorials:oneaxis
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
getting_started:tutorials:oneaxis [2019/04/25 13:38] – [Part 3: Test Application] graf | getting_started:tutorials:oneaxis [2019/10/14 16:27] – [Test Application] graf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Control a Single Motor ====== | ====== Control a Single Motor ====== | ||
- | This tutorial will show you how to control a single motor using EEROS. This example is located in a separate repository [[https:// | + | This tutorial will show you how to control a single motor using EEROS. This example is located in a separate repository [[https:// |
+ | =====Theoretical Background===== | ||
- | Navigate to the directory '' | + | A motor position is measured by an encoder. After differentiating this signal we obtain the velocity. The input of the velocity controller is the difference between reference and measured velocity. Additionally, |
- | + | ||
- | =====Part 1: Theoretical Background===== | + | |
- | + | ||
- | The motors | + | |
[{{ oneAxis_controlLoop.jpg? | [{{ oneAxis_controlLoop.jpg? | ||
Line 17: | Line 14: | ||
D is the damping factor and we choose it as 0.9. | D is the damping factor and we choose it as 0.9. | ||
- | The input of the velocity controller is the difference between reference and measured velocity. Additionally, | + | =====Experimental Setup===== |
- | + | A maxon motor controller (50V / 5A) delivers the necessary power. The motor we use has the following properties: | |
- | =====Part 2: Experimental Setup===== | + | |
- | As a processing platform we use a regular PC (x86-64) together with a National Instrument card: PCIe - 6251 (M-Series). The card requires the //comedi// library together with the EEROS hardware wrapper, see [[eeros_architecture: | + | |
- | {{ oneAxis_setup.png? | + | |
- | As an alternative we use our cb20 controller board ([[http:// | + | |
- | For both alternatives a maxon motor controller (50V / 5A) delivers the necessary power. The motor we use has the following properties: | + | |
| **Properties** | | **Properties** | ||
Line 30: | Line 22: | ||
^ Encoder Pulses | ^ Encoder Pulses | ||
- | =====Part 3: Test Application===== | + | We use three different platforms for running the Simple Motor Controller. |
- | If have have installed and built EEROS as described in [[getting_started: | + | * [[oneaxis_comedi|]] |
- | You will find two different hardware configuration files. | + | * [[oneaxis_bbb|]] |
- | * HalComedi.json | + | * [[oneaxis_cb20|]] |
- | * HalFlink.json | + | |
+ | =====Build Application===== | ||
+ | |||
+ | - Download | ||
+ | use_custom_application=true | ||
+ | </ | ||
+ | - After cloning with the clone script, navigate to the directory '' | ||
+ | - [[getting_started: | ||
+ | - [[getting_started: | ||
+ | |||
+ | =====Test Application===== | ||
+ | |||
+ | You will find different hardware configuration files depending on the hardware platform. | ||
+ | * HwConfigComedi.json | ||
+ | * HwConfigFlink.json | ||
+ | * HwConfigBBB.json | ||
Start our application by choosing the appropriate configuration file, e.g.: | Start our application by choosing the appropriate configuration file, e.g.: | ||
< | < | ||
- | $ ./ | + | $ sudo ./ |
</ | </ | ||
- | =====Part 4: Implementation===== | + | ===== Develop your own Application ===== |
+ | For further development we recommend to use an integrated development environment as described in [[getting_started:say_hello|]]. You do not have to create a new project, because you already have downloaded and built the simple motor controller project. Hence, you import the project together with the EEROS and wrapper libraries into KDevelop as described in [[getting_started: | ||
+ | |||
+ | |||
+ | =====Implementation===== | ||
==== Control System ==== | ==== Control System ==== | ||
The control system declares in '' | The control system declares in '' | ||
Line 52: | Line 63: | ||
==== Sequencer ==== | ==== Sequencer ==== | ||
- | The sequencer runs a sequence which turns the motor several steps forward. After 20 seconds it will position the motor back to some base position and restart the process. | + | The sequencer runs a sequence which turns the motor each second a tenth of a full turn. |
getting_started/tutorials/oneaxis.txt · Last modified: 2023/04/13 11:29 by ursgraf