Confused with M190 macro and the Pnnn parameter

Basic Information:

Printer Model: Homemade 600mm x 600mm
MCU / Printerboard: octopus max ez
Host / SBC
klippy.log

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

I’ve been looking but have not found an answer yet so here goes:
I have 4 heated bed zones, Looking at the klipper M190 macro it states that th P parameter is used for specifing the bed number to control. I have 4 heters set up in the cfg file [heater_bed] , [heater_generic heater_bed1] , [heater_generic heater_bed2] and [heater_generic heater_bed3]. When operating the terminal window in octoprint shows klipper sending back (Send: M105
Recv: ok B:-86.6 /0.0 B1:-97.1 /0.0 B2:-90.7 /0.0 B3:-92.3 /0.0 T0:27.7 /0.0).
It’s sending the information for all four heaters so it’s working.
My problem is that when I issue a M190 P1 S80 it sets the first bed (B:) to 80.
If I send a M190 P2 S80 it also sets the first bed (B:) to 80.
Can someone please try to explaine to me how to use the Pnnn param to set the other beds with the Pnn param or how to set up the heaters in the cfg file so the Pnn param will set the other three heaters.
I do kmow about the other ways to set them like (SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=value) but I’m trying to use the M190 to do it. The docs say it will use the Pnn but to the best of me I cannot figure it out.
Thank you

No, it does not. It says “Set bed temperature and wait: M190 S<temperature>

You may be looking at documentation for something else, but I grepped for every instance of M190 in Klipper’s documentation and it never claims to support extra parameters (and I double-checked against the implementation and verified that it does not have any supported but undocumented parameters.)

1 Like

Yeh I was searching in so many places this one wasn’t for klipper. Ive been at it all day going nuts. Finally got it to work by making a new M190 macro.
Just in case anybody is interested this looks at slicer gcode and sets the appropriate bed heaters then if any are turned on it waits till they come up to temp.

#[gcode_macro SPLIT_BED_HEAT]
[gcode_macro M190]
rename_existing: M99190
# Call using SPLIT_BED_HEAT TARGET={bedtemp}
gcode:
#Parameters
{% set s = params.S|float %}

{% set all_points = printer.exclude_object.objects | map(attribute='polygon') | sum(start=[]) %}    # Gather all object points
{% set x_min = all_points | map(attribute=0) | min | default(printer.configfile.settings.bed_mesh.mesh_min[0]) %}                    # Set x_min from smallest object x point
{% set y_min = all_points | map(attribute=1) | min | default(printer.configfile.settings.bed_mesh.mesh_min[1]) %}                    # Set y_min from smallest object y point
{% set x_max = all_points | map(attribute=0) | max | default(printer.configfile.settings.bed_mesh.mesh_max[0]) %}                    # Set x_max from largest object x point
{% set y_max = all_points | map(attribute=1) | max | default(printer.configfile.settings.bed_mesh.mesh_max[1]) %}                    # Set y_max from largest object y point


{% if x_min <= printer.toolhead.axis_maximum.x//2 and y_max >= printer.toolhead.axis_maximum.y//2 %}  # Check for objects in back left
SET_HEATER_TEMPERATURE HEATER=heater_Bed TARGET={s}                                         # Set back left heater
{% set bed0 = 1 %}
{% endif %}

{% if x_max >= printer.toolhead.axis_maximum.x//2 and y_max >= printer.toolhead.axis_maximum.y//2 %}  # Check for objects in back right
SET_HEATER_TEMPERATURE HEATER=heater_bed1 TARGET={s}                                         # Set back right heater
{% set bed1 = 1 %}
{% endif %}

{% if x_max >= printer.toolhead.axis_maximum.x//2 and y_min <= printer.toolhead.axis_maximum.y//2 %}  # Check for objects in front right
SET_HEATER_TEMPERATURE HEATER=heater_bed2 TARGET={s}                                         # Set front right heater
{% set bed2 = 1 %}
{% endif %}

{% if x_min <= printer.toolhead.axis_maximum.x//2 and y_min <= printer.toolhead.axis_maximum.y//2 %}  # Check for objects in front left
SET_HEATER_TEMPERATURE HEATER=heater_bed3 TARGET={s}                                         # Set front left heater
{% set bed3 = 1 %}
{% endif %}

{% if bed0 == 1 %}
    TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={s} #MAXIMUM={s+1}
{% endif %}
{% if bed1 == 1 %}
    TEMPERATURE_WAIT SENSOR="heater_generic heater_bed1" MINIMUM={s} #MAXIMUM={s+1}
{% endif %}
{% if bed2 == 1 %}
    TEMPERATURE_WAIT SENSOR="heater_generic heater_bed2" MINIMUM={s} #MAXIMUM={s+1}
{% endif %}
{% if bed3 == 1 %}
    TEMPERATURE_WAIT SENSOR="heater_generic heater_bed3" MINIMUM={s} #MAXIMUM={s+1}
{% endif %}

{% set bed0 = 0 %}
{% set bed1 = 0 %}
{% set bed2 = 0 %}
{% set bed3 = 0 %}

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.