Adding "load mesh" and "pressure advance" in the config.g



  • Hello,

    Is this the right way to add the commands to load the bed mesh and the pressure advance value in my config.g as below?

    ; Configuration file for Duet WiFi (firmware version 1.21)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Thu Dec 13 2018 23:04:14 GMT+0200 (Eastern European Standard Time)

    ; General preferences
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    ; Network
    M550 P"GP CR20" ; Set machine name
    M552 S1 ; Enable network
    M587 S ; Configure access point. You can delete this line once connected
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    M569 P0 S0 ; Drive 0 goes backwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
    M92 X200.00 Y200.00 Z400.00 E415.00 ; Set steps per mm
    M566 X1200.00 Y1200.00 Z24.00 E600.00 ; Set maximum instantaneous speed changes (mm/min)
    M203 X45000.00 Y45000.00 Z600.00 E3000.00 ; Set maximum speeds (mm/min)
    M201 X2000.00 Y2000.00 Z100.00 E1500.00 ; Set accelerations (mm/s^2)
    M906 X1200.00 Y1200.00 Z560.00 E560.00 I30 ; 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 X235 Y200 Z250 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y1 Z1 S1 ; Set active high endstops

    ; Z-Probe
    M558 P5 I1 F500 T6000 ; Set Z probe type to switch and the dive height + speeds
    G31 P1000 X-55 Y0 Z0.52 ; Set Z probe trigger value, offset and trigger height
    M557 X20:180 Y20:200 S30 ; Define mesh grid

    ; Heaters
    M305 P0 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 0
    M143 H0 S110 ; Set temperature limit for heater 0 to 110C
    M305 P1 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 1
    M143 H1 S280 ; Set temperature limit for heater 1 to 280C

    ; Fans
    M106 P0 S0 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on

    ; Tools
    M563 P0 D0 H1 ; 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

    ; Automatic power saving
    M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss

    ; Custom settings are not configured
    M501
    G29 S1
    M572 D0 S0.1; set K-factor



  • Yeah that's fine. Typically M501 is the last command in config.g because it loads config-override.g which is meant to replicate the EEPROM function of 8bit controllers.

    So maybe flip those around, but otherwise you got it.



  • I put every custom setting into config-override.g just for convenience 🙂


  • administrators

    @briskspirit said in Adding "load mesh" and "pressure advance" in the config.g:

    I put every custom setting into config-override.g just for convenience 🙂

    Bear in mind that config-override.g gets overwritten whenever you run M500.



  • @dc42 So I need to make some macros and call it from config.g ?



  • @briskspirit What's the reason for not just putting it in config.g?

    But if you want to be able to quickly switch between configurations you can have them all in a macro and call them whenever you want to switch.

    The filament swap functionality actually lets you define a custom config.g for each filament type you want.



  • I have been testing my setup and i am not sure that the config.g commands work. Not sure it loads the bed mesh with G29 S1. I have had to stop a print and manually load it to see that the print actually sticks to the bed as it has been calibrated to.



  • @gpetropoulos Right after you power up the printer, send M122 in the gcode console. It should say if any bed compensation is active.

    If G29 S1 doesn't seem to work, try M375, which should do the same thing. (Load heightmap.csv)



  • @phaedrux said in Adding "load mesh" and "pressure advance" in the config.g:

    M122

    I did this and i get :

    "Hiccups: 0, StepErrors: 0, LaErrors: 0, FreeDm: 240, MinFreeDm: 132, MaxWait: 1564293ms, Underruns: 0, 0
    Scheduled moves: 13, completed moves: 13
    Bed compensation in use: mesh
    Bed probe heights: 0.000 0.000 0.000 0.000 0.000"

    What are the 0 bed probe heights?



  • @gpetropoulos said in Adding "load mesh" and "pressure advance" in the config.g:

    Bed compensation in use: mesh

    That's the line that matters in your case. That indicates mesh compensation is active.



  • @phaedrux Is there any command to check the current PA value?
    I have made a gcode to find my PA value. Thus after that when printing a xyz cube i see it is too high for my direct setup. I also see z seam problems after adding PA.



  • @gpetropoulos you can see the current value of anything by sending the command again in the console without any parameters. So for pressure advance in a single extruder you could send 'M572 D0'

    https://duet3d.dozuki.com/Wiki/Pressure_advance

    Pressure advance is a bit different than linear advance used in Marlin, so the techniques for determining the value are a bit different. There is another thread with a pythod script that can be used to determine it, which may help.

    https://forum.duet3d.com/topic/6698/pressure-advance-calibration



  • @phaedrux Thank you again!!


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.