Duet maestro and weirdness on start gcode



  • My maestro started behaving weird. I dont remember if it happened after flashing firmware. I have this start code:
    G28 ; home all without mesh bed level
    G0 Z70 F500 ; get head above bed to keep it cool
    M106 P1 S255 ; Turn on fan
    M140 S[first_layer_bed_temperature] ; set bed temp
    M104 S180
    M190 S[first_layer_bed_temperature] ; wait for bed temp
    M104 S180
    G28 ; home all without mesh bed leveling
    G29 S0 ; mesh bed leveling
    M106 S0 ; Turn off fan
    M104 S[first_layer_temperature] ; set extruder temp
    M109 S[first_layer_temperature] ; wait for extruder temp
    G1 Y0 X2 Z0.5 F7000 ; go outside print area
    G92 E0 ; reset extrusion distance
    G1 X70.0 E9 F1000 ; intro line
    G1 X140 E12.5 F1000 ; intro line
    M572 D0 S0.07 ; Pressure advance
    It does not do "go outside print area" . Extruder stays as where probing finished and does intro line ~10mm above bed at the back instead of front at Z0.5mm



  • ...What is the intended behavior, and what is it doing instead?



  • It jas to move to the front of the bed and do purging line. Instead it stays at the back and purges mid air.



  • Post your config.g



  • Perhaps you need to add G90 before the move to go out of the printing area to make it an absolute position move and then back to G91 for a relative move to draw the prime line.



  • The thing is it was working fine. I still have duet wifi(eth now) with the same script and it works fine.



  • @clearlynotstef said in Duet maestro and weirdness on start gcode:

    Post your config.g

    ; Configuration file for Duet Maestro (firmware version 1.21)

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

    ; Network
    M550 P"Scrappy" ; Set machine name
    M552 P0.0.0.0 S1 ; Enable network and acquire dynamic address via DHCP
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    M584 X0 Y1 Z2:4 E3 P3 ; two Z motors connected to driver outputs 0, 1, 2 and 4
    M671 X40:287 Y21:21 S5 ; leadscrews left and right

    M569 P0 S0 ; Drive 0 goes forwards
    M569 P1 S0 ; Drive 1 goes forwards
    M569 P2 S0 ; Drive 2 goes forwards
    M569 P3 S0 ; Drive 3 goes forwards
    M569 P4 S0 ; Drive 3 goes forwards
    M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
    M92 X98.66 Y78.54 Z396.04 E417.61 ; Set steps per mm X99.25 Y79.0
    M566 X400 Y400 Z12 E150 ; Set maximum instantaneous speed changes Jerk (mm/min) buvo Z24 E300
    M203 X12000 Y12000 Z1000 E1200 U6000 ; Set maximum speeds (mm/min) Z800
    M201 X600 Y600 Z100 E5000 ; Set accelerations (mm/s^2) Z200
    M906 X800 Y800 Z700 E750 I5 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S10 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y-30 Z0 S1 ; Set axis minima
    M208 X310 Y209 Z220 S0 ; Set axis maxima

    ; Z-Probe
    M558 P4 I0 F400 X0 Y0 Z0 T12000 ; Set Z probe type, the dive height + speeds
    G31 P500 X23 Y6 Z0.566 ; Set Z probe trigger value, offset and trigger height
    M557 X35.5:239.5 Y10.5:209 S102:99 ; Define mesh grid

    ; Endstops
    M574 X1 Y1 Z2 S1 ; Define active low and unused microswitches
    ; M591 D0 P2 C4 S1 ; Filament runout
    ; M556 S79.95 X-0.1 Y0.5 Z0.55 ; Axes compensation

    ; Heaters
    M143 S350 ; Set maximum hotend temperature to 350C
    M143 H0 S120 ; Set maximum bed temperature to 130C
    M305 P1 T100000 B3950 C0 R2200 ; Set thermistor + ADC parameters for heater 1 Nozzle
    M305 P0 T100000 B3950 C0 R2200 ; Set thermistor + ADC parameters for heater 0 Bed
    M307 H1 A435.6 C127.3 8.8 B0 ; Use PID on extruder heater use M303 gain 435.6, time constant 127.3, dead time 8.8, max PWM 1.00, calibration voltage 12.0
    M307 H0 A80.2 C399.8 D2.2 B0 ; Use PID on bed heater use M303
    M570 H1 P10 T20 S160 ; Heater fault settings

    ; Fans
    M106 P2 S0 L255 F500 T45 H1 ; Hotend fan, on at 45C M106 P1 T45 S0.7 H1:2
    M106 P1 S0 I0 F500 H-1 ; Part cooling fan
    ; M106 P2 S0 I0 F500 H-1 ; LED lights

    ; Tools
    M563 P0 D0 H1 F1 ; 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
    ; LCD
    M918 P1 E4 ; enable lcd



  • post the actual start code of a generated gcode file.
    the slicer will insert additional commands at the beginning.



  • @veti here is the beginning of the gcode:

    ; external perimeters extrusion width = 0.42mm
    ; perimeters extrusion width = 0.42mm
    ; infill extrusion width = 0.50mm
    ; solid infill extrusion width = 0.42mm
    ; top infill extrusion width = 0.42mm
    ; first layer extrusion width = 0.42mm

    M107
    G28 W ; home all without mesh bed level
    G0 Z70 F500 ; get head above bed to keep it cool
    M106 P1 S255 ; Turn on fan
    M140 S75 ; set bed temp
    M104 S180
    M190 S75 ; wait for bed temp
    M104 S180
    G28 W ; home all without mesh bed leveing
    G29 S0 ; mesh bed leveling
    M106 S0 ; Turn off fan
    M104 S235 ; set extruder temp
    M109 S235 ; wait for extruder temp
    G1 Y0.0 F5000 ; go outside print area
    G92 E0 ; reset extrusion distance
    G1 X70.0 E9 F1000 ; intro line
    G1 X140 E12.5 F1000 ; intro line
    M572 D0 S0.07 ; Pressure advance
    ; Filament gcode
    G21 ; set units to millimeters
    G90 ; use absolute coordinates
    M83 ; use relative distances for extrusion
    G1 E-1.00000 F2100.00000
    G1 Z0.250 F9000.000
    ; PURGING FINISHED
    G1 X130.316 Y151.203
    G1 E1.00000 F2100.00000
    M204 S1000
    G1 F900
    G1 X183.884 Y151.203 E1.95815
    G1 X183.884 Y164.498 E0.48600
    G1 X130.316 Y164.498 E1.95816
    G1 X130.316 Y151.263 E0.48380
    G1 X130.682 Y151.569 F9000.000
    G1 F900
    G1 X183.518 Y151.569 E1.93137
    G1 X183.518 Y164.131 E0.45921
    G1 X130.682 Y164.131 E1.93137
    G1 X130.682 Y151.629 E0.45702
    G1 X131.049 Y151.935 F9000.000

    It does not contain full G1 Y0 X2 Z0.5 F7000 ; go outside print area command with set x coordinate but since i added it, has same outcome.


  • administrators

    @agniusm said in Duet maestro and weirdness on start gcode:

    G28 W ; home all without mesh bed level

    Why the W parameter?



  • @dc42 It was from prusa start script but its not there now. No change still. Probably had no effect anyway.



  • @agniusm said in Duet maestro and weirdness on start gcode:

    G1 Y0.0 F5000 ; go outside print area
    G92 E0 ; reset extrusion distance
    G1 X70.0 E9 F1000 ; intro line
    G1 X140 E12.5 F1000 ; intro line

    I say again, it looks like you're missing G90 and G91 commands here. G1 Y0 makes no sense in the context of a relative move. But the next movements are to extrude a prime like, which would require a relative move.


  • administrators

    What firmware versions are your Duet WiFi and Duet maestro running?

    Are there any error messages on the GCode Console when this happens?



  • Maestro on 2.02RC5. My duet wifi(eth now) runs 2.03 but it have never done that but start script is almost the same.
    I have not noticed any errors in the gcode console but i will keep an eye.
    It finishes mesh bed compensation, and then sort of glitches 1mm or so and stays at that last spot



  • here is the video:
    https://youtu.be/Eaedp-ZMEvg
    I have updated to 2.03 and still same.



  • you never answered Phaedrux post about switching to absolute positioning for those moves.



  • @veti I dont know why would it be different as my duet wifi works ok with the same script.
    P.S. OK. I have figured it out.
    I have placed my move to the fron of the bed before these:
    M104 S[first_layer_temperature] ; set extruder temp
    M109 S[first_layer_temperature] ; wait for extruder temp
    and now it works



  • Case closed;



  • Re-opened. Looks like it does it random. I don't know what is happening. Whenever i sliced with the new start script it went and did how it suppose to. Now prints finished and i started same file again and it again remained at the back of the bed and purged mid air.



  • as Phaedrux has said multible times in this thread, you need to make sure that when the code is executed it needs to be in absolute positioning . so add the correct G90 and G91 commands to your code.


Log in to reply