G29 failing height map for a core XY config with fixed bed



  • G29 failing height map has a substantial Z offset
    Hello everyone,
    I am currently working on setting up a 3d printer for which I decided to make the heated bed fixed. The z motors are linked in series ( Za and Zb) . The current stage of the tunnig process is as follows:

    1. M564 S0 to allow movement lower than where the firmware thinks Z=0 is.
    2. G1 Z1 ; probe the center.
      3.the print head was positioned as close to the bed as it just griped on a piece of paper;
      4 G92 Z0 was used to set the new Z=0;
    3. G1 Z5 ;nozzle up 5mm
    4. G30 S-1 to probe the bed without resetting the Z=0 position
    5. The read off Z height was set in config.g as the trigger height for the Z probe:
      G31 P25 X10 Y10 Z-0.797 ; set Z probe trigger value, offset and trigger height- changed from 3.5 to 2.19 to -0.797

    Once the mesh size and spacing was defined( M557), another Z=0 datum using the Z probe has to be established?



  • Hi,

    To create the height map you need to:

    • use G30 to probe the bed at the center to set the Z=0 datum.
    • use G29 to create the height map.

    You might want to heat the bed to a typical working temperature and let it stabilize for awhile before creating the height map.

    To print using the height map you need to:

    • use G30 to probe the bed at the center to set the Z=0 datum.
    • use G29 S1 to load the height map you created above.

    I hope I have understood your question and what I have posted helps.

    Frederick



  • @fcwilt said in G29 failing height map for a core XY config with fixed bed:

    e the height map you need to:

    use G30 to probe the bed at the center to set the Z=0 datum.
    use G29 to create the height map.

    Hi ,
    I've already checked the steps that you are mentioningheight map 1310-20.jpg

    Can you please be a bit more specific on how do I compensate the errors that the map is showing? I have a hard time understanding how can I teach the z probe to adjust the height of the printhead , given the deviation that was mapped using the M557 command



  • I have also noticed that there is also a Compensation Taper procedure described in the Mesh bed compensation documentation. If on the top view of the bed height map I don't have a square/ rectangle shaped bed , the is it necessary to perform bed taper compensation?



  • @campeancalin

    Hi.

    Go back and read what I said you needed to do when printing.

    You typically have some commands in your slicer (or a macro the slicer invokes) that execute at the start of printing.

    Command like homing, setting temperatures, etc.

    To these commands you need to add:

    • using G30 to probe the bed at the center of the bed to set the Z=0 datum.
    • using G29 S1 to load the height map you have previously created.

    Loading the height map will enable mesh compensation to adjust the Z position as needed, during printing, to better follow the surface of the bed.

    How much the Z position is adjusted is determined by the current nozzle XY position and the value of the height map at the XY position.


    In the gcode file you are printing there are many, many commands that are setting the Z position. These positions assume a perfectly flat bed whose surface is exactly at Z=0.

    But beds are rarely perfect. The height map contains data the says how too high or too low the bed is at any given XY position.

    As the printing proceeds the firmware determines what the Z position is supposed to be, according to the gcode file being printed.

    Based on the currently printing XY position the firmware determines from the height map data how much the Z position should be adjusted.

    So say at the currently printing XY position the firmware computes the bed is 0.15mm too low. The firmware will lower the current Z position by 0.15mm.

    During the printing the XY position is constantly changing and the firmware constantly adjusts the Z position up or down as needed.


    Compensation taper merely reduces the amount of Z position adjustment as the printing progresses with the layer being printed being farther and farther away from the bed.


    Frederick



  • Hello Frederick,

    My main concern is that at the moment I have a warning in the console that says :
    "Warning: the height map has a substantial Z offset. Suggest use Z-probe to establish Z=0 datum, then re-probe the mesh." ; this is something that I've worked on today for example , trying to adjust the trigger height of the z probe/BLTouch, with no actual effects that would give an idea about whether or not I'm doing the right thing. Does the G29 S1 work in my slicer macro if my height map has values of -2. some?



  • @campeancalin

    That error message occurs when the height map does not include a point that is very close in value to the point used for setting the Z=0 datum.

    You bed is so out of level I don't know if you can get rid of the message.

    The trigger height setting does not affect this, it only would effect the actually printing.

    The G29 S1 loads the height map regardless of the values in the height map.

    What are the M208 values in your setup?

    Frederick



  • M208
    Axis limits X0.0:600.0, Y0.0:600.0, Z0.0:525.0



  • @campeancalin said in G29 failing height map for a core XY config with fixed bed:

    M208
    Axis limits X0.0:600.0, Y0.0:600.0, Z0.0:525.0

    Wow. That is big.

    As a test could you do this:

    • set the Z=0 datum, positioning the probe at 300, 300
    • create a test height map using M557 X290:310 Y290:310 P3. This would be a 9 point map including 300,300
    • use G29 S1 to load that map and see if you get the error

    This is just for testing, it is not a height map you would ever actually use for printing.

    Thanks.

    Frederick



  • @fcwilt
    G29
    Warning: the height map has a substantial Z offset. Suggest use Z-probe to establish Z=0 datum, then re-probe the mesh.
    9 points probed, min error 0.110, max error 0.190, mean 0.152, deviation 0.024
    Height map saved to file 0:/sys/heightmap.csvheightmap(1).csv



  • The M557 command should be included in the config.g file?



  • @all I mean, once all is good with the mesh probe, one should define the M557 within the config.g file? So so the start /end scripts within the slicer would remain relative?


  • Moderator

    Yes M557 should be in config.g

    Please post your config.g, homeall.g, homez.g, bed.g files.
    Also post the results of M122 and M98 P"config.g".
    And your slicer start gcode.

    That will give us enough information to help you.



  • @Phaedrux

    config.g

    ; Configuration file for Duet WiFi (firmware version 3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.4 on Mon Oct 05 2020 11:50:08 GMT+0300 (Eastern European Summer Time)
    
    ; General preferences
    G90                                                ; send absolute coordinates...
    M83                                                ; ...but relative extruder moves
    M550 P"Oscar"                                      ; set printer name
    M669 K1                                            ; select CoreXY mode
    
    ; Network
    M551 P""                                           ; set password
    M552 S1                                            ; enable network
    M586 P0 S1                                         ; enable HTTP
    M586 P1 S1                                         ; enable FTP
    M586 P2 S0                                         ; disable Telnet
    
    ; Drives
    M584 X1 Y0 Z2 E3:4                                 ; set drive mapping; INIT:X=0; Y=1; Z2;E3:4
    M569 P0 S0                                         ; physical drive 0 goes backwards
    M569 P1 S0                                         ; physical drive 1 goes backwards
    M569 P2 S1                                         ; physical drive 2 goes FORWARDS
    M569 P3 S1                                         ; physical drive 3 goes FORWARDS
    M569 P4 S0                                         ; physical drive 4 goes backwards
    
    M350 X16 Y16 Z16:16 E16:16 I1                      ; configure microstepping with interpolation ; INIT- M350 X16 Y16 Z16 E16:16 I1
    M92 X160.00 Y160.00 Z3200.00 E881.10:881.10        ; set steps per mm
    M566 X900.00 Y900.00 Z12.00 E120.00:120.00         ; set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z360.00 E1200.00:1200.00    ; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z20.00 E250.00:250.00         ; set accelerations (mm/s^2)
    M906 X1200 Y1200 Z1200 E1200:1200 I80              ; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                                    ; Set idle timeout
    
    ; Axis Limits
    M208 X0 Y0 Z0 S1                                   ; set axis minima
    M208 X600 Y600 Z525 S0                             ; set axis maxima
    
    ; Endstops
    M574 X1 S1 P"!xstop"                                ; configure active-high endstop for low end on X via pin xstop -added "! to xstop"
    M574 Y1 S1 P"!ystop"                                ; configure active-high endstop for low end on Y via pin ystop  - added"! to xstop"
    M574 Z1 S2                                          ; configure Z-probe endstop for low end on Z
    
    ; Z-Probe
    M950 S0 C"duex.pwm5"                               ; create servo pin 0 for BLTouch
    M558 P9 C"^zprobe.in" H5 F120 T6000                ; set Z probe type to bltouch and the dive height + speeds
    G31 P25 X20 Y37 Z2.21                          ; set Z probe trigger value, offset and trigger height- changed from 3.5 to 2.19 to -0.797,to 2.373 to 2.21 
    M557 X15:470 Y15:470 S20                           ; define mesh grid
    
    ; Heaters
    M308 S0 P"bedtemp" Y"thermistor" T100000 B4138     ; configure sensor 0 as thermistor on pin bedtemp
    M950 H0 C"bedheat" T0                              ; create bed heater output on bedheat and map it to sensor 0
    M307 H0 B0 S1.00                                   ; disable bang-bang mode for the bed heater and set PWM limit
    M140 H0                                            ; map heated bed to heater 0
    M143 H0 S250                                       ; set temperature limit for heater 0 to 120C
    M308 S1 P"e0temp" Y"thermistor" T100000 B4138      ; configure sensor 1 as thermistor on pin e0temp
    M950 H1 C"e0heat" T1                               ; create nozzle heater output on e0heat and map it to sensor 1
    M307 H1 B0 S1.00                                   ; disable bang-bang mode for heater  and set PWM limit
    M308 S2 P"e1temp" Y"thermistor" T100000 B4138      ; configure sensor 2 as thermistor on pin e1temp
    M950 H2 C"e1heat" T2                               ; create nozzle heater output on e1heat and map it to sensor 2
    M307 H2 B0 S1.00                                   ; disable bang-bang mode for heater  and set PWM limit
    
    ; Fans
    M950 F0 C"fan0" Q500                               ; create fan 0 on pin fan0 and set its frequency
    M106 P0 S1 H-1                                     ; set fan 0 value. Thermostatic control is turned off
    M950 F1 C"fan1" Q500                               ; create fan 1 on pin fan1 and set its frequency
    M106 P1 S1 H-1                                     ; set fan 1 value. Thermostatic control is turned off
    
    ; Tools
    M563 P0 S"Tool 1" D0 H1 F0                         ; define tool 0
    G10 P0 X0 Y0 Z0                                    ; set tool 0 axis offsets
    G10 P0 R0 S0                                       ; set initial tool 0 active and standby temperatures to 0C
    M563 P1 S"Tool 2" D1 H2 F0                         ; define tool 1
    G10 P1 X0 Y0 Z0                                    ; set tool 1 axis offsets
    G10 P1 R0 S0                                       ; set initial tool 1 active and standby temperatures to 0C
    
    ; Custom settings are not defined
    M912 P0 S-16.95                                    ; adjustment of the MCU temp read 
    
    ; Miscellaneous
    M575 P1 S1 B57600                                  ; enable support for PanelDue
    M501                                               ; load saved parameters from non-volatile memory
    M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
    

    Bellow there is homeall:

    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.4 on Mon Oct 05 2020 11:50:09 GMT+0300 (Eastern European Summer Time)
    M98 P"homex.g"
    M98 P"homey.g"
    M98 P"homez.g"
    

    And the homez:

    ; homez.g
    ; called to home the Z axis
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.4 on Mon Oct 05 2020 11:50:09 GMT+0300 (Eastern European Summer Time)
    G91            ; relative positioning
    G1 H2 Z5 F800  ; lift Z relative to current position
    G90            ; absolute positioning
    G1 X20 Y37 F2400 ; go to first probe point
    G30            ; home Z by probing the bed
    ;G29 S1         ; autoload the height map
    
    ; Uncomment the following lines to lift Z after probing
    G91           ; relative positioning
    G1 Z2 F100    ; lift Z relative to current position
    G90           ; absolute positioning
    

    M122 is bellow:

    M122
    === Diagnostics ===
    RepRapFirmware for Duet 2 WiFi/Ethernet version 3.1.1 running on Duet WiFi 1.02 or later + DueX5
    Board ID: 08DGM-917NK-F23T0-6JKFA-3S86Q-KZBSF
    Used output buffers: 3 of 24 (14 max)
    === RTOS ===
    Static ram: 27980
    Dynamic ram: 94972 of which 20 recycled
    Exception stack ram used: 568
    Never used ram: 7532
    Tasks: NETWORK(blocked,368) HEAT(blocked,1224) DUEX(suspended,160) MAIN(running,1816) IDLE(ready,80)
    Owned mutexes: WiFi(NETWORK)
    === Platform ===
    Last reset 00:10:14 ago, cause: power up
    Last software reset at 2020-10-13 17:56, reason: User, spinning module GCodes, available RAM 7276 bytes (slot 3)
    Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0441f000 BFAR 0xe000ed38 SP 0xffffffff Task MAIN
    Error status: 0
    MCU temperature: min 14.5, current 18.3, max 18.9
    Supply voltage: min 23.9, current 24.1, max 24.3, under voltage events: 0, over voltage events: 0, power good: yes
    Driver 0: standstill, SG min/max 0/50
    Driver 1: standstill, SG min/max 0/18
    Driver 2: standstill, SG min/max 0/329
    Driver 3: standstill, SG min/max not available
    Driver 4: standstill, SG min/max not available
    Driver 5: standstill, SG min/max not available
    Driver 6: standstill, SG min/max not available
    Driver 7: standstill, SG min/max not available
    Driver 8: standstill, SG min/max not available
    Driver 9: standstill, SG min/max not available
    Date/time: 2020-10-13 21:26:43
    Cache data hit count 1075521745
    Slowest loop: 7.55ms; fastest: 0.12ms
    I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
    === Storage ===
    Free file entries: 10
    SD card 0 detected, interface speed: 20.0MBytes/sec
    SD card longest read time 4.1ms, write time 0.0ms, max retries 0
    === Move ===
    Hiccups: 0(0), FreeDm: 169, MinFreeDm: 167, MaxWait: 50413ms
    Bed compensation in use: none, comp offset 0.000
    === MainDDARing ===
    Scheduled moves: 23, completed moves: 23, StepErrors: 0, LaErrors: 0, Underruns: 0, 0  CDDA state: -1
    === AuxDDARing ===
    Scheduled moves: 0, completed moves: 0, StepErrors: 0, LaErrors: 0, Underruns: 0, 0  CDDA state: -1
    === Heat ===
    Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
    === GCodes ===
    Segments left: 0
    Movement lock held by null
    HTTP is idle in state(s) 0
    Telnet is idle in state(s) 0
    File is idle in state(s) 0
    USB is idle in state(s) 0
    Aux is idle in state(s) 0
    Trigger is idle in state(s) 0
    Queue is idle in state(s) 0
    Daemon is idle in state(s) 0
    Autopause is idle in state(s) 0
    Code queue is empty.
    === Network ===
    Slowest loop: 40.14ms; fastest: 0.00ms
    Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions
    HTTP sessions: 1 of 8
    - WiFi -
    Network state is active
    WiFi module is connected to access point 
    Failed messages: pending 0, notready 0, noresp 0
    WiFi firmware version 1.23
    WiFi MAC address ec:fa:bc:02:19:4c
    WiFi Vcc 3.44, reset reason Unknown
    WiFi flash size 4194304, free heap 25256
    WiFi IP address 192.168.0.100
    WiFi signal strength -53dBm, reconnections 0, sleep mode modem
    Socket states: 0 0 0 0 0 0 0 0
    === DueX ===
    Read count 1, 0.10 reads/min
    

    and the M98 P"config.g".:

    	M98 P"config.g"
    Error: in file macro line 13 column 9: M551: non-empty string expected
    HTTP is enabled on port 80
    FTP is enabled on port 21
    TELNET is disabled
    Error: bad grid definition: Too many grid points; suggest increase spacing to 22.8mm
    Warning: Heater 0 appears to be over-powered. If left on at full power, its temperature is predicted to reach 365C
    Warning: Heater 1 appears to be over-powered. If left on at full power, its temperature is predicted to reach 532C
    Warning: Heater 2 appears to be over-powered. If left on at full power, its temperature is predicted to reach 597C
    

    Edit: formatting


  • Moderator

    in homez you should change the position of the probe to the center of the bed before doing G30.

    G1 X20 Y37 F2400 ; go to first probe point
    G30            ; home Z by probing the bed
    

    Error: bad grid definition: Too many grid points; suggest increase spacing to 22.8mm

    M557 X15:470 Y15:470 S20

    As the error says, your M557 has too many points. Change the spacing to at least S22.8 to stay within the limit of 441 points.

    Otherwise that looks ok. Then you just need to modify your slicer start gcode so that it has a G28 and then G29 S1 to load the heightmap.



  • @campeancalin said in G29 failing height map for a core XY config with fixed bed:

    @fcwilt
    G29
    Warning: the height map has a substantial Z offset. Suggest use Z-probe to establish Z=0 datum, then re-probe the mesh.
    9 points probed, min error 0.110, max error 0.190, mean 0.152, deviation 0.024
    Height map saved to file 0:/sys/heightmap.csvheightmap(1).csv

    So you did something like this:

    To create the test height map:

    G1 X290 Y290 ; position probe at bed center
    G30; probe the bed and set the Z=0 datum
    M557 X290:310 Y290:310 P3 ; set the probing grid
    G29; probe the bed and create the height map

    To load the test height map:

    G1 X290 Y290 ; position probe at bed center
    G30; probe the bed and set the Z=0 datum
    G29 S1; load the existing height map



  • This post is deleted!


  • @Phaedrux

    Bellow you have the slicer star g code:

    G28 ; home all axes
    G29 S1
    G1 X20 Y37 Z0.5
    G1 X10 Y10 F1500 ; move to prime
    G1 Z0.2 F3000 ; get ready to prime
    G1 X100 F5000 ; quick wipe



  • After the G28 and before G29 S1 , there has to be the G30 command?



  • @campeancalin said in G29 failing height map for a core XY config with fixed bed:

    After the G28 and before G29 S1 , there has to be the G30 command?

    Hi,

    It depends on what homeall.g does.

    I don't use my Z probe for homing Z so I need to use G30 by itself before creating the height map and again before loading the height map.

    The probe point for the G30 must be the same in both cases.

    Your homez.g file uses G1 X20 Y37 F2400. I strongly suggest you use the center of the bed for G30.

    Now your G31 command has the offsets of X=10 and Y=10.

    Are you those values are correct? That puts the Z probe very close to the hotend, closer than my probe could be.

    In any case, assuming the offsets are correct the command to position for G30 would be G1 X290 Y290 F2400.


    With that change then as long as you use G28 before creating the height and loading the height map it should work fine.

    Frederick



  • @fcwilt Thank you for your reply.

    The homez.g has been changed :

    ; homez.g
    ; called to home the Z axis
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.4 on Mon Oct 05 2020 11:50:09 GMT+0300 (Eastern European Summer Time)
    G91 ; relative positioning
    G1 H2 Z5 F800 ; lift Z relative to current position
    G90 ; absolute positioning
    G1 X270 Y270 F2400 ; go to first probe point
    G30 ; home Z by probing the bed
    ;G29 S1 ; autoload the height map

    ; Uncomment the following lines to lift Z after probing
    G91 ; relative positioning
    G1 Z2 F100 ; lift Z relative to current position
    G90 ; absolute positioning

    Also the G31 command from config.g has been changed:

    G31 P25 X20 Y37 Z2.23



  • campeancalin
    campeancalin 14 Oct 2020, 16:19

    @fcwilt: while posting the homez.g file , I noticed something that I forgot to take in consideration; the new homez.g file is bellow:

    ; homez.g
    ; called to home the Z axis
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.4 on Mon Oct 05 2020 11:50:09 GMT+0300 (Eastern European Summer Time)
    G91 ; relative positioning
    G1 H2 Z5 F800 ; lift Z relative to current position
    G90 ; absolute positioning
    G1 X270 Y270 F2400 ; go to first probe point
    G29 S1 ; autoload the height map -- initially was commented
    G30 ; home Z by probing the bed -- this was before G29

    ; Uncomment the following lines to lift Z after probing
    G91 ; relative positioning
    G1 Z2 F100 ; lift Z relative to current position
    G90 ; absolute positioning



  • @campeancalin said in G29 failing height map for a core XY config with fixed bed:

    Also the G31 command from config.g has been changed:

    G31 P25 X20 Y37 Z2.23

    OK those offsets looks better.

    Assuming the center of the bed is X300, Y300 the command to position for G30 would be G1 X280 Y263.

    To determine those values I did that math: X280 = X300 - X20 and Y263 = Y300 - Y37

    And I assume you are going to do the G29 S1 somewhere else?

    Frederick



  • @fcwilt the G29 S1 is called for in homez.g, and also , I've written it in the printing start script

    ; homez.g
    ; called to home the Z axis
    ;
    ; generated by RepRapFirmware Configuration Tool v3.1.4 on Mon Oct 05 2020 11:50:09 GMT+0300 (Eastern European Summer Time)
    G91 ; relative positioning
    G1 H2 Z5 F800 ; lift Z relative to current position
    G90 ; absolute positioning
    G1 X270 Y270 F2400 ; go to first probe point
    G29 S1 ; autoload the height map
    G30 ; home Z by probing the bed

    ; Uncomment the following lines to lift Z after probing
    G91 ; relative positioning
    G1 Z2 F100 ; lift Z relative to current position
    G90 ; absolute positioning

    And the start script for printing:

    G28 ; home all axes
    G29 S1



  • However I'm not really too sure about G29 S1 in the start script , if I already call for G 29 S1 in homez.g


Log in to reply