-
Notifications
You must be signed in to change notification settings - Fork 93
Printer Variables
moggieuk edited this page May 14, 2024
·
2 revisions
Happy Hare exposed 'printer' variables that can be used in your own macros.
printer.mmu.enabled : {bool} True if MMU is enabled
printer.mmu.is_locked : {bool} True if MMU is paused after an error DEPRECATED: use print_job_state
printer.mmu.is_homed : {bool} True if MMU has been homed
printer.mmu.tool : {int} 0..n | -1 for unknown | -2 for bypass
printer.mmu.gate : {int} 0..n | -1 for unknown
printer.mmu.active_filament : {dict} of active filament attributes (from gate_map, e.g. active_filament.material, active_filament.color)
printer.mmu.next_tool : {int} 0..n | -1 for unknown | -2 for bypass (during a tool change)
printer.mmu.last_tool : {int} 0..n | -1 for unknown | -2 for bypass (during a tool change after unload)
printer.mmu.last_toolchange : {string} description of last change similar to M117 display
printer.mmu.runout : {bool} True while MMU is handling a runout
printer.mmu.filament : {string} filament state in extruder (Loaded | Unloaded | Unknown)
printer.mmu.filament_pos : {int} state machine - exact location of filament
printer.mmu.filament_direction : {int} 1 (load) | -1 (unload)
printer.mmu.servo : {string} Up | Down | Move | Unknown
printer.mmu.ttg_map : {list} defined gate for each tool
printer.mmu.gate_status : {list} per gate: 0 empty | 1 available | 2 available from buffer | -1 unknown
printer.mmu.gate_material : {list} of material names, one per gate
printer.mmu.gate_color : {list} of color names, one per gate
printer.mmu.gate_color_rgb : {list} of color rbg values from 0.0 - 1.0 in truples (red, green blue), one per gate
printer.mmu.gate_spool_id : {list} of IDs for Spoolman, one per gate
printer.mmu.custom_color_rgb : {list} of color rbg values from 0.0 - 1.0 in truples (red, green blue), one per gate
printer.mmu.slicer_tool_map : {dict} of slicer defined tool attributes (in form slicer_tool_map.tools.x.[color|material|temp|in_use])
printer.mmu.endless_spool_groups : {list} membership group (int) for each tool
printer.mmu.tool_extrusion_multipliers : {list} current M221 extrusion multipliers (float), one per tool
printer.mmu.tool_speed_multipliers : {list} current M220 extrusion multipliers (float), one per tool
printer.mmu.action : {string} Idle | Loading | Unloading | Forming Tip | Heating | Loading Ext | Exiting Ext | Checking | Homing | Selecting
printer.mmu.has_bypass : {int} 0 (not available) | 1 (available)
printer.mmu.sync_drive : {bool} True if gear stepper is currently synced to extruder
printer.mmu.sync_feedback_state : {string} State of sync feedback sensor (compressed | expanded | neutral | disabled)
printer.mmu.print_job_state : {string} current job state seen by MMU (initialized | standby | started | printing | pause_locked | paused | complete | cancelled | error)
printer.mmu.clog_detection : {int} 0 (off) | 1 (manual) | 2 (auto)
printer.mmu.endless_spool : {int} 0 (disabled) | 1 (enabled) | 2 (additionally enabled for pre-gate sensor)
printer.mmu.print_start_detection : {int} 0 (disabled) | 1 (enabled)
Optionally exposed for mmu_encoder (if fitted):
printer['mmu_encoder mmu_encoder'].encoder_pos : {float} Encoder position measurement in mm
printer['mmu_encoder mmu_encoder'].detection_length : {float} The detection length for clog detection
printer['mmu_encoder mmu_encoder'].min_headroom : {float} How close clog detection was from firing on current tool change
printer['mmu_encoder mmu_encoder'].headroom : {float} Current headroom of clog detection (i.e. distance from trigger point)
printer['mmu_encoder mmu_encoder'].desired_headroom : {float} Desired headroom (mm) for automatic clog detection
printer['mmu_encoder mmu_encoder'].detection_mode : {int} Same as printer.mmu.clog_detection
printer['mmu_encoder mmu_encoder'].enabled : {bool} Whether encoder is currently enabled for clog detection
printer['mmu_encoder mmu_encoder'].flow_rate : {int} % flowrate (extruder movement compared to encoder movement)
(\_/)
( *,*)
(")_(") Happy Hare Ready
1. Introduction
2. Installation
3. Essential Configuration
4. Calibration
5. Operation
-- YOUR MMU IS READY TO PLAY WITH --
6. Slicer-MMU Setup
-- NOW YOU ARE READY TO PRINT! --
7. Optional Feature Setup
8. Advanced Configuration
9. Advanced Concepts
- State Persistence
- Statistics and Counters
- Tool and Gate Maps
- Filament Bypass
- Runout/Clog Detection
- Consuption Counters
- Synchronized Gear/Extruder
10. Quick References
11. Troubleshooting
12. FAQ
13. MCU Board Reference
14. Change Log