Sorry guys, but even though I’ve been searching this group (and googleing it) I cannot seem to find out what I’m missing here…
This is just a test where I call the first macro “TEST_I W=[something]” and want to pass that variable “something” on to the delayed_gcode macro.
Any help or hints would be highly appreciated
The code:
[gcode_macro TEST_I]
variable_respond_i: None
gcode:
{% set respond = params.W %}
{action_respond_info(“TEST_I macro is ready to rock :D”)}
{action_respond_info(respond)}
G28 ; home all axes
SET_GCODE_VARIABLE MACRO=TEST_I VARIABLE=respond_i VALUE={respond}
UPDATE_DELAYED_GCODE ID=TEST_II DURATION=15
[delayed_gcode TEST_II]
initial_duration: 0.0
gcode:
{action_respond_info(“TEST_II macro is on the job…”)}
;FROM HERE THE CODE JUST STOPS
{% set respond_ii = printer[“gcode_macro TEST_I”].respond_i %}
{action_respond_info(respond_ii)}
G0 Z10 F4000 ; move Z to 50mm above buildplate
{action_respond_info(“Toolhead lifted 10 mm”)}
UPDATE_DELAYED_GCODE ID=TEST_II DURATION=15