eeros_architecture:safety_system:start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
eeros_architecture:safety_system:start [2016/11/03 17:27] – [Events] graf | eeros_architecture:safety_system:start [2023/02/26 17:59] (current) – [How it works] ursgraf | ||
---|---|---|---|
Line 8: | Line 8: | ||
- has a unique name | - has a unique name | ||
- defines the state of all critical outputs | - defines the state of all critical outputs | ||
- | - defines conditions | + | - defines conditions |
- | - can have accept certain events | + | - can accept certain events |
- can cause events | - can cause events | ||
* The order of the safety level numbering corresponds to the potential damage in case of an error | * The order of the safety level numbering corresponds to the potential damage in case of an error | ||
Line 20: | Line 20: | ||
Events are exclusively received and handled by the safety system. An event can cause a change of the safety level. Such a change can happen only if this specific event was registered for the current level. The next figure shows a couple of safety levels together with associated events causing a level change. | Events are exclusively received and handled by the safety system. An event can cause a change of the safety level. Such a change can happen only if this specific event was registered for the current level. The next figure shows a couple of safety levels together with associated events causing a level change. | ||
{{ .: | {{ .: | ||
+ | |||
+ | * If the safety system itself causes an event leading to a change of the safety level, this level change takes place only after the safety system completes this run. | ||
+ | * Multiple events fired during a single safety period would lead to ambiguities. The event leading to a lower prioritized safety level wins, while the other events are cancelled. | ||
+ | |||
+ | ===== What does the Safety System do ? ===== | ||
+ | The most important function of the safety system is its run method. This method is called periodically by the executor. Here's how it works: | ||
+ | <code cpp> | ||
+ | void SafetySystem:: | ||
+ | |||
+ | // 1) Read inputs and check them | ||
+ | for(auto ia : level-> | ||
+ | if(ia != nullptr) ia-> | ||
+ | } | ||
+ | | ||
+ | // 2) Execute level action | ||
+ | if(level-> | ||
+ | | ||
+ | // 3) Set outputs | ||
+ | for(auto oa : level-> | ||
+ | if(oa != nullptr) oa-> | ||
+ | } | ||
+ | } | ||
+ | </ | ||
If you want to learn more about the individual parts of the safety system, look at the links below: | If you want to learn more about the individual parts of the safety system, look at the links below: | ||
- | *[[.: | + | |
- | *[[.: | + | *[[.: |
- | *[[.: | + | *[[.: |
- | *[[.:usage|Creation]] | + | *[[.:usage|Setup a Safety System]] |
eeros_architecture/safety_system/start.1478190429.txt.gz · Last modified: 2016/11/03 17:27 (external edit)