I looked over the code and found what is the expected behavior of M2Controller when there are no errors when we try to enable the contorller.
These are the steps that happen when we try to enable the controller, we see the "On error" case:
This code handles the state transition from the MANUAL_STANDBY state to the MANUAL_ENABLED/OPEN_LOOP_CONTROL state.
|
1. Check to make sure the cRIO is online. It is an error if it is not.
|
2. Distribute the configuration data throughout the system.
|
3. Set the control-loop mode to IDLE.
|
4. Power up both power busses going to the cell electronics and actuator control.
|
5. Initialize the cell electronics.
|
6. Set the control-loop mode to OPEN-LOOP.
|
7. Enable telemetry logging.
|
8. Change the state to the MANUAL_ENABLED/OPEN_LOOP_CONTROL state.
|
9. Enable the faults/warnings appropriate for the ENABLED state.
|
|
On error:
|
|
1. Turn off motor power.
|
2. Don't change the state.
|

This Monday I will go to the summit