## use this if you need more then one action responeses in a order ## insight a macro [gcode_macro _PRINT_AR] gcode: # set default parameter value {% set show_lcd = params.SHOW_LCD|default('false') %} {% if show_lcd == 'true' %} M117 {'%s' % (params.T|string)} {% endif %} {action_respond_info("%s" % (params.T|string))} [gcode_macro _PRINT_TIME] gcode: #set default parameter value {% set text = params.TEXT|default('Timer') %} {% set show_ar = params.SHOW_AR|default('false') %} {% set minutes = ((params.TIME|int / 60) % 60)|int %} {% set seconds = (params.TIME|int % 60)|int %} M117 {'%s' % (TEXT)} {minutes|int}:{'%02d' % (seconds|int)} {%if show_ar == 'true' %} {action_respond_info("%s %d:%02d" % (text,minutes|int,seconds|int))} {% endif %} [gcode_macro _SET_Z_CURRENT] variable_last_val: 'RUN' gcode: {% if VAL == 'HOME' %} {% set z_run = 0.3 %} {% set z_hold = 0.3 %} {% else %} {% set z_run = printer.configfile.settings["tmc2209 stepper_z"]["run_current"] %} {% set z_hold = printer.configfile.settings["tmc2209 stepper_z"]["hold_current"] %} {% endif %} {% if VAL != printer["gcode_macro _SET_Z_CURRENT"].last_val|string %} SET_GCODE_VARIABLE MACRO=_SET_Z_CURRENT VARIABLE=last_val VALUE='"{VAL}"' {action_respond_info("Home&Probe: RunCur %.2f HoldCur %.2f" % (z_run|float, z_hold|float))} SET_TMC_CURRENT STEPPER=stepper_z CURRENT={z_run} HOLDCURRENT={z_hold} M400 {% endif %}