User Tools

Site Tools


getting_started:practical_problems:monitor

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:practical_problems:monitor [2018/04/18 22:04] grafgetting_started:practical_problems:monitor [2018/05/31 12:02] (current) graf
Line 1: Line 1:
 ====== Determine the Realtime Performance of your Application ====== ====== Determine the Realtime Performance of your Application ======
 It is of general interest to know whether your system fulfills your realtime requirements. As soon as a control system does not run reliably the question is in the room if your control algorithm has a bug or whether your underlying system does not perform as it is intended. \\ It is of general interest to know whether your system fulfills your realtime requirements. As soon as a control system does not run reliably the question is in the room if your control algorithm has a bug or whether your underlying system does not perform as it is intended. \\
-For this purpose you can use [[tools:monitor:start|]]. It will give you precise measurements of the performance of your system. \\ \\ +For this purpose you can use [[tools:monitor:start|]]. It will give you precise measurements of the performance of your system. 
-For a certain type of safety critical robots, it is desirable to change into a safe level in case of the jitter in periodicity of a time domain or the safety system itself to exceed a certain level. This could be achieved by using the monitor functions of the timer, see [[tools:monitor:start|]]. \\+
  
-Assign your timedomain to a periodic with the same sampling time. Then, add a monitor function, which periodically checks for the maximum and triggers a specific safety event. 
- 
-<code cpp> 
-eeros::control::Timedomain timedomain("time domain", dt, true); 
-eeros::task::Periodic periodic("control system",dt, timedomain); 
- 
-periodic.monitors.push_back([=](PeriodicCounter &c, Logger<LogWriter> &log) { 
-  if (c.period.max >= dt) safetySystem.triggerEvent(myEvent); 
-}); 
- 
-eeros::Executor::instance().add(periodic); 
-</code> 
-Make sure to add the periodic to the executor. Usually you add the timedomain to the executor and its associated periodic is generated internally. However, in this case, we have to declare the periodic explicitely in order to be able to assign the monitor function. 
getting_started/practical_problems/monitor.1524081890.txt.gz · Last modified: 2018/04/18 22:04 by graf