Basic Information:
Printer Model: CR-30
MCU / Printerboard: Creality V4.2.10
klippy.log
- attached
Describe your issue:
I have a loop macro that uses M808 and it works fantastic. However, when I try to hide it from being displayed on Klipper screen and Mainsail by adding an underscore (_M808) the macro no longer runs. With the underscore, the program just ignores the M808 command and ends. I am running off of a Creality Sonic Pad so I’m not sure if that has anything to do with this. Does anyone else have this issue? Thanks!
This works:
# 'Marlin' style M808 compatibility macro for SDCard looping
[gcode_macro M808]
gcode:
{% if params.K is not defined and params.L is defined %}SDCARD_LOOP_BEGIN COUNT={params.L|int}{% endif %}
{% if params.K is not defined and params.L is not defined %}SDCARD_LOOP_END{% endif %}
{% if params.K is defined and params.L is not defined %}SDCARD_LOOP_DESIST{% endif %}
This does not work:
# 'Marlin' style M808 compatibility macro for SDCard looping
[gcode_macro _M808]
gcode:
{% if params.K is not defined and params.L is defined %}SDCARD_LOOP_BEGIN COUNT={params.L|int}{% endif %}
{% if params.K is not defined and params.L is not defined %}SDCARD_LOOP_END{% endif %}
{% if params.K is defined and params.L is not defined %}SDCARD_LOOP_DESIST{% endif %}
Gcode:
M104 S220 ; set nozzle temp
M140 S70 ; set bed temp
M109 S220 ; wait for nozzle to reach temp
M190 S70 ; wait for bed to reach tmp
G28 ; go to home position
G0 Y0 ; move nozzle to belt if negative offsets used
G92 X0 Y0 Z0 E0 ; zero out all axes (include extruder)
M83 ; set extruder to relative coordinates
M808 L100 ; start repeat
G92 Z0 ; Z needs to start at 0 at the start of the loop
G0 X215 E40 F800 ; extrude to "left" of belt
G0 Z5 E2 ; extrude short Z line
G0 X5 E40 ; extrude to "right" of belt
G0 Z10 E2 ; extrude short Z line
M808 ; go to loop start (M808 above)
M221 T0 S100 ; flow percentage to 100%
M104 S0 ; hotend temp to 0
M140 S0 ; bed temp to 0
M107 ; fans off
G91 ; incremetal positionng
G1 E-1 F300 ;
G1 Z+0.5 E-5 F300.00 ;
G90 ; absolute positioning
G28 Y0 ; home y
G28 X0 ; home x
M84 ; disable steppers
klippy (8).log (29.6 KB)