diff --git a/docs/API_Server.md b/docs/API_Server.md index 7c306a2a..eaa5bdb9 100644 --- a/docs/API_Server.md +++ b/docs/API_Server.md @@ -204,9 +204,8 @@ object name and the value is a dictionary containing its fields. The response message will also contain an "eventtime" field containing the timestamp from when the query was taken. -Available fields are documented in the -[Command Template](Command_Templates.md#the-printer-variable) -document. +Available fields are documented in the [Status +Reference](Status_Reference.md) document. ### objects/subscribe diff --git a/docs/Command_Templates.md b/docs/Command_Templates.md index b68de68b..a5e3d323 100644 --- a/docs/Command_Templates.md +++ b/docs/Command_Templates.md @@ -120,6 +120,9 @@ gcode: M106 S{ printer.fan.speed * 0.9 * 255} ``` +Available fields are defined in the [Status +Reference](Status_Reference.md) document. + Important! Macros are first evaluated in entirety and only then are the resulting commands executed. If a macro issues a command that alters the state of the printer, the results of that state change will @@ -136,211 +139,6 @@ objects. If the config section contains spaces in it, then one can access it via the `[ ]` accessor - for example: `printer["generic_heater my_chamber_heater"].temperature`. -The following are common printer attributes: -- `printer.fan.speed`: The fan speed as a float between 0.0 and 1.0. - This is also available on "heater_fan", "fan_generic", and - "controller_fan" config sections (eg, - `printer["fan_generic my_fan"].speed`). -- `printer.fan.rpm`: The measured fan speed in rotations per minute if - the fan has a tachometer_pin defined. This is also available on - "heater_fan", "fan_generic", and "controller_fan" config sections - (eg, `printer["fan_generic my_fan"].rpm`). -- `printer.gcode_move.gcode_position`: The current position of the - toolhead relative to the current G-Code origin. That is, positions - that one might directly send to a `G1` command. It is possible to - access the x, y, z, and e components of this position (eg, - `printer.gcode_move.gcode_position.x`). -- `printer.gcode_move.position`: The last commanded position of the - toolhead using the coordinate system specified in the config - file. It is possible to access the x, y, z, and e components of this - position (eg, `printer.gcode_move.position.x`). -- `printer.gcode_move.homing_origin`: The origin of the gcode - coordinate system (relative to the coordinate system specified in - the config file) to use after a `G28` command. The - `SET_GCODE_OFFSET` command can alter this position. It is possible - to access the x, y, and z components of this position (eg, - `printer.gcode_move.homing_origin.x`). -- `printer.gcode_move.speed`: The last speed set in a `G1` command (in - mm/s). -- `printer.gcode_move.speed_factor`: The "speed factor override" as - set by an `M220` command. This is a floating point value such - that 1.0 means no override and, for example, 2.0 would double - requested speed. -- `printer.gcode_move.extrude_factor`: The "extrude factor override" - as set by an `M221` command. This is a floating point value such - that 1.0 means no override and, for example, 2.0 would double - requested extrusions. -- `printer.gcode_move.absolute_coordinates`: This returns True if in - `G90` absolute coordinate mode or False if in `G91` relative mode. -- `printer.gcode_move.absolute_extrude`: This returns True if in `M82` - absolute extrude mode or False if in `M83` relative mode. -- `printer["gcode_macro "].`: The current value - of a gcode_macro variable. -- `printer..temperature`: The last reported temperature (in - Celsius as a float) for the given heater. Example heaters are: - `extruder`, `extruder1`, `heater_bed`, `heater_generic - `. -- `printer..target`: The current target temperature (in - Celsius as a float) for the given heater. -- `printer..power`: The last setting of the PWM pin (a value - between 0.0 and 1.0) associated with the heater. -- `printer.idle_timeout.state`: The current state of the printer as - tracked by the idle_timeout module. It is one of the following - strings: "Idle", "Printing", "Ready". -- `printer.idle_timeout.printing_time`: The amount of time (in - seconds) the printer has been in the "Printing" state (as tracked by - the idle_timeout module). -- `printer.pause_resume.is_paused`: Returns true if a PAUSE command - has been executed without a corresponding RESUME. -- `printer.toolhead.position`: The last commanded position of the - toolhead relative to the coordinate system specified in the config - file. It is possible to access the x, y, z, and e components of this - position (eg, `printer.toolhead.position.x`). -- `printer.toolhead.extruder`: The name of the currently active - extruder. For example, one could use - `printer[printer.toolhead.extruder].target` to get the target - temperature of the current extruder. -- `printer.toolhead.homed_axes`: The current cartesian axes considered - to be in a "homed" state. This is a string containing one or more of - "x", "y", "z". -- `printer.toolhead.axis_minimum`, - `printer.toolhead.axis_maximum`: The axis travel limits (mm) after homing. - It is possible to access the x, y, z components of this - limit value (eg, `printer.toolhead.axis_minimum.x`, - `printer.toolhead.axis_maximum.z`). -- `printer.toolhead.max_velocity`, `printer.toolhead.max_accel`, - `printer.toolhead.max_accel_to_decel`, - `printer.toolhead.square_corner_velocity`: The current printing - limits that are in effect. This may differ from the config file - settings if a `SET_VELOCITY_LIMIT` (or `M204`) command alters them - at run-time. -- `printer.toolhead.stalls`: The total number of times (since the last - restart) that the printer had to be paused because the toolhead - moved faster than moves could be read from the G-Code input. -- `printer.heaters.available_heaters`: Returns a list of all currently - available heaters by their full config section names, - e.g. `["extruder", "heater_bed", "heater_generic my_custom_heater"]`. -- `printer.heaters.available_sensors`: Returns a list of all currently - available temperature sensors by their full config section names, - e.g. `["extruder", "heater_bed", "heater_generic my_custom_heater", - "temperature_sensor electronics_temp"]`. -- `printer.query_endstops.last_query[""]`: Returns True if - the given endstop was reported as "triggered" during the last - QUERY_ENDSTOP command. Note, due to the order of template expansion - (see above), the QUERY_ENDSTOP command must be run prior to the - macro containing this reference. -- `printer.probe.last_query`: Returns True if the probe was reported - as "triggered" during the last QUERY_PROBE command. Note, due to the - order of template expansion (see above), the QUERY_PROBE command - must be run prior to the macro containing this reference. -- `printer.probe.last_z_result`: Returns the Z result value of the - last PROBE command. Note, due to the order of template expansion - (see above), the PROBE (or similar) command must be run prior to the - macro containing this reference. -- `printer.configfile.settings.
.