flexi-bot/docs/marlin/_gcode/M166.md
2023-09-05 20:38:49 +02:00

2.4 KiB

tag title brief author since requires group codes notes parameters examples
m0166 Gradient Mix Set a Gradient Mix thinkyhead 2.0.0 MIXING_EXTRUDER,GRADIENT_MIX mixing
M166
Requires `MIXING_EXTRUDER` and `GRADIENT_MIX`.
tag optional description values
A false Starting Z Height. (Use `Z` to set the Ending Z Height.)
tag type
linear float
tag optional description values
Z false Ending Z Height. (Use `A` to set the Starting Z Height.)
tag type
linear float
tag optional description values
I false Starting Virtual Tool. The Gradient begins with this tool-mix. Below the Starting Z Height the Starting Virtual Tool fully applies.
tag type
index int
tag optional description values
J false Ending Virtual Tool. The Gradient transitions to this tool-mix as Z approaches the Ending Z Height. Above the Ending Z Height the Ending Virtual Tool fully applies.
tag type
index int
tag optional description values
S true Enable / disable the gradient in manual mode. When using the tool index alias, tool-change commands determine whether or not the gradient is enabled.
tag type
enable bool
tag optional description values
T true A tool index to reassign to the gradient. If no index is given, cancel the tool assignment.
tag type
index int
pre post code
Gradient for a tall vase In this example no tool index is assigned to the Gradient. So the Gradient is enabled using `M166 S1` and disabled with `M166 S0`. M166 A0 Z250 I0 J1 S1
pre post code
Gradient as a Virtual Tool In this example the Gradient has been given a tool alias of 3. So the Gradient is selected with `T3`, and all other `Tn` commands will select a static mix.
M166 A0 Z250 I0 J1 T3
T3
pre code
To use the static mix stored in T0…
M166 T
T0

Use M166 to set a gradient that will be automatically updated as the Z position changes during a print. The gradient smoothly transitions from one virtual tool to another between the given starting and ending Z heights. Below the starting height the starting virtual tool fully applies, and above the ending height the ending virtual tool fully applies.