diff --git a/docs/src/config/python-interface.adoc b/docs/src/config/python-interface.adoc index d9bd12cd54f..7eb85883636 100644 --- a/docs/src/config/python-interface.adoc +++ b/docs/src/config/python-interface.adoc @@ -369,7 +369,9 @@ see <> for an example. task paused flag. *task_state*:: '(returns integer)' - - current task state. One of `STATE_ESTOP`, `STATE_ESTOP_RESET`, `STATE_ON`, `STATE_OFF`. + current task state. One of `STATE_ESTOP`, `STATE_ESTOP_RESET`, `STATE_ON`. + `STATE_OFF` is never returned: when the machine is out of E-Stop and powered off, `task_state` is `STATE_ESTOP_RESET`. + `STATE_OFF` is only a command value for `state()`, so do not compare `task_state` against it. *tool_in_spindle*:: '(returns integer)' - current tool number. @@ -832,6 +834,7 @@ c.spindle.(linuxcnc.SPINDLE_OFF, 0) `state(int)`:: Set the machine state. Machine state should be `STATE_ESTOP`, `STATE_ESTOP_RESET`, `STATE_ON`, or `STATE_OFF`. + From `STATE_ON`, calling `state(STATE_OFF)` turns the machine off and `task_state` becomes `STATE_ESTOP_RESET`. `task_plan_sync()`:: On completion of this call, the VAR file on disk is updated with live values from the interpreter.