@Martín The commands to know are:
M104 - Set Extruder Temperature
M109 - Set Extruder Temperature and Wait
M140 - Set Bed Temperature (Fast) or Configure Bed Heater
M190 - Wait for bed temperature to reach target temp (set temperature and waits)
For M104 and M140, the temperature is set and heating starts, but then control is returned, ie it will do the next Gcode straight away, without waiting for the heater to get to temperature.
For M109 and M190, you can't control the printer while the heater heats up.
If you want to do it in the order: Home -> Heat Bead (to temperature) -> BLtouch -> Heat Nozzle -> Print, then:
M104 S0 ; set nozzle temp to 0 G28 ; home M190 S60 ; set bed temp and wait G29 ; mesh compensation after bed has heated up, in case it moves G28 Z ; rehome Z, to take account of bed moving when heated, and to set mesh compensation at the correct height M109 S200 ; set hot end temp and waitI've set the bed temperature before doing the mesh, and added an extra home Z.
In Prusaslicer you can use the parameters from the filament you have selected to fill the numbers in, eg
M190 S[first_layer_bed_temperature] M109 S[first_layer_temperature]See https://help.prusa3d.com/article/list-of-placeholders_205643 on how to find and use these.
This is my start G-code in Prusaslicer. I tend to do the mesh compensation beforehand. It also extrudes a thick line at the front of the bed (my X0 Y0 is in the centre of the bed) to get the nozzle going:
T0 M190 S[first_layer_bed_temperature] M109 S[first_layer_temperature] G28 G1 X-80 Y-80 Z0.3 F6000 ;Move the platform M83 ;relative extrusion mode G92 E0 G1 X0 F500 E20 G92 E0Ian