Getting this error on each layer: Unknown command:"_ON_LAYER_CHANGE

Hi all, I'm getting my VCore 3.1 ready (first build) and slowly tuning the printer setting and filament settings. But I keep getting this error on each layer. Unknown command:"_ON_LAYER_CHANGE and have no clue what it means I'm using Prusaclicer Start G-code
M190 S0 ; Prevents prusaslicer from prepending m190 to the gcode ruining our macro M109 S0 ; Prevents prusaslicer from prepending m109 to the gcode ruining our macro START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]
any idea what this error is? Thanks in advanced for your time.
Solution:
_ON_LAYER_CHANGE isn't a thing in RatOS 2.0, remove _ON_LAYER_CHANGE from your slicers "custom g-code" layer change section.
Jump to solution
5 Replies
blacksmithforlife
Your slicer is outputting that command and klipper doesn't understand it Look in your slicer and disable it
WernerS
WernerS4d ago
Thanks, but i do not know what or where to look.
Solution
miklschmidt
miklschmidt3d ago
_ON_LAYER_CHANGE isn't a thing in RatOS 2.0, remove _ON_LAYER_CHANGE from your slicers "custom g-code" layer change section.
miklschmidt
miklschmidt3d ago
Alternatively, you can implement it yourself by manually pasting the following into printer.cfg:
[gcode_macro _ON_LAYER_CHANGE]
gcode:
SET_PRINT_STATS_INFO CURRENT_LAYER={params.LAYER|int}
[gcode_macro _ON_LAYER_CHANGE]
gcode:
SET_PRINT_STATS_INFO CURRENT_LAYER={params.LAYER|int}
WernerS
WernerS2d ago
Found it, Thanks again