5.6 Robot State Transition ============================== The command standby state (STATE_STANDBY) is the basic state in which the robot is ready for control. When a control command is received from the user, the robot automatically switches to STATE_HOMMING, STATE_MOVING, or STATE_TEACHING to carry out the motion, and if the motion completes without error, it switches back to STATE_STANDBY and waits for user commands. Pressing the E-stop puts the controller in STATE_EMERGENCY_STOP from any state, including STATE_INITIALIZING. When an internal function or motion error occurs in the robot controller, the controller switches to the SAFE_OFF state (motor and brake power cut-off) or SAFE_STOP state (control stop) and the robot stops. Also, for safety, the following state transitions should be made directly by the user, and they are executed with the set_robot_control function. - STATE_SAFE_STOP → STATE_STANDBY: CONTROL_RESET_SAFE_STOP - STATE_SAFE_OFF → STATE_STANDBY: CONTROL_RESET_SAFE_OFF - STATE_SAFE_STOP2 → STATE_RECOVERY: CONTROL_RECOVERY_SAFE_STOP - STATE_SAFE_OFF2 → STATE_RECOVERY: CONTROL_RECOVERY_SAFE_OFF - STATE_RECOVERY → STATE_STANDBY: CONTROL_RESET_RECOVERY