User Tools

Site Tools


getting_started:tutorials:controlsystem1

Differences

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

Link to this comparison view

Last revisionBoth sides next revision
getting_started:tutorials:controlsystem1 [2016/10/23 10:29] – created grafgetting_started:tutorials:controlsystem1 [2016/10/24 17:14] graf
Line 1: Line 1:
 ====== Control System with One Time Domain ====== ====== Control System with One Time Domain ======
-A simple control system consists of a single time domain which has to be run periodically by the excutor. Write your main program as follows. First you have to define the executor and set ist own speed. The executor runs its own periodic task, the main task+In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run ''examples/controlsystem/PeriodicExample1''
-<code cpp> +This examples does
-  eeros::Executor &executor = eeros::Executor::instance();  +  * Creates a main task //ss// with an execution period of five millisecondsThe task itself is defined of type ''Lambda'' with a run method given by an empty lambda function 
-  executor.setPeriod(0.001); // runs every millisecond +  * Creates a time domain //t1// with a period of five milliseconds. 
-</code>+
  
 +Both harmonic tasks have a periodic counter which measure its periods and run times. Once every 1000th run the results are logged. The results are printed in units of seconds. 
 +Additionally both harmonics have a default monitor function added. This monitor function logs a warning if the measured period differs more than 5%. Depending on your hardware platform and realtime support of your operating system you might get no warnings, several or many warnings.