G29 always before starting a print.



  • The title sums up what I´m looking for.

    Is it possible to do like on the prusas and automatically probe the bed every time before a print?
    I could put G29 something on the gcode I know but that´s not what I´m looking for.

    BTW
    Another issue that is puzzling me, I have this command on the config.g file:

    M557 X0:300 Y0:200 S50 ; Define mesh grid

    But strangely, changing the S parameter does nothing. This is the settings for the G29 right?
    I don´t have any other M557 on the config file or on any other file. What am I missing here?

    Thanks for any help.
    Fred

    P.S.

    Is there any way to convert a duet ethernet to a duet wifi?



  • I do a G29 before every print. In the start G-Code in the slicer. (Cura)



  • If you have some other routine to run before the print starts, you can use start.g and M98 to call macros.


  • administrators

    As others have said, put G29 in either you slicer start gcode or in start.g. It's probably best in the slicer start gcode, after the bed is up to temperature.

    To use a Duet Ethernet on a WiFi network, the easiest way buy a nano router such as the TPLink WR810N. It's possible to convert a Duet Ethernet to a WiFi but it would void the warranty. You would have to unplug the Ethernet daughter board, desolder the socket strips that it plugs into, use solder wick to remove the residual solder from the top surface, then solder in a ESP-12S or ESP-07S WiFi module. Then upload and install the WiFi firmware. Then sell the Ethernet daughter board to someone who wants to do the conversion the other way.



  • Thank you guys for your answers.

    I was not aware of a start.g file I think you could include a list of all the possible .g files right in the configuration folder, each file could have a commented top section where the workings of it would be explained.

    dc42, you suggest the bed probing to be done after the bed is hot because of some deformation that may occur due to the heat right?

    On gcodes I produce I can add the commands, no problem, even on gcodes I get elsewhere I could edit but would be very nice if the firmware could do that automatically by analysing the beginnings of a gcode file and insert the G29 after the bed is at temperature or maybe processe the gcode until the temperature setting then grab the value and when achieved insert the G29 and then proceed with the rest of the gcode.

    I have Prusa printer besides the dbot where I have the Duet, the prusas do this, you tell them to print and they heat up, probe the bed and start the print, always.

    This could be a nice feature for reprap firmware I think.

    Once again, thank you for your answers. I think I´ll leave the ethernet adapter on the board 🙂

    Cheers,
    Fred


  • administrators

    @derfred:

    dc42, you suggest the bed probing to be done after the bed is hot because of some deformation that may occur due to the heat right?

    Yes.

    @derfred:

    I have Prusa printer besides the dbot where I have the Duet, the prusas do this, you tell them to print and they heat up, probe the bed and start the print, always.

    Do the Prusa printers do that based purely on the GCode? I thought you had to pick a command "Prepare to print PLA" or similar on the control panel. You can do the same thing on the Duet, just create a macro for it.



  • Probably its something they coded into their version of marlin.

    I often send them gcodes with only G20 and nothing on octoprint start scripts. the machines heat up both the bed and extruder and then probe the bed in 9 points, only then start printing.



  • Slic3R Prusa edition has the ability to add gcode commands based on filaments. I haven't tried it myself but that would be the sensible way to do it so that the temperatures are set depending on the filament to be used.

    @derfred. Duet firmware is designed to work with many different types of printer and for many different users who have different requirements. So whilst it may be necessary to compensate for bed level and flatness on Prusa printers, some of us have printers with inherently flat and level build plates,. In this case it is both unnecessary and undesirable to probe the bed before every print. Duet firmware can do everything that Prusa firmware can do and more, but by using either the start.g file or putting the commands in the start script of the slicer. Which means that every user can adapt things to suit their own particular printer/requirements rather than have features which may be unnecessary thrust upon them as would be the case if the firmware did the bed probing automatically for every print.



  • @deckingman

    I added G29 to the start.g file but nothing happened. Any ideas?

    You can have a flat bed if you use a glass but I don´t like glasses, I like a 3mm aluminium bed with pei over it. Probably a very flat or patiently water sanded 6mm or thicker aluminium sheet with a silicone heater below it would be a good bed also but never tried.

    The idea was to do as the prusas do, I throw a gcode with only a G28 command to them and they:

    1.heat to temperature

    1. probe the bed in only 9 points
    2. start printing

    No more no less and this works fine. Of course they have to do this because their beds are PCB and are not flat or can be adjusted which I think its wrong but understandable for the type of printer type and public they´re targeted.


  • administrators

    @derfred said in G29 always before starting a print.:

    I added G29 to the start.g file but nothing happened. Any ideas?

    Which firmware version are you running> The start.g file is only implemented in recent versions. It was first supported in either 1.20 or 1.21, I can't remember which but the release notes in the whatsnew file will say.



  • That´s it then. I have version 1.18

    Thanks for the reply



  • @derfred said in G29 always before starting a print.:

    @deckingman

    I added G29 to the start.g file but nothing happened. Any ideas?

    You can have a flat bed if you use a glass but I don´t like glasses, I like a 3mm aluminium bed with pei over it. Probably a very flat or patiently water sanded 6mm or thicker aluminium sheet with a silicone heater below it would be a good bed also but never tried.

    The idea was to do as the prusas do, I throw a gcode with only a G28 command to them and they:

    1.heat to temperature

    1. probe the bed in only 9 points
    2. start printing

    No more no less and this works fine. Of course they have to do this because their beds are PCB and are not flat or can be adjusted which I think its wrong but understandable for the type of printer type and public they´re targeted.

    That's fine. I didn't say you had to have a flat bed. I'm aware that many people don't. I was just making the point that some of us do. So if David did as you asked and forced everyone to always probe the bed by putting into the firmware, then those of use who don't need that feature will be pretty upset.

    You can do what you want by putting the commands in the start g.code of your slicer. That's what I do. So when I want to print something, I just turn on the machine, select the file and hit "Print". You can do the same. But there are things in my start gcode that you wouldn't want to do because my printer is very different to yours. For example, you probably don't need to set mixing ratios or heat the nozzle before you home Z. So you can do what you want to do, and I can do what I want to do and everyone is happy. That's the way Duet works.



  • @deckingman

    I was just suggesting a feature, not exactly asking for a change on how things work...

    In the mean time I updated the firmware and now I have a weird behaviour, Added S2 to the G1 movement of the Z in the beginning of the homeall.g The machine now responds but the Y movement is reversed and the old homeall file no longer works, I´m posting it here:

    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool on Thu Jul 27 2017 11:25:57 GMT+0100 (WEST)

    ; Relative positioning
    G91

    ; Lift Z relative to current position
    G91
    G1 Z5 F6000 S2
    G90

    ; ##### HOME XX #####

    ; Move quickly to X axis endstop and stop there (first pass)
    G1 X-612 F1800 S1

    ; Go back a few mm
    G91
    G1 X5 F6000
    G90

    ; Move slowly to X axis endstop once more (second pass)
    G1 X-312 F360 S1

    ; ##### HOME YY #####

    ; Move quickly to Y axis endstop and stop there (first pass)
    G1 Y412 F1800 S1

    ; Go back a few mm
    G91
    G1 Y-5 F6000
    G90

    ; Move slowly to Y axis endstop once more (second pass)
    G1 Y212 F360 S1

    ; ##### HOME ZZ #####

    ; Move Z up until the switch triggers
    G1 Z-340 S1 F1400

    ; Back to absolute positioning
    G90

    ; Tell the firmware where we are
    G92 Z0

    ; lower head, stop when probe triggered and set Z to trigger height
    G30

    ; Uncomment the following line to lower the bed after probing
    G1 Z15 F1400 S2

    ;Load height map from probing
    G29 S1

    ; disable motors after 10 seconds
    M84 S10

    My bed is 190X 290
    the X endstop is at the left top corner looking at the machine from the front and the Y endstop is at the right top corner The Z is an induction probe

    All was working well before the update...



  • Make sure you read the release notes between 1.18 and whatever you are using now. Might need to reverse the direction of the motors in config.g. One big thing that caught a lot of people is the need to remove the deploy and retract probe folders if not using a retracting probe.



  • @number40fan Reversing the Y motor direction worked, now it probes well but at the end displays this message:

    "Error: Z probe already triggered at start of probing move"

    I´m using this in config.g:

    //////

    ; Configuration file for Duet Ethernet (firmware version 1.17)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool on Thu Jul 27 2017 11:25:57 GMT+0100 (WEST)

    ; General preferences
    M111 S0 ; Debugging off
    G21 ; Work in millimetres
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves
    M555 P2 ; Set firmware compatibility to look like Marlin
    M586 P1 S1 ;Allow FTP

    M667 S1 ; Select CoreXY mode
    M208 X0 Y0 Z0 S1 ; Set axis minima
    M208 X290 Y190 Z335 S0 ; Set axis maxima

    ; Endstops a funcionar com endswitch
    ;M574 X1 Y2 Z1 S0 ; Define active low and unused microswitches
    ;M558 P0 X0 Y0 Z0 H20 F120 T6000 ; Set Z probe type to switch, the axes for which it is used and the probe + travel speeds
    ;G31 P600 X0 Y0 Z0 ; Set Z probe trigger value, offset and trigger height
    ;M557 X0:290 Y0:190 S20 ; Define mesh grid

    ; Endstops a funcionar com sensor
    M574 X1 Y2 S0 ; Define active low and unused microswitches
    M574 Z1 S2 ; O do ZZ
    M558 P4 I0 H5 F500 T5000 ; Set Z probe type to switch, the axes for which it is used and the probe + travel speeds F era 120
    G31 P400 X28 Y12 Z0.42 ; Set Z probe trigger value, offset from probe to nozzle and trigger height - O trigger height deu 0,41 seguindo o protocolo) Valor Z0.82 com pei Z0.5
    M557 X0:300 Y0:200 S50 ; Define mesh grid

    ; Drives
    ;M572 D0 S0.15

    M569 P0 S0 ; Drive 0 goes backwards era 0
    M569 P1 S0 ; Drive 1 goes forwards era 1
    M569 P2 S0 ; Drive 2 goes backwards
    M569 P3 S0 ; Drive 3 goes forwards (Extruder)
    M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
    ; M92 X100 Y101 Z400 E133 ; Set steps per mm BOWDEN
    ;M92 X101 Y101 Z406 E141 ; Set steps per mm PRUSA EXTRUDER E140 é o normal // Este tem medidas muito exactas
    M92 X100 Y100 Z404 E141 ; Set steps per mm PRUSA EXTRUDER E140 é o normal // Este é parecido com as prusas

    ; Movements
    ;M203 X4200000 Y2700000 Z300 E144000 ; Set maximum speeds (mm/min) DO GENERATOR
    M203 X18000 Y18000 Z900 E3000 ; Set maximum speeds (mm/min) em teste
    ;M201 X950 Y950 Z30 E1000 ; Set accelerations (mm/s^2) /// Bowden
    ;M201 X800 Y800 Z30 E1000 ; Set accelerations (mm/s^2). /// Direct
    M201 X1000 Y1000 Z100 E150 ; Set accelerations (mm/s^2) //// Em teste
    ;M566 X2400 Y2400 Z12 E2750 ; Set maximum instantaneous speed changes (mm/min) Jerk /// BOWDEN
    M566 X800 Y800 Z30 E30 ; Set maximum instantaneous speed changes (mm/min) Jerk /// DIRECT
    M906 X900 Y900 Z900 E900 I10 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S20 ; Set idle timeout

    ; Heaters
    M143 S280 ; Set maximum heater temperature to 280C

    ; M301 H0 S1.00 P10 I0.1 D200 T0.4 W180 B30 ; Use PID on bed heater (may require further tuning)
    ; M307 H0 A97.6 C712.3 D0.5 B0 ;PID Heater0 (Heatbed)
    ; M307 H1 A496.6 C220.4 D8.0 B0 ;PID Heater1 (hotend 0)
    M305 P0 T100000 B3950 C0 R4700 ; Set thermistor + ADC parameters for heater 0 /// B era 4138
    M305 P1 T100000 B4725 C7.06e-8 R4700 ; Set thermistor + ADC parameters for heater 1

    M570 H1 P20 T120 ; Modifica o threshold de temperaturas do extrusor quando entra a layer fan

    ; 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

    ; Network
    M550 Dbot ; Set machine name
    M540 PBE:EF:DE:AD:FE:ED ; Set MAC address
    M552 P0.0.0.0 S1 ; Enable network and acquire dynamic address via DHCP
    M586 P0 S1 ; Enable HTTP
    M586 P1 S1 ; Enable FTP
    M586 P2 S0 ; Disable Telnet

    ; Fans
    M106 P0 S0 I0 B0.2 F30 H-1 ; Layer FAN Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1.0 I0 B0.2 F30 H1 T50 ; EXTRUDER FAN Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
    M106 P2 S0.50 I0 B0.2 F20 H0 T35 ; CASE FAN Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on

    ; Custom settings are not configured

    M501

    /////*

    I suppose the part that maters is this but I´m posting all the file in case something else I´m not aware is causing this:

    ; Endstops a funcionar com sensor (means endstops working with sensor)
    M574 X1 Y2 S0 ; Define active low and unused microswitches
    M574 Z1 S2 ; O do ZZ
    M558 P4 I0 H5 F500 T5000 ; Set Z probe type to switch, the axes for which it is used and the probe + travel speeds F era 120
    G31 P400 X28 Y12 Z0.42 ; Set Z probe trigger value, offset from probe to nozzle and trigger height - O trigger height deu 0,41 seguindo o protocolo) Valor Z0.82 com pei Z0.5
    M557 X0:300 Y0:200 S50 ; Define mesh grid

    I´m using an inductive probe connected to the E0 endstop if I remember well,the led turns off when approaching the bed.

    What puzzles me is that the G28 (homeall.g) and the G29 are working well.

    What could be the reason for the error message?


  • administrators

    If homing and G29 work OK, what do you do that provokes the error message?



  • @dc42 said in G29 always before starting a print.:

    K, what do you do that provokes the error messa

    That´s exactly my question... I thought it could be the probe type:

    M558 P4 I0 H5 F500 T5000 ;

    I could change it to P7...

    I´m using type 4 and no Z switch endstop is connected.

    When is this message displayed? Should be some exception in the firmware I guess.

    Also tried to change the I parameter in the M558 and the Z1 to Z2 in the M574 but the machine wouldn´t work that way.

    My homeall.g is not like the one you suggest in the docs, do you see any mistake there?


  • administrators

    That message is displayed if the firmware was about to probe the bed, because of a G30 or G29 command, but the Z probe was already reporting triggered before the probing move started.

    Have you tested your Z probe as described at https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe



  • @dc42

    Done the procedure and got -0,032 three times, my probe is an inductive probe, the led its always on and when in proximity with metal turns off.

    Anyway, decided to test this value and it worked fine, the first layer was very slightly high but I admit I was surprised since the vale I had before was 0.41 and I didn´t touched the probe.

    Strange but it´s working! Thanks.

    The error message continues... Could this be related to the type of probe? mine seems to be on until it id triggered. I think I have this right in the config.



  • @dc42

    Something is not well with this new firmware or web server.

    For the second time I will have to inject the firmware with samba because after restarting from saving the config.g file the webserver stops responding and the ethernet board stops blinking the leds.

    Can be the sdcard or some routine in the shutdown of the firmware that is not well, probably its corrupting the firmware in the rom or in the card.

    The machine was working perfectly with 1.16, rebooted it dozens of times and no problems, now it has failed twice in one day.

    EDIT:

    Well, I think I know what is happening, after saving the config.g file the system saves it as congig.g.bak changing the name in the sd card works but why is the system doing this?


Locked
 

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