User Tools

Site Tools


getting_started:tutorials:system2

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:system2 [2020/12/03 08:58] ursgrafgetting_started:tutorials:system2 [2026/04/12 15:58] (current) ursgraf
Line 1: Line 1:
 ====== Example with a More Complex Safety System ====== ====== Example with a More Complex Safety System ======
  
-This example shows how to use the safety system. It further uses two inputs and two outputs. For this reason we will use the simulator again, see [[getting_started:install_wrapper#simulator|]]. In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run +This example shows how to use the safety system. It further uses two inputs and two outputs. For this reason we will use the simulator again, see [[getting_started:install_wrapper#simulator|Simulator]].  
 + 
 +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/SystemTest2.cpp|SystemTest2.cpp]].  
 + 
 +Open a shell in the build directory of your EEROS library and run 
 <code> <code>
-sudo LD_LIBRARY_PATH=/home/you/work/compiled/install-x86/lib/ ./system/systemTest2 -c system/SystemTest2Config.json+./examples/system/systemTest2 -c examples/system/SystemTest2Config.json
 </code> </code>
- 
-IMPORTANT You have to run a program using real time threads with root privileges and you have to set your library path so that the simulator library can be found.  
  
 The example comprises a safety system with five different safety levels and six safety events.  The example comprises a safety system with five different safety levels and six safety events. 
-{{ :getting_started:tutorials:safetysystemtest1.png?300 |}}+{{ :getting_started:tutorials:systemtest2ss.png?500 |}}
 The levels and events are defined in the safety properties. The properties further include one critical input ''in1'' and one critical output ''out1''. In order to test and drive them, the configuration file specifies one more input ''inTest'' and one more output ''outTest''. The levels and events are defined in the safety properties. The properties further include one critical input ''in1'' and one critical output ''out1''. In order to test and drive them, the configuration file specifies one more input ''inTest'' and one more output ''outTest''.
 The following events are defined and used in the example: The following events are defined and used in the example:
 ^name^description^registered for safety level^type^when triggered^ ^name^description^registered for safety level^type^when triggered^
-|e1|start initializing|slOff|public event|triggered by the main program immediately after initialization of the safety system| +|seInitializingDone|initialization done|slIinitializing|public event|triggered by a periodic 5 seconds after the executor started| 
-|e2|initialization done|slIinitializing|public event|triggered by a periodic 5 seconds after the executor started| +|seStartRunning|start running|slInitialized|private event|triggered by checking the critical input, this could be an enable button| 
-|e3|start running|slInitialized|private event|triggered by checking the critical input, this could be an enable button| +|seShutDown|start shutting down|slRunning, slInitialized, slIinitializing|public event|triggered by pressing Ctrl-C| 
-|e4|start shutting down|slRunning, slInitialized, slIinitializing|public event|triggered by pressing Ctrl-C| +|seStopRunning|stop running|slRunning|private event|triggered by checking the critical input, this could be an enable button| 
-|e5|stop running|slRunning|private event|triggered by checking the critical input, this could be an enable button| +|seSwitchingOff|switching off|slShuttingDown|private event|triggered by a level action|
-|e6|switching off|slShuttingDown|private event|triggered by a level action|+
  
 The example shows a typical use of safety levels and safety events. The system works as follows: The example shows a typical use of safety levels and safety events. The system works as follows:
getting_started/tutorials/system2.1606982283.txt.gz · Last modified: by ursgraf