User Tools

Site Tools


getting_started:tutorials:oneaxis

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
getting_started:tutorials:oneaxis [2019/10/14 16:10] – [Control a Single Motor] grafgetting_started:tutorials:oneaxis [2023/04/13 11:29] (current) – [Build Application] ursgraf
Line 13: 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:+The motor we use has the following properties:
  
 |  **Properties**              ^  Value            ^  Unit         ^ |  **Properties**              ^  Value            ^  Unit         ^
Line 28: Line 26:
   * [[oneaxis_bbb|]]     * [[oneaxis_bbb|]]  
   * [[oneaxis_cb20|]]   * [[oneaxis_cb20|]]
 +
 =====Build Application===== =====Build Application=====
  
-  - Install EEROS and necessary hardware libraries as described in [[getting_started:install_and_setup_development_environment|]] +  - Proceed with [[getting_started:write_app|]] and select the right targetScroll down to ''Use Existing Project''
-  - Build [[getting_started:compile_eeros|]], you already have the necessary libraries together with the applicationIf you use ''comedi'' navigate to the build directory of your simple motor control directory. If you use the cb20 board, follow the instruction in [[https://github.com/ntb-ch/cb20]] to download the necessary files to the target.+  - After cloning the project, navigate to the directory ''simple-motor-control'' where you can find the code of the application. 
 +  - [[getting_started:deploy|]] to the target system if necessary.
  
 =====Test Application===== =====Test Application=====
Line 44: Line 44:
 $ sudo ./simpleMotorControl -c HwConfigBBB.json $ sudo ./simpleMotorControl -c HwConfigBBB.json
 </code> </code>
 +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:kdevelop|]]. You do not have to create a new project, because you already have downloaded and built the simple motor controller project. Import the project together with the EEROS and wrapper libraries into KDevelop.
 +
  
 =====Implementation===== =====Implementation=====
Line 51: Line 56:
 ==== Safety System ==== ==== Safety System ====
 Safety levels and events are declared in ''SMCSafetyProperties.hpp''. ''SMCSafetyProperties.cpp'' initializes these objects, defines critical inputs and outputs, defines level actions, and adds the levels to the safety system. The levels and events causing transitions between those levels are shown in the next figure. Safety levels and events are declared in ''SMCSafetyProperties.hpp''. ''SMCSafetyProperties.cpp'' initializes these objects, defines critical inputs and outputs, defines level actions, and adds the levels to the safety system. The levels and events causing transitions between those levels are shown in the next figure.
-[{{ :getting_started:tutorials:safetysystemoneaxis.png?600 |//Safety levels and events//}}]+[{{ :getting_started:tutorials:safetysystemoneaxis.jpg?700 |//Safety levels and events//}}]
  
 Two critical inputs are defined: "emergency" and "readySig1". "enable" is a critical output. Critical inputs and outputs are checked and set by each safety level. For example "enable" is set to ''true'' as soon as the safety level is equal or higher than ''powerOn''. "emergency" is unchecked for the two lowest levels and leads to level change to level ''emergency'' for higher levels.  Two critical inputs are defined: "emergency" and "readySig1". "enable" is a critical output. Critical inputs and outputs are checked and set by each safety level. For example "enable" is set to ''true'' as soon as the safety level is equal or higher than ''powerOn''. "emergency" is unchecked for the two lowest levels and leads to level change to level ''emergency'' for higher levels. 
getting_started/tutorials/oneaxis.1571062217.txt.gz · Last modified: 2019/10/14 16:10 by graf