In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run
$ sudo ./examples/system/systemTest3
You have to run a program using real time threads with root privileges. We do not use the simulator in this example, hence there is no need to set the library path.
The example comprises a safety system with only two safety levels and two safety events. The system will start in the safety level
slStart. It will stay there for three seconds after which a safety event is triggered which causes a level change to
slRampingUp. The control system for this example consists of three block as shown below:
When the system changes into
slRampingUp the integrator is enabled. The output of the integrator starts to ramp up. As soon as the signal reaches the upper limit of the signal checker block the safety event
seReset is triggered by this block. This causes a restart of the whole sequence.
Pay attention to the following points:
cs.checker.registerSafetyEvent(ss, sp.seReset); cs.checker.setActiveLevel(sp.slRampingUp);
The second line configures the signal checker that it fires only if the active safety level is equal or greater that