Temp and Fan Settings not transferred via slicer

klippy.log (114.7 KB)
Halfpipe.gcode (6.5 MB)

Basic Information:

Printer Model: Qidi Core XY running vanilla Kliper 0.12
MCU / Printerboard: MKS-Pi X-4
klippy.log

Hi all!

Can you please help me finding out the reason why my Klipper is not getting the temp and fan setting information via slicer?

I use Orca slicer and have a print start macro with some defaults in it.

[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(65)|float %}

Whatever I print the initial temperature is the within the macro defined default temperature. This is wrong and in case I Print ABS absolutely bad temperature to start with. Also part cooling and chamber fan is off initially even I defined the proper setting in orcaslicer.

A clue about this strange problem is appreciated! Thank you!

Attached is the START_PRINT Macro and also a sample Gcode file for reference…

macros.cfg (4.3 KB)

https://www.klipper3d.org/Slicers.html#start_print-macros

Thank you but I consulted the documentation reference before and followed the examples.

To me it looks like that Orcaslicer might transfer parameters that are not recognized by Klipper or maybe my macro the proper way.

So I guess my next task is to find out what Orcaslicer is sending and what are necessary parameters to interpret the commands….

Your example gcode clearly indicates that you are not calling your start macro correctly.
In Orca you would need something like:

START_PRINT BED_TEMP=[bed_temperature_initial_layer_single]  EXTRUDER_TEMP=[nozzle_temperature_initial_layer]

You are saying that its not enough just to call START_PRINT in the custom gcode section of the slicer?

I have it like this:

To my understanding it should call the corresponding gcode macro I prepared in my config.

image

When I use PrusaslicerQidislicer I seem not to have this problem because It worked pretty good before.
Does anybody know if maybe Orcaslicer is somehow different?

No, it’s not enough.

You have to pass on the values to the gcode file so that Klipper can interpret them and get the values from it.

This has also not worked in these slicers. Most likely, you just had left some

M104 Sxxx
M140 Sxxx

in there and this is why you never noticed that your START_PRINT never worked as it should.

OK I will work it out!
Thought process activated…

Did I do anything wrong in the slicer or just my print start macro?
In the slicer a lot of different values for fan speed, bed and nozzle temperature, chamber temperature depending on layer height are defined. It will change over time. Like a temp tower.
Why is this temp change transported in the code file but not my initial layer temperature ? …well this is what I think in the moment :slight_smile:

I also read in the config reference that it is advisable to rely on a print_start macro.

So I have to add some lines to the macro
M104
M140
M106
… amongst others I suppose.

Do I need to repeat this in the custom macro fields of the slicer?

Sorry getting off topic here a bit. Not Klipper anymore…

Oh I see. I believe the relation between slicer and Klipper was not based on the same parameters.

I did the following and made sure parameters match each other.
I bet it works…

Can you please tell me how the initial and then the subsequent fan speed is transferred ? I did not find a similar custom Code compared to the temps…
How does the machine knows that fans need to go full power after the first layer?

The slicer puts gcodes to the relevant positions into the gcode file and Klipper sets the fans at that point accordingly.

More common things on gcodes here:

https://reprap.org/wiki/G-code

Oh, wow, slowly. Now you’re really mixing things up profoundly:

  • Variables like bed_temperature_initial_layer_single etc are SLICER variables
  • They cannot directly be used in a Klipper macro but are filled during the slicing process and passed into the gcode. From there, Klipper can pick it up and use it in a macro

If you want to use the macros (not strictly necessary):
Use the example in klipper/config/sample-macros.cfg at master · Klipper3d/klipper · GitHub and pass the temperatures like I have shown above

Alternatively:
Do it in the traditional way and have the startup routine in the slicer, then you can use the code in your screenshot but directly in the slicer’s “Machine start G-code” and without the Klipper macro definition.

Yes you’re right. It was shit :slight_smile:

I did insert the line you mentioned to the slicer custom gcode and tested with an unmodified copy of this Kevin O’connor sample print start macro.

It works. Temperatures are now transferred again. Thank you!
I mixed up things a little to much.

I have two questions now. Orcaslicer requires the same parameter transfer commands as Prusaslice I assume? Well I tested and it works so I believe the answer is yes.

The reason why I started my experiments is that the fan settings are not transferred as defined in the slicer. So is another set of parameter initialization required?
Something like:
FAN_SPEED1=[fan_speed_1_initial_layer_single] and similar to other fans?
The machine has 3 fans and a chamber heater…

I suspect I need to work with a M106 gcode and also transfer parameters from the slicer. Didn’t find the proper way yet during my research.

Thank you again for the kind support! Much appreciated!

If you are talking about the print cooling fan(s) on your hotend, then there is nothing for you to control.
The slicer dynamically inserts M106 commands during the slicing process, where it deems them appropriate and according to your settings in the slicer.

Solution:

All my fans where controlled via output pin and not standard Klipper reference naming convention.

Had to change the config.

Fan2 Aux Fan

[output_pin fan2]
pin: PA8

is now:

[fan_generic aux_fan]
pin: PA8

Now the slicer generated gcode can get digested by Klipper…
Why nobody told me? :smiley: