How can I create program that will persist after an E-Stop event?

This forum post will serve as a guide in order to help you with best practices related to handling E-stops in MachineLogic using Cloud 9.

In order to create programs that are able to persist after E-Stop events, a few things are needed:

1. Configure the MachineMotion controller:

The first step is to configure the MachineMotion controller to prevent program termination upon an E-stop. This is completed by accessing Cloud9 and opening the “mm-config.json” file and turning the “kill_machine_logic_apps_on_estop” flag from ‘‘true’’ to “false”. Please then make sure to save the file (ctrl+s) and reboot the controller by turning it on and off. In order to learn how to access Cloud9, please refer to this guide and by scrolling all the way to the bottom. Please see the below image which provides instructions on how to change the flag from ‘true’ to ‘false’

2. Next in your program, you can use wait commands to wait until the system is out of e-step and the drives are ready before sending motion commands.

a. In command 1., the wait command ‘waits’ at that line until the controller reports it is out of E-stop. This happens by internal services sending a “false” message on the “estop/status” topic.
b. Command 2., waits until the controller’s smart drives are enabled and ready after an E-Stop reset event. If this is not waited for, a motion command can be sent before the drives are ready and since the move will never complete, this could leave the controller stuck.
c. Command 4., Is similar to command 1. but keeps the program in that command until E-Stop is entered and the “estop/status” topic reports “true”.

Please see the below example referring to step 2 of this guide: