Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/src/config/python-interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ see <<python:reading-ini-values,ReadingINI file values>> 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.
Expand Down Expand Up @@ -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.
Expand Down