Out of date G31 documentation
-
https://docs.duet3d.com/User_manual/Reference/Gcodes#g31-set-or-report-current-probe-status says "Optional parameters 'S' (temperature in °C at which the specified Z parameter is correct, default is current temperature) and 'T' (temperature coefficient of Z parameter in mm/°C, default zero). This is useful for probes that are affected by temperature. In RRF3 you must specify which temperature sensor to use in the 'H' parameter." but I believe this to be out of date.
From Zprobe.h and Zprobe.cpp at https://github.com/Duet3D/RepRapFirmware/blob/43dbde5e47a99b8ab6ba3eb2169df71e49184186/src/Endstops/ZProbe.cpp it is apparent that there are now two temperature coefficients and that the coefficients are applied not to the measurement in C but rather to the difference between the current measurement and the stated calibration temperature.
I propose this element of documentation be revised to something like the following, which I think is what RRF actually does.
Optional parameters 'S' (temperature in °C at which the specified Z parameter is correct, default is current temperature) and 'T' (one or two temperature coefficients of the Z parameter, default zero). This is useful for probes that are affected by temperature. In RRF3 you must specify which temperature sensor to use in the 'H' parameter. If two parameters are specified the first is the variation of height with bed temperature and the second is variation with the square of temperature. The parameters are applied to the difference between current measured temperature and calibration temperature 'S'.
For example, G31 Z1.2 T0.03:0.02 S20 H2 when sensor 2 measures 26C would calculate trigger height as 1.2 + 0.03x6 + 0.02x6x6 = 2.1mm .
-
-
@achrn thanks for pointing this out. We will update the documentation.
-
@achrn Thanks for reporting this. I think I got part way through updating G31 a few weeks ago, and didn't quite finish it! I have updated the documentation with a better description, but also used your examples. See https://docs.duet3d.com/en/User_manual/Reference/Gcodes#g31-set-or-report-current-probe-status
For the 3.3 and later section, it now reads:-
X,Y,U,V,W,A,B,C...nnn offsets of the Z probe relative to the print head (i.e. the position when the empty tool is selected) can be specified. This allows you to calculate your probe coordinates based on the geometry of the bed, without having to correct them for Z probe X,Y,U,V,W,A,B,C...nnn offset.
-
Optional parameter 'S' specifies the temperature in °C at which the specified Z parameter is correct. The default is current temperature. In RRF3 you must specify which temperature sensor to use in the 'H' parameter.
-
Optional parameter 'T' specifies one, or two, temperature coefficients of the Z parameter, default zero. This is useful for probes that are affected by temperature.
- If one parameter is specified, it is the variation in Z parameter height with the change in sensor temperature in mm/°C. The parameter is applied to the difference between current measured temperature and calibration temperature 'S'. For example, G31 Z1.2 T0.02 S20 H2 when sensor 2 measures 26C would calculate trigger height as 1.2 + 0.02x6x6 = 1.92mm
- If two parameters are specified, the first is the variation in Z parameter height with the change in sensor temperature in mm/°C, and the second is variation in Z parameter height with the square of temperature. The parameters are applied to the difference between current measured temperature and calibration temperature 'S'. For example, G31 Z1.2 T0.03:0.02 S20 H2 when sensor 2 measures 26C would calculate trigger height as 1.2 + 0.03x6 + 0.02x6x6 = 2.1mm
I saw your comment in another thread about the reporting of values not working; I'll highlight that to @dc42.
Ian
-
-
-