getting_started:tutorials:oneaxis
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
getting_started:tutorials:oneaxis [2019/10/08 15:11] – [Experimental Setup] graf | getting_started:tutorials:oneaxis [2021/03/30 09:45] – [Build Application] ursgraf | ||
---|---|---|---|
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:// |
- | + | ||
- | Navigate to the directory '' | + | |
=====Theoretical Background===== | =====Theoretical Background===== | ||
Line 16: | Line 13: | ||
D is the damping factor and we choose it as 0.9. | D is the damping factor and we choose it as 0.9. | ||
- | |||
- | |||
=====Experimental Setup===== | =====Experimental Setup===== | ||
- | A maxon motor controller (50V / 5A) delivers the necessary power. | + | The motor we use has the following properties: |
| **Properties** | | **Properties** | ||
Line 28: | Line 23: | ||
We use three different platforms for running the Simple Motor Controller. | We use three different platforms for running the Simple Motor Controller. | ||
- | * 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_comedi|]] |
- | {{ oneAxis_setup.png? | + | * [[oneaxis_bbb|]] |
- | * A [[https:// | + | * [[oneaxis_cb20|]] |
- | | + | |
+ | =====Build Application===== | ||
+ | |||
+ | - Setup your system as described in [[getting_started:install|]]. Make sure that the entry in '' | ||
+ | custom_application=simple-motor-control | ||
+ | </code> | ||
+ | - After cloning with the clone script, navigate | ||
+ | | ||
+ | | ||
=====Test Application===== | =====Test Application===== | ||
- | If have have installed and built EEROS as described in [[getting_started: | ||
- | You will find two different hardware configuration files. | + | You will find different hardware configuration files depending on the hardware platform. |
- | * HalComedi.json | + | * HwConfigComedi.json |
- | * HalFlink.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 ./ |
</ | </ | ||
+ | The application logs the motor position once per second. By activating the emergency button, the safety system will immediately switch to an emergency state. Deactivating this button causes the system to switch back to running mode. | ||
+ | |||
+ | ===== Develop your own Application Further ===== | ||
+ | For further development we recommend to use an integrated development environment as described in [[getting_started: | ||
+ | |||
=====Implementation===== | =====Implementation===== | ||
Line 51: | Line 59: | ||
==== Safety System ==== | ==== Safety System ==== | ||
Safety levels and events are declared in '' | Safety levels and events are declared in '' | ||
- | [{{ : | + | [{{ : |
Two critical inputs are defined: " | Two critical inputs are defined: " | ||
==== 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