LogixNG Tutorial - Chapter 19

# LogixNG Tutorial - Chapter 19 These examples are not implemented yet and doesn't exist in the source tree. ## Some examples This chapter has some examples on what you can do with LogixNG. It's intended to give some ideas on what you can do. ### Save the panels when JMRI quits The actions OnQuit and StorePanels can be used to save the panel when JMRI quits. It may be useful if you are afraid of forgetting to save your work after you have made changes, or if you want to save the memories when JMRI quits. It's highly recommended to keep a backup of the panels since this might go wrong if you are unlucky.
    OnQuit
    ? DenyQuit -
    ! DoQuit - StorePanels
### Don't allow JMRI to quit if the bridge at the door is not open Lets assume you have a lift out bridge on your model railroad in front of the door where you exit the model railroad room. And that this lift out bridge has a sensor that tells JMRI whenether it's open or closed. And lets assume that you don't want to be able to quit JMRI unless this bridge is open (removed) to ensure you can leave the room. The action OnQuit allows you to implement this. OnQuit has a child expression DenyQuit and if this expression returns True, OnQuit will block JMRI from quitting. We can also use this action to turn off power to the layout when JMRI quits.
    OnQuit
    ? DenyQuit - ExpressionSensor: Is IS2 active?
    ! DoQuit - Power: Set power off