User Tools

Site Tools


getting_started:tutorials:system3

Differences

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

Link to this comparison view

Next revision
Previous revision
getting_started:tutorials:system3 [2020/12/03 08:59] – created ursgrafgetting_started:tutorials:system3 [2021/03/29 20:35] (current) ursgraf
Line 1: Line 1:
 ====== Triggering Safety Event from Control System ====== ====== Triggering Safety Event from Control System ======
  
-In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run +In the EEROS library you will find a directory with examples. For this example see [[https://github.com/eeros-project/eeros-framework/blob/master/examples/system/SystemTest3.cpp|SystemTest3.cpp]].  
 + 
 +Open a shell in the build directory of your EEROS library and run 
 <code> <code>
 $ sudo ./examples/system/systemTest3 $ sudo ./examples/system/systemTest3
Line 11: Line 13:
 Pay attention to the following points: Pay attention to the following points:
   * The time domain of the control system is run by a periodic object. A lambda function serves as monitor function of this periodic. It outputs the integrator signal once every second.    * The time domain of the control system is run by a periodic object. A lambda function serves as monitor function of this periodic. It outputs the integrator signal once every second. 
-  * The safety properties and the control system are defined in separate classes. The safety system needs a reference to the control system in order to start the integrator or to reset the signal checker. On the other side the control system uses a reference to the safety system to allow its signal checker to trigger a safety event. The two classes have to be carefully designed to allow for this reciprocal referencing. One of the references has to be a pointer which must be assigned after the two objects are definedFurther, the definition of the constructor of the safety system must be placed only after the declaration of both classes. And last, a forward declaration of the control system is necessary at the beginning. +  * The safety properties and the control system are defined in separate classes. The safety system needs a reference to the control system in order to start the integrator or to reset the signal checker. On the other side the control system uses a reference to the safety system to allow its signal checker to trigger a safety event. After creating both control and safety system, the proper safety event must be registered for the check block in the control system with <code cpp>cs.checker.registerSafetyEvent(sssp.seReset);  
 +cs.checker.setActiveLevel(sp.slRampingUp);</code> The second line configures the signal checker that it fires only if the active safety level is equal or greater that ''slRampingUp''.
  
getting_started/tutorials/system3.1606982372.txt.gz · Last modified: 2020/12/03 08:59 by ursgraf