# Is it possible to store skew correction values in printer.cfg file in Klipper?

The Klipper documentation describes how I should apply skew correction:

1. Print the test model (I printed this 100x100x100 3-dimensional model)
2. Make the measurements (I have got about 0.5...0.6 mm errors at all of the axes)
3. Send skew correction G-code at the beginning of the print

This does not look like the most convenient way for me. I'd like to add these values to the Klipper configuration file to make all my prints more straight. However, I did not get the idea of how to edit printer.cfg file properly.

I'm aware of the possibility of going beyond the printing zone. I suppose that for my case (only half a millimeter on a 100 mm model) can not lead to any issues with my printer mechanics.

In the documentation, this part is not adding any details.

Can someone post some examples or short instructions to make this possible?

If you need this information: I have the original Ender 3 (3 y.o. or so) with no kinematics or electronics improvements. Only head modification: V6 with BMG direct extruder.

UPDATE

I tried to append the following to printer.cfg file:

However after restart I see error message:

• Is it even worth to correct for 0.5 mm over 100 mm? it's half percent and it could be even caused by measurement errors.
– FarO
Sep 14 at 19:14
• @FarO, I'm printing now two relatively large parts (200 mm in height) which should connect to each other. After I printed them in different orientations (I needed to orient them in this way) and the missalignment is clearly visible. So I try to fix this now. Sep 14 at 19:37

The links already describe how you should add this to your configuration file, just add the following (the ellipsis/... are indicating other lines) in your printer.cfg configuration file:

...
[skew_correction]
gcode:
SET_SKEW XY=140.4,142.8,99.8
...


If you want to include XZ and YZ skewness correction use e.g.:

SET_SKEW XY=140.4,142.8,99.8 XZ=141.6,141.4,99.8 YZ=142.4,140.5,99.5


From the manual it is advised to apply skew correction in your start G-code:

Due to the nature of skew correction it is recommended to configure skew in your start gcode, after homing and any kind of movement that travels near the edge of the print area such as a purge or nozzle wipe. You may use use the SET_SKEW or SKEW_PROFILE gcodes to accomplish this. It is also recommended to issue a SET_SKEW CLEAR=1 in your end gcode.

Note that the values are taken from the Klipper manual, you need to provide your own measurements.