Need for Auto-Print on boot and "playlist" for print files. Hear me out

So I have built a Kinetic Sand table. I chose a BTT SKR Pico board to control it. the Pico only uses Klipper so this is my first dive into Klipper…

Machine is a simple CoreXY plotter. essentially it drags a magnet below a plate of glass which in turn drags a ball bearing through sand to create patterns in the sand.

I have used Marlin/octoprint plugins

in the past to accomplish this task.

My questions:

  1. Is there a way to get my install of Klipper to Perform the following after it has booted
    A. Home all
    B. Start “Printing” the first in a series of gcode files
    C. continue to “print” all files loaded to the machine on a constant loop?

I know this is weird and potentially dangerous if applied to an actual 3D printer for obvious reasons.

Thanks in advance for any help you have to offer.

attached is a copy of my CFG file and a pic of the table.
printer.cfg (4.3 KB)

here is a youtube link to the thing running

1 Like

I would set up a delayed macro. They start a set time after the “Ready” state is reached.

https://www.klipper3d.org/Command_Templates.html#delayed-gcodes

You can set the initial_duration to 1 (in seconds). If the order is fixed and the files don’t vary, you can create a chain of files by starting the new “print” via the last one’s end script. In the macro, you would ideally start only the first print of the chain. The last file will ideally point at the first one to keep the cycle going. You might experience an interval between each file. If you’re using the SD card (either virtual or physical) try SDCARD_PRINT_FILE FILENAME="whateveryouwant.gcode".

1 Like

Without too much digging into it:

  • G-Codes - Klipper documentation → SD Card Loop allows to loop over the same gcode from once to unlimited
  • Macros: You could put a whole set of gcodes into a macro. Potentially even using some variables that allow to create the pattern dynamically.
2 Likes

Thank you both!! ill dig in and see what i can make happen. Cheers!

it works? also it coud be cool that klipper choose the gcode randomly, it could be posible?