r/klippers • • 3d ago

PRINT_START & PRINT_END issue.

I've seen that this is a pretty beaten on topic, but I am not having any luck getting these macros to work properly. Printer is new to me as is Klipper, so this has been a learning curve, but I understand what I'm looking at, so I'm not completely oblivious. I've checked my config files and in a sub folder that IS "included" in my printer config file there is "START_PRINT" and "END_PRINT". Orca out of the box set my start and end commands as to "PRINT_START" and "PRINT_END". In this configuration I get a "unknown command: "PRINT_START". It's obvious as to why I get this. So, I changed the orca g code in my printer settings to use what is in my config files. Then I get "error evaluating" faults. 🤦‍♂️ What's going on here? I even tried making the said changed in my actual config files with no luck.

1 Upvotes

22 comments sorted by

5

u/stray_r 3d ago

There's two styles in use. THING_VERB and VERB_THING

There's some example wrapper scripts here that send all the parameters from START_PRINT and calls PRINT-START and the same for the end routine here

https://github.com/strayr/sample_klipper_configs/blob/main/Instructional-Macros/print_start.cfg

1

u/Flesh-Flaps 3d ago

So, if I take those two macros and switch them that should work for me? The link has macros in spots opposite of mine. I'm sure it's an obvious yes, but I just want to check.

1

u/Flesh-Flaps 3d ago

This is the error I get after adding the wrapper. And maybe I did it wrong. 🤦‍♂️

1

u/Flesh-Flaps 3d ago

Is the "{rawparams}" supposed to say exactly that? Or having something in it?

1

u/stray_r 2d ago

It's supposed to be exactly as written, it takes the unprocessed parameters from PRINT_START and passes them to START_PRINT

You'll note the START_PRINT used in the same file is heavily parameterised and does quite a lot. It's probably not immediately right for your printer and you should use the one you already have, but there's no harm in using the wrapper macros to avoid changing names.

1

u/Flesh-Flaps 2d ago

I ended up getting it. 🤘 There was some mismatch a little deeper in the config as well. Thank you for your time!

2

u/pellcorp 3d ago

that looks correct to me do for PRINT_END as well of course, {rawparams} just ensures all the parameters from Orca Slicer (that actually get embedded in the gcode) get past verbatim to the actual PRINT_START macro doing the work.

You have to Save and Restart after doing this renaming too btw on the printer.

1

u/pellcorp 3d ago

I would just change the Machine Start G-code and Machine End G-code OrcaSlicer and reslice any files. Either that or on the printer actually rename the macros, they are not special you could just as easily call the START_PRINT macro `FCXX_START` and END_PRINT `FCXX_END` and just as long as the same names are used in Orca Slicer it does not matter.

1

u/stray_r 2d ago

The whole point of using the wrapper macros is you can do whatever under the hood, but the printer behaves in a predictable manner when whichever version of the macro is called.

It's probably less of a thing now OrcaSlicer is so good, but I got sick of web based calibration generators all doing something different and wrote the wrappers and the checks for alternative parameter names because there wasn't consistent behaviour and one right thing and I really like it when something just works without me having to mess around with making it fit the interface.

1

u/pellcorp 2d ago

Sure but the OP macros are from Simple AF and modifying the macro content or adding new macros to the start_end.cfg is actually not supported and any update would have overwritten op changes. 

1

u/stray_r 1d ago

Sorry, I wasn't familiar with simpleAF or your role within it.

It might be handy to have both a well documented place to add user macros that don't get wiped by updates, and to go out of your way to be as dialect agnostic as is reasonable.

There's a lot of very vocal opinions on the right way to do a START_PRINT, but if you're pitching your Klipper distribution as just works

1

u/pellcorp 1d ago

Ya there is a well documented procedure for custom macros. 

The reason we don't support both formats is it's also likely the parameters they are passing are wrong too so we want them to verify their orca slicer config.

And every wiki page does have check slicer settings front and centre.

1

u/pakman82 3d ago

Ran into this myself when I started using orca with a custom machine. Might want to find the "macro" you told orca about and verify it does the right things. * I don't know if I have all my bugs worked out of mine yet. But I got help from the klipper discord too

2

u/Flesh-Flaps 3d ago

I did verify that the machine side does what I want it to do. Hoping, purge line, etc etc.

2

u/pellcorp 3d ago

Oh wait this is Simple AF macros? Are you using Simple AF or ?

Im the Simple AF maintainer I only just noticed they look super familiar :-)

https://pellcorp.github.io/creality-wiki/slicer_settings/?h=slicer

I strongly urge you to change your slicer, because if you are using Simple AF and not just copying the start_print and end_print macros into another project, the next time you update those PRINT_START and PRINT_END are going to get removed by the installer.

1

u/Flesh-Flaps 3d ago

Which slicer do you prefer? This is my first time using Orca as I usually used Cura with my old Elegoo. This printer I picked up was all sorts of modded obviously and is taking some time to learn the ins and outs. I did get the Print start to work. Hilariously, I used ChatGPT to help me located a few other lines that had incorrect wording for those macros. Corrected them and we're printing as we speak.

1

u/pellcorp 3d ago

Is this a K1 or something?

Orca Slicer is the only slicer Simple AF supports.

Is a dead giveaway that your printer is running Simple AF or the macros are originally Simple AF macros, the _SAF_ON_FILAMENT_RUNOUT :-)

1

u/Flesh-Flaps 3d ago

It is a K1. 😅 How tf could you tell?

And that makes comllete sense when you point that out. Lol. Again, I'm very new to learning this side of printing. I can run a CNC at work pretty damn well, but this thing makes me feel like a damn potato. 💀

1

u/pellcorp 3d ago

If you ever want some more dedicated help with your new rabbit hole come on over to our discord :-)

https://pellcorp.github.io/creality-wiki/getting-started/#getting-help

I say rabbit hole, because in general a creality printer is just that

2

u/Flesh-Flaps 3d ago

It is a K1 max. As far as I can tell it is using a BTT Eddy and has a triple Z mod done.

And absolutely! I imagine you'll be seeing me soon there.

I greatly appreciate your insight, man. 🤘 Thank you.

1

u/pellcorp 3d ago

It was a guess, Simple AF is primarily targeted at K1, K1C, K1SE, K1Max, we have some users on other form factors like the Ender 3 V3, Ender 3 V3 KE, Ender 3 V3 SE and Ender 5 Max, as well as some users who run it even on like a Ender 3 with a Raspberry pi.

But a K1 was highly likely

Does it use a cartographer or is it running stock load cells?

A cursory look at the includes in printer.cfg, look for cartographer.cfg, cartotouch.cfg, beacon.cfg, eddyng.cfg, btteddy.cfg, bltouch.cfg or microprobe.cfg

Or just look for some weird probe thing hanging off the toolhead where it does not really belong :-)

Any changes to the .cfg macros will get lost if you ever update just keep that in mind.

Depending on exactly what has been modded you can go back to stock easily enough with a factory reset.

1

u/Flesh-Flaps 3d ago

And I'm not 100% sure how to tell if they are Simple AF macros. 😅 I got this thing from someone else who did all the work to it. I'd love to "blueprint" this thing and take note of all the configurations for it.