Set and Wait temp issue

Hi there,
i want to set and wait temperature, but i’m having issue, i set correctly but i’m having unable to parse error (on the first two line of the gcode), i cant go over.

this is my start gcode

[gcode_macro START_PRINT_ADAPTIVE]
gcode:
  SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={first_layer_bed_temperature};
  TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={first_layer_bed_temperature};
	G90 ; Set all axes to absolute
	M82; set extruder to absolute
	G21; Set all in mm
	G28 ;Home
	BED_MESH_CALIBRATE ADAPTIVE=1;
  G28;
  SET_HEATER_TEMPERATURE HEATER=extruder TARGET={first_layer_temperature}
  TEMPERATURE_WAIT SENSOR=extruder MINIMUM={first_layer_temperature}
	G1 X0 Y0 F3000;
	G1 X-3.50 Y20 Z0.3 F2000.0 ; Move to start position
	G1 X-3.50 Y100.0 Z0.3 F1500.0 E15 ; Draw the first line
	G1 X-1.50 Y100.0 Z0.3 F2000.0 ; Move to side a little
	G1 X-1.50 Y20 Z0.3 F1500.0 E30 ; Draw the second line
	G92 E0;

i’m using superslicer to slice model and first_layer_temperature is available on the gcode, i checked
in superslicer i also set klipper gcode flavor.

If I hardcode the temperature it works, only with variables i have error

SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=70;

this is my printer.cfg

# This file contains common pin mappings for the BIGTREETECH SKR V1.4

# board. To use this config, the firmware should be compiled for the

# LPC1768 or LPC1769(Turbo).

# See docs/Config_Reference.md for a description of parameters.

#[include PIS.cfg]

[include macro.cfg]

[exclude_object]

[stepper_x]

step_pin: P2.2

dir_pin: !P2.6

enable_pin: !P2.1

microsteps: 32

rotation_distance: 40

#full_steps_per_rotation: 200

endstop_pin: P1.29

position_endstop: -12.90

position_max: 260

position_min: -12.90

homing_speed: 100

[stepper_y]

step_pin: P0.19

dir_pin: P0.20

enable_pin: !P2.8

microsteps: 32

rotation_distance: 40

#full_steps_per_rotation: 200

endstop_pin: P1.28

position_endstop: -22.70

position_max: 230

position_min: -22.70

homing_speed: 100

[stepper_z]

step_pin: P0.22

dir_pin: !P2.11

enable_pin: !P0.21

endstop_pin: probe:z_virtual_endstop

microsteps: 32

rotation_distance: 8

#full_steps_per_rotation: 200

position_max: 200

homing_speed: 10

second_homing_speed: 10

position_min: -6.0

[stepper_z1]

step_pin: P1.15

dir_pin: !P1.14

enable_pin: !P1.16

microsteps: 32

rotation_distance: 8

#full_steps_per_rotation: 200

#position_max: 190

#position_min: -6.0

[extruder]

#Sherpa_mini

step_pin: P2.13

dir_pin: !P0.11

enable_pin: !P2.12

microsteps: 32

rotation_distance: 22.067

gear_ratio: 50:10

max_extrude_only_distance: 175

full_steps_per_rotation: 200

nozzle_diameter: 0.400

filament_diameter: 1.750

heater_pin: P2.7

sensor_type: ATC Semitec 104NT-4-R025H42G

sensor_pin: P0.24

#control = pid

#pid_Kp=34.888

#pid_Ki=5.056

#pid_Kd=60.181

min_temp: 0

max_temp: 280

pressure_advance: 0

[heater_bed]

heater_pin: P2.5

sensor_type: EPCOS 100K B57560G104F

sensor_pin: P0.25

#control = pid

#pid_kp = 71.224

#pid_ki = 1.840

#pid_kd = 689.096

min_temp: 0

max_temp: 130

[fan]

pin: P2.3

[mcu]

serial: /dev/serial/by-id/usb-Klipper_lpc1769_1B300011A99869AF9C2F425EC62000F5-if00

[printer]

kinematics: cartesian

max_velocity: 250

max_accel: 3500

minimum_cruise_ratio: 0.5

#max_accel_to_decel: 2250

max_z_velocity: 2

max_z_accel: 100

#[printer]

#kinematics: limited_cartesian

#max_velocity: 565.685

#max_x_velocity: 400

#max_y_velocity: 400

#max_z_velocity: 2

#max_accel: 5830 # Default acceleration of your choice

#max_accel_to_decel: 5830

#max_x_accel: 5000

#max_y_accel: 3000

#max_z_accel: 50

#scale_xy_accel: True #can be true or false

[temperature_sensor raspberry_pi]

sensor_type: temperature_host

min_temp: 0

max_temp: 100

########################################

# TMC2209 configuration

########################################

[tmc2209 stepper_x]

uart_pin: P1.10

run_current: 0.600

#sense_resistor: 0.110

#hold_current: 0.600

#stealthchop_threshold: 999

[tmc2209 stepper_y]

uart_pin: P1.9

run_current: 0.600

#sense_resistor: 0.110

#hold_current: 0.600

#stealthchop_threshold: 999

[tmc2209 stepper_z]

uart_pin: P1.8

run_current: 0.600

#sense_resistor: 0.110

#hold_current: 0.450

stealthchop_threshold: 30

[tmc2209 stepper_z1]

uart_pin: P1.1

run_current: 0.600

#sense_resistor: 0.110

#hold_current: 0.450

stealthchop_threshold: 30

[tmc2209 extruder]

uart_pin: P1.4

run_current: 0.600

#sense_resistor: 0.110

#hold_current: 0.450

#stealthchop_threshold: 0

###################

#PROBE SECTION#

###################

[bltouch]

sensor_pin: ^P0.10

control_pin: P2.0

x_offset: 32.10

y_offset: -15.20

#z_offset: 0

pin_move_time: 0.680

speed: 3

lift_speed: 20

samples: 2

samples_result: median

sample_retract_dist: 5.0

samples_tolerance: 0.01

samples_tolerance_retries: 3

[safe_z_home]

home_xy_position: 102, 102 # Cambiare le coordinate per il centro del tuo piatto

speed: 100

z_hop: 10 # Move up 10mm

z_hop_speed: 10

[bed_mesh]

speed: 100

horizontal_move_z: 5

mesh_min: 19.60, 1.8

mesh_max:199.1, 190.8

probe_count: 10, 10

adaptive_margin: 2

mesh_pps: 5,5

fade_start: 0.1

fade_end: 10

#fade_target: 0

algorithm: bicubic

bicubic_tension: 0.2

[screws_tilt_adjust]

screw1: -12, 12 #screw coordinates need to be measure for YOUR specific printer

screw1_name: front left screw

screw2: 173, 12

screw2_name: front right screw

screw3: 173, 210

screw3_name: rear right screw

screw4: -12, 210

screw4_name: rear left screw

horizontal_move_z: 10

speed: 50 #speed of travel moves between screws

screw_thread: CW-M3 #measure your bed screw m3=3mm / m4=4mm / m5=5mm

[z_tilt]

z_positions: 0, 102

171.90, 102

points: 0, 102

171.90, 102

speed: 100

horizontal_move_z: 10

retries: 20

retry_tolerance: 0.001

########################################

# EXP1 / EXP2 (display) pins

########################################

[board_pins]

aliases:

# EXP1 header

EXP1_1=P1.30, EXP1_3=P1.18, EXP1_5=P1.20, EXP1_7=P1.22, EXP1_9=<GND>,

EXP1_2=P0.28, EXP1_4=P1.19, EXP1_6=P1.21, EXP1_8=P1.23, EXP1_10=<5V>,

# EXP2 header

EXP2_1=P0.17, EXP2_3=P3.26, EXP2_5=P3.25, EXP2_7=P1.31, EXP2_9=<GND>,

EXP2_2=P0.15, EXP2_4=P0.16, EXP2_6=P0.18, EXP2_8=<RST>, EXP2_10=<NC>

# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp0"

# See the sample-lcd.cfg file for definitions of common LCD displays.

[virtual_sdcard]

path: /home/Restintrip/printer_data/gcodes

[display_status]

[pause_resume]

[idle_timeout]

gcode:M84

timeout: 21600

[force_move]

enable_force_move: True

[input_shaper]

shaper_freq_x: 68.4

shaper_type_x: mzv

shaper_freq_y: 34.4

shaper_type_y: zv

#*# <---------------------- SAVE_CONFIG ---------------------->

#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.

#*#

#*# [extruder]

#*# control = pid

#*# pid_kp = 38.731

#*# pid_ki = 4.965

#*# pid_kd = 75.525

#*#

#*# [heater_bed]

#*# control = pid

#*# pid_kp = 67.692

#*# pid_ki = 1.489

#*# pid_kd = 769.148

#*#

#*# [bltouch]

#*# z_offset = 2.683

#*#

#*# [bed_mesh default]

#*# version = 1

#*# points =

#*# -0.103750, -0.125625, -0.134375, -0.147500, -0.160625, -0.166875, -0.158125, -0.130625, -0.121250, -0.095625

#*# -0.051250, -0.066875, -0.072500, -0.100000, -0.111250, -0.111250, -0.103125, -0.085000, -0.061250, -0.050625

#*# 0.008125, -0.015000, -0.017500, -0.043125, -0.051875, -0.053125, -0.047500, -0.041875, -0.011875, 0.014375

#*# 0.023125, 0.011875, -0.003125, -0.021250, -0.026875, -0.027500, -0.025625, -0.010625, 0.011250, 0.026875

#*# 0.020625, 0.014375, 0.001875, -0.014375, -0.027500, -0.033750, -0.027500, -0.013750, 0.000000, 0.016250

#*# 0.025625, 0.015000, -0.005625, -0.021875, -0.031250, -0.036875, -0.020000, -0.008750, 0.008125, 0.024375

#*# 0.020000, 0.013125, 0.008125, -0.020625, -0.018750, -0.023125, -0.013750, 0.005625, 0.014375, 0.031875

#*# 0.001250, -0.006250, -0.011250, -0.029375, -0.036250, -0.028750, -0.022500, -0.005625, 0.016875, 0.026250

#*# -0.045625, -0.045000, -0.048125, -0.061250, -0.070000, -0.076875, -0.065000, -0.061250, -0.031250, -0.012500

#*# -0.069375, -0.103125, -0.108125, -0.128125, -0.137500, -0.135625, -0.127500, -0.115625, -0.093750, -0.073125

#*# x_count = 10

#*# y_count = 10

#*# mesh_x_pps = 5

#*# mesh_y_pps = 5

#*# algo = bicubic

#*# tension = 0.2

#*# min_x = 19.599999999999994

#*# max_x = 199.06

#*# min_y = 1.8

#*# max_y = 190.8

Firstly, please follow the template when opening such a request. It is there for a reason.

Regarding your issue, your START_PRINT_ADAPTIVE seems incomplete. There is no code that would accept and parse the temperature as handed over by the slicer.

Refer to Using START_PRINT and END_PRINT Macros for an example how it should look like.

Thanks in advice, i fixed and updated the gcode and the section in SuperSlicer and now works like a charm.

this is the gcode updated


[gcode_macro START_PRINT_ADAPTIVE]
gcode:
	G90 ; Set all axes to absolute
	M82; set extruder to absolute
	G21; Set all in mm
	G28 ;Home
  M140 S{params.BED_TEMP}; #set bed temperature
	M190 S{params.BED_TEMP}; #wait bed temperature
	BED_MESH_CALIBRATE ADAPTIVE=1;
	M104 S{params.EXTRUDER_TEMP}; #set extruder temperature
  G1 X0 Y0 F3000
	M109 S{params.EXTRUDER_TEMP}; #wait extruder temperature
	G1 X-3.50 Y20 Z0.3 F2000.0 ; Move to start position
	G1 X-3.50 Y100.0 Z0.3 F1500.0 E15 ; Draw the first line
	G1 X-1.50 Y100.0 Z0.3 F2000.0 ; Move to side a little
	G1 X-1.50 Y20 Z0.3 F1500.0 E30 ; Draw the second line
	G92 E0;

And this is the start Gcode section in SuperSlicer

START_PRINT_ADAPTIVE EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]

without the params option klipper wont take variables, i didnt find anything about that, only some old reddit.
Thanks anyway for the support