Help. Calibrate X and Y axis
Hello to the whole community.
my construction of my printer is not perfect, the axes are not perfectly at 90 degrees, or perpendicular. Can this error be compensated by software? I need some sensor ?. Thank you.
my construction of my printer is not perfect, the axes are not perfectly at 90 degrees, or perpendicular. Can this error be compensated by software? I need some sensor ?. Thank you.
Comments
/* If your printer is not exactly square but is more like a parallelogram, you can
use this to compensate the effect of printing squares like parallelograms. Set the
parameter to then tangents of the deviation from 90° when you print a square object.
E.g. if you angle is 91° enter tan(1) = 0.017. If error doubles you have the wrong sign.
Always hard to say since the other angle is 89° in this case!
*/
#define FEATURE_AXISCOMP 0
#define AXISCOMP_TANXY 0
#define AXISCOMP_TANYZ 0
#define AXISCOMP_TANXZ 0
Values are stored in eeprom so enabling it will normally cause wrong values in eeprom, so change them after enabling to right values.
#define AXISCOMP_TANXY 0.017
#define AXISCOMP_TANYZ 0
#define AXISCOMP_TANXZ 0
Values are stored in eeprom
Enable z-correction (DISTORTION_CORRECTION)
Enable axis compensation (requires z-probing enabled, even without z-probe available)
#define FEATURE_AXISCOMP 1
#define AXISCOMP_TANXY 0.176 // 10 grados
#define AXISCOMP_TANYZ 0
#define AXISCOMP_TANXZ 0
Z-probe pin : maxEndStop
M501 //load epromm
////
No found. No change
#define FEATURE_AXISCOMP 1
Is all you need to enable it. See this code doing the transformation in BedLeveling.cpp:
/*
Transforms theoretical correct coordinates to corrected coordinates resulting from bed rotation
and shear transformations.
We have 2 coordinate systems. The printer step position where we want to be. These are the positions
we send to printers, the theoretical coordinates. In contrast we have the printer coordinates that
we need to be at to get the desired result, the real coordinates.
*/
void Printer::transformToPrinter(float x, float y, float z, float &transX, float &transY, float &transZ) {
#if FEATURE_AXISCOMP
// Axis compensation:
x = x + y * EEPROM::axisCompTanXY() + z * EEPROM::axisCompTanXZ();
y = y + z * EEPROM::axisCompTanYZ();
#endif
#if BED_CORRECTION_METHOD != 1 && FEATURE_AUTOLEVEL
if(isAutolevelActive()) {
transX = x * autolevelTransformation[0] + y * autolevelTransformation[3] + z * autolevelTransformation[6];
transY = x * autolevelTransformation[1] + y * autolevelTransformation[4] + z * autolevelTransformation[7];
transZ = x * autolevelTransformation[2] + y * autolevelTransformation[5] + z * autolevelTransformation[8];
} else {
transX = x;
transY = y;
transZ = z;
}
#else
transX = x;
transY = y;
transZ = z;
#endif
}
As you see this adds extra x depending on y position multiplied with your value. So moving Y 100mm should move X 100*0.176 = 17.6 mm in your 10° test.