gcode command M106 already registered
I want to reconfigure M106 to properly control the various fans from orca slicer, especially an air scrubber like a nevermore.
When I do what I did for my Voron V0, i get the Error message "gcode command M106 already registered" - is there a macro somewhere in RatOS that already redefined M106?
60 Replies
It's already in klipper
https://www.klipper3d.org/G-Codes.html
optimistic-goldβ’9mo ago
yes I know that, but you can overwrite it in your own config. Like I wrote, i did this for my Voron V0 running regular klipper + Mainsail and it works like a charm. So it has to be something in RatOS...
ratos doesn't do anything with m106
https://github.com/search?q=repo%3ARat-OS%2FRatOS-configuration+m106&type=code
as you can see, it is just used within a macro, but nothing special
optimistic-goldβ’9mo ago
that's what I found as well. It's weird.
optimistic-goldβ’9mo ago
![No description](https://cdn.answeroverflow.com/1187501704258789376/image.png)
optimistic-goldβ’9mo ago
that's from my config of the V0 --> No problems
pasting the same macro into my RatOS config yields the error above.
upload your printer.cfg
optimistic-goldβ’9mo ago
optimistic-goldβ’9mo ago
there you go
plus mymacro.cfg:
[gcode_macro M106]
#rename_original: XM106
gcode:
{%if params.P is not defined or params.P|int == 0 %}
{% set fan = 'Part_Cooling_Fan' %}
{% elif params.P|int == 2 %}
#{% set fan = 'Nevermore' %} # Hier externen Fan einfΓΌgen
{% elif params.P|int == 3 %}
{% set fan = 'Nevermore' %}
{% endif %}
{%if fan is not defined %}
RESPOND TYPE=echo MSG="Unknown Fan"
{% else %} {% set speed = (params.S|int if params.S is defined else 255)/255 %} SET_FAN_SPEED FAN={fan} SPEED={speed} {% endif %} rename_original doesn't make any difference
{%if fan is not defined %}
RESPOND TYPE=echo MSG="Unknown Fan"
{% else %} {% set speed = (params.S|int if params.S is defined else 255)/255 %} SET_FAN_SPEED FAN={fan} SPEED={speed} {% endif %} rename_original doesn't make any difference
like 35 should in your
USER OVERRIDES
sectionoptimistic-goldβ’9mo ago
It was there previously. I moved it there to see if the klipper log would give me a file name where it find's the second M106 macro (as mine would be first). It currently doesn't do anything. my_macros is currently all commented out in order to be able to use the machine.
it should be
rename_existing
not rename_original
optimistic-goldβ’9mo ago
did that - error message is gone. I'm still confused as to why I got the error message in the first place - As I said, it's fine (without renaming) on my v0 config
probably different klipper versions π
optimistic-goldβ’9mo ago
v0.11.0-299 vs -304. different, yeah, but not far apart.
i'd love to update both to 0.12.0-37, but the small one is in the middle of a small job for the big one π