Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    3.4.1 rc2 G30 turns off Z motors

    Scheduled Pinned Locked Moved
    Firmware installation
    7
    14
    680
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • moth4017undefined
      moth4017 @OwenD
      last edited by

      @owend

      ; bed.g
      echo "Bed.g "
      ; called to perform automatic bed compensation via G32
      ;M561						; clear any bed transform
      ;G29							; probe the bed and enable compensation
      G28							; home
      G1 H2 Z25 F6000   		; lower Z again
      echo "start 3 point.g "
      G30 P0 X10 Y0 Z-99999 ; probe near a leadscrew
      G1 H2 Z25 F6000 
      G30 P1 X290 Y0 Z-99999 ; probe near a leadscrew
      G1 H2 Z25 F6000 
      G30 P2 X150 Y290 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors
      G1 H2 Z25 F6000 
      
      ;The value of the S parameter on the final G30 command in bed.g must equal the number of Z motors.
      

      <

      fcwiltundefined 1 Reply Last reply Reply Quote 0
      • fcwiltundefined
        fcwilt @moth4017
        last edited by

        @moth4017

        Just FYI you don't need all those G1 H2 Z moves.

        Frederick

        Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

        1 Reply Last reply Reply Quote 0
        • OwenDundefined
          OwenD
          last edited by

          I don't see any major issues in your config, but again I would ask how you are determining that the Z motor is being turned off?
          The only error you've shown is the Z probe not activating.
          There could be many reasons for that.

          moth4017undefined 1 Reply Last reply Reply Quote 0
          • moth4017undefined
            moth4017 @OwenD
            last edited by

            @owend
            Hi the Z motors are turning off as the bed falls down ( belt driven)

            <

            OwenDundefined 1 Reply Last reply Reply Quote 0
            • OwenDundefined
              OwenD @moth4017
              last edited by

              @moth4017
              Do you have a cancel.g file?
              If the print was cancelled because of the failed probing then perhaps you should look at cancel.g and/or stop.g for an M84 command.

              moth4017undefined 1 Reply Last reply Reply Quote 0
              • moth4017undefined
                moth4017 @OwenD
                last edited by

                @owend
                i dind see the "cancel.g" in the console

                ;cancel.g
                echo "Cancel.g "
                M98 P"/macros/home_max_Z"
                
                

                and it didnt run the Home max.g file

                ; home_max_Z
                M400                                                ; make sure everything has stopped before we make changes
                G91                                 				; relative positioning
                M569 P0.4 S1 D3 V10                                 ; set to stelth chop
                M569 P0.5 S0 D3 V10     							; set to stelth chop
                M569 P0.6 S1 D3 V10									; set to stelth chop
                M915 P0.4:0.5:0.6 S0 F0 R1 H200                   	; Configure Z-Axis Stall Detection
                M574 Z2 S4                                       	; Configure Z-Axis stall detection homing
                M400     											; make sure everything has stopped before we make changes
                G1 H1 Z-0.2 F3000									; move a  little  for cal of sensorless homing / not stalled
                M400 												; make sure everything has stopped before we make changes
                M913 Z70	                                  		; Lower motor current by 50%
                G1 H1 Z350                           				; Home Z-Axis actuators independently
                M400                                             	; make sure everything has stopped before we make changes
                G92 Z290											; set a Z height
                G90													; absolute positioning
                
                ;revert back 
                M913 Z100                                    		; Reset motor current
                M569 P0.4 S1 D2                                    	; reset motors back to spread cycle,
                M569 P0.5 S0 D2     								; reset motors back to spread cycle,
                M569 P0.6 S1 D2										; reset motors back to spread cycle,
                M84													; turn off motors
                
                

                <

                1 Reply Last reply Reply Quote 0
                • infiniteloopundefined
                  infiniteloop @moth4017
                  last edited by infiniteloop

                  @moth4017 To throw my two pence in: Can the faulty behaviour correlate with sensorless homing, I.e. stall detection? That’s activated for the Z axis, as well as stealth chop mode. - Just an idea, I’m far from being an expert with this …

                  1 Reply Last reply Reply Quote 0
                  • dc42undefined
                    dc42 administrators @moth4017
                    last edited by

                    @moth4017 the only reasons I can think of why the Z motors would turn off are:

                    1. They are being commanded to turn off by a M18 or M84 command
                    2. The motor current is being set very low by a M906 or M913 command. For example, if M913 has been used to reduce motor current during homing or probing, and the M913 command to restore motor current to 100% afterwards is incorrect.
                    3. The drivers have detected a short circuit condition. Incorrect use of stealthChop mode can trigger this according to the TMC22009 datasheet.
                    4. The board has reset. On this case, all motors driven directly by the Duet will turn off and the reset reason will be reported if you run M122.

                    Duet WiFi hardware designer and firmware engineer
                    Please do not ask me for Duet support via PM or email, use the forum
                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                    1 Reply Last reply Reply Quote 0
                    • oliofundefined
                      oliof
                      last edited by

                      homeall.g may be different to homez.g. Can we see that as well, please?

                      <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                      1 Reply Last reply Reply Quote 0
                      • moth4017undefined
                        moth4017
                        last edited by

                        @dc42, @infiniteloop ,@OwenD and all the others that have come up with ideas for this and my other issues re sensorless homing , i decided to go back to square one and rewrite all the macros and configs, i now have a machine that seems to be doing everything it should . so im posting all the files that i have working.

                        thes files are for a core XY , belt driven Z with a gearbox ratio 4:1

                        ; Config.g
                        G90                                            	; send absolute coordinates...
                        M83                                            	; ...but relative extruder moves
                        M550 P"Valkyrie 3030 V003"                     	; set printer name
                        M669 K1    										; core xy
                        
                        ; Network
                        M552 S1                                        	; enable network
                        M586 P0 S1                                     	; enable HTTP
                        M586 P1 S0                                     	; disable FTP
                        M586 P2 S0                                     	; disable Telnet
                        
                        ; Drives
                        M569 P0.0 S1	D2								; physical drive 0 goes forwards   
                        M569 P0.1 S1    D2								; physical drive 1 goes forwards
                        M569 P0.2 S1                                 	; physical drive 2 goes forwards ( blown needs replacing)
                        M569 P0.3 S0                                	; physical drive 3 extruder
                        M569 P0.4 S1 	D3								; physical drive 4 goes forwards D3=stealthchop
                        M569 P0.5 S0 	D3								; physical drive 5 goes backwards
                        M569 P0.6 S1 	D3								; physical drive 6 goes forwards 
                         
                        
                        M584 X1 Y0 Z0.4:0.5:0.6 E3		           		; set drive mapping FL,FR,RC
                        M350 X16 Y16 I1                       			; configure microstepping with interpolation
                        M350 Z16 E16 I1  								; configure microstepping with interpolation
                        M92 X80.00 Y80.00  Z320.00  E562.00           	; set steps per m
                        M566 X800.00 Y800.00 Z20.00 E100.00 P1        	; set maximum instantaneous speed changes (mm/min) jerk
                        M203 X24000.00 Y24000.00 Z4000.00 E400.00   	; set maximum speeds (mm/min)
                        M201 X2200.00 Y2200.00 Z50.00 E250.00 	     	; set accelerations (mm/s^2)
                        M906 X1000 Y1000 Z1000 E800 I50                	; set motor currents (mA) and motor idle factor in per cent
                        M84  X Y S20									; Set idle timeout sec
                        
                        ; Axis Limits
                        M208 S1 X-28 Y5 Z0								; set axis minima "Travel Area"
                        M208 S0 X290 Y295 Z405                          ; set axis maxima "Travel area"
                        
                        ; Endstops
                        M574 X1 S4										; configure sensorless endstop, 1 = low end, 2 = high end. S4 multipule motors
                        M574 Y2 S4										; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io1.in
                        M574 Z2 S4										; configure sensorless endstop for high end on Z, 1 = low end, 2 = high end. S4 multipule motors
                        M671 X-20:300:150 Y0:0:280 S25					; leadscrews at front left,front right, rear Center s= max correction factor  must be in same order as M584
                        
                        
                        
                        M558 P8 C"!io3.in" H10 F2000 T6000 R0 A2 S0.05  	; set Z probe type to unmodulated and the dive height + speeds
                        G31 P500 Z0.5										; set Z probe trigger value, offset and trigger height bigger the posative number the closer to the bed
                        G31 P500 X27 Y-15              						; set x,y trigger value, offset and trigger height
                        M557 X10:290 Y10:285 S100                     		; define mesh grid
                        
                        ; Heaters
                        ;Bed
                        M308 S0 P"temp0" Y"thermistor" T100000 B3950 A"Bed T °C" 		; configure sensor 0 as thermistor on pin bedtemp
                        M950 H0 C"out0" T0 Q10                      					; create bed heater output on bedheat and map it to sensor 0
                        M307 H0 R0.838 K0.331:0.000 D3.08 E1.35 S0.90 B0				; PDI info for 8mm aluminium bed 700w Heater NTC 100K 3950
                        M140 H0                                       					; map heated bed to heater 0
                        M143 H0 S130                                   					; set temperature limit for heater 0 to max C
                        ;extruder
                        M308 S1 P"temp1" Y"pt1000" A"Extruder T °C"						; configure sensor 1 as thermistor on pin e0temp (104gt2)
                        M950 H1 C"out1" T1                           					; create nozzle heater output on e0heat and map it to sensor 1
                        M307 H1 R3.558 K0.357:0.000 D9.14 E1.35 S1.00 B0 V23.8			; disable bang-bang mode for heater  and set PWM limit
                        M143 H1 S320                                   					; set temperature limit for heater 1 to max C
                        ;Chamber      
                        M308 S2 P"temp2" Y"thermistor" T100000 B4267 A"Chamber T °C"	; configure sensor 2 as thermistor on pin temp2
                        M950 H2 C"out5" T2												; create chamber heater output on 1.out0 and map it to sensor 2
                        M307 H2 B0 S1.00												; disable bang-bang mode for the chamber heater and set PWM limit
                        M141 H2															; map chamber to heater 2
                        M143 H2 S100													; set temperature limit for heater 2 to 280C
                        
                        M308 S10 Y"mcu-temp" A"MCU"                           ; defines sensor 10 as MCU temperature sensor
                        M308 S11 Y"drivers" A"Duet stepper drivers"           ; defines sensor 11 as stepper driver temperature sensor
                        
                        
                        
                        ; Fans
                        M950 F0 C"out4" Q250								; create fan 0 on pin fan0 and set its frequency
                        M106 P0 S0 H-1	C"Part Fan"							; set fan 0 value. Thermostatic control is turned off
                        M950 F1 C"out3" Q250								; create fan 1 on pin fan1 and set its frequency
                        M106 P1 S1 H1 T45	C"Extruder Fan"					; set fan 1 value. Thermostatic control is turned on
                        
                        ; Tools
                        M563 P0 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
                        T0
                        
                        ; Custom settings are not defined
                        M98 P"/macros/home_max_Z"
                        
                        ;External Buttons
                        M950 J1 C"!io2.in"			;config input pin	switch NO  connected to io2 and Gnd 
                        M581 P1 T0 C0				;T0 = emergency stop on trigger; T1 = pause print; T{N} = runs the macro "sys/trigger{N}.g", rising edge S1 falling edge S0
                        ;M581 P1 T4 c0				;run a macro trigger4.g
                        M582 T0 					; Check External Trigger
                        
                        ; homex.g
                        echo "start"
                        M569 P0.0										; Check status in console
                        M569 P0.1										; Check status in console
                        G91                                             ; relative positioning
                        M569 P0.0 S1 D3 V10                             ; set to stealth chop
                        M569 P0.1 S1 D3 V10								; set to stealth chop
                        M915 P0.0:0.1 S10 F0 R1 H200                    ; Configure Z-Axis Stall Detection
                        
                        echo "stall detection setup"
                        M17 X Y										; Check status in console
                        G1 P140											;pause to allow the drivers to characterise the motor    
                        G1 H1 X-0.2 F3000								; move a  little  for cal of sensorless homing / not stalled
                        G1 H1 Y-0.2 F3000    							; move a  little  for cal of sensorless homing / not stalle							
                        
                        echo "lower motor current"
                        M913 X70 Y70									; Lower motor current %
                        G4 P150											; wait 150ms
                        M574 X1 Y2 S4									; Configure Z-Axis stall detection homing
                        M569 P0.0										; Check status in console
                        M569 P0.1										; Check status in console
                        		
                        echo "home x"
                        G1 H1 X-350 F6000
                        G1 H2 X10 Y10
                        G1 H1 X-350 F6000						; Home Z-Axis actuators independently
                        M569 P0.0										; Check status in console
                        M569 P0.1										; Check status in console
                        G90 											; absolute positioning
                        G1 X150 F6000									; move to center of bed
                        
                        ;revert back 
                        echo "after revert back"
                        M913 X100  Y100									; Reset motor current %
                        M569 P0.0 S1 D2									; reset motors back to spread cycle,
                        M569 P0.1 S1 D2									; reset motors back to spread cycle,
                        M569 P0.0										; Check status in console
                        M569 P0.1										; Check status in console
                        
                        ;homey.g
                        												; Relative positioning
                        echo "Home Y"
                        M569 P0.0										; check status in console
                        M569 P0.1										; check status in console; relative positioning
                        G91
                        M569 P0.0 S1 D3 V10                             ; set to stelth chop
                        M569 P0.1 S1 D3 V10								; set to stelth chop
                        M915 P0.0:0.1 S10 F0 R1 H200                    	; Configure Z-Axis Stall Detection
                        
                        echo "stall detection setup"
                        M17 X Y	
                        G1 P140
                        G1 H1 X-0.5 F3000                               ; move a  little  for cal of sensorless homing / not stalled
                        G1 H1 Y-0.5 F3000    							; move a  little  for cal of sensorless homing / not stalled
                        
                        echo "lower motor current"
                        M913 X70 Y70									; Lower motor current %
                        G4 P150
                        M574 X1 Y2 S4                           		; Configure Z-Axis stall detection homing
                        M569 P0.0										; check status in console
                        M569 P0.1										; check status in console
                                                                   	; make sure everything has stopped before we make changes
                        echo "Home Y"
                        G1 H1 Y350 F6000
                        G1 H2 X-10 Y10
                        G1 H1 Y350 F6000                       	; Home Z-Axis actuators independently											
                        M569 P0.0										; check status in console
                        M569 P0.1										; check status in console
                        G90 											; absolute positioning
                        G1 Y150 F6000									; move to center of bed		
                        
                        ;revert back 
                        echo "after revert  back"
                        M913 X100  Y100                               ; Reset motor current
                        M569 P0.0 S1 D2                                 ; reset motors back to spread cycle,
                        M569 P0.1 S1 D2									; reset motors back to spread cycle,
                        M569 P0.0										; check status in console
                        M569 P0.1										; check status in console
                        
                        ; homez.g
                        echo "home Z.g "
                        G90													; absolute positioning
                        G1 F6000 X150 Y150									; make sure X Y centreed	
                        G91													; Relative positioning
                        echo "Homing Z"
                        G30  		                  						; Home Z-Axis actuators independently
                        G90													; absolute positioning
                        G1 Z25 F4000 										;move away a little
                        
                        ; home_max_Z
                        M400                                                ; make sure everything has stopped before we make changes
                        G91                                 				; relative positioning
                        M569 P0.4 S1 D3 V10                                 ; set to stelth chop
                        M569 P0.5 S0 D3 V10     							; set to stelth chop
                        M569 P0.6 S1 D3 V10									; set to stelth chop
                        M915 P0.4:0.5:0.6 S0 F0 R1 H200                   	; Configure Z-Axis Stall Detection
                        M574 Z2 S4                                       	; Configure Z-Axis stall detection homing
                        M400     											; make sure everything has stopped before we make changes
                        G1 H1 Z-0.2 F3000									; move a  little  for cal of sensorless homing / not stalled
                        M400 												; make sure everything has stopped before we make changes
                        M913 Z70	                                  		; Lower motor current by 50%
                        G1 H1 Z350 F3000                       				; Home Z-Axis actuators independently
                        M400                                             	; make sure everything has stopped before we make changes
                        G92 Z290											; set a Z height
                        G90													; absolute positioning
                        
                        ;revert back 
                        M913 Z100                                    		; Reset motor current
                        M569 P0.4 S1 D2                                    	; reset motors back to spread cycle,
                        M569 P0.5 S0 D2     								; reset motors back to spread cycle,
                        M569 P0.6 S1 D2										; reset motors back to spread cycle,
                        M84													; turn off motors
                        
                        ;3PL
                        echo "3PL"
                        G30 P0 X10 Y0 Z-99999 		; probe near a leadscrew
                        G30 P1 X290 Y0 Z-99999 		; probe near a leadscrew
                        G30 P2 X150 Y270 Z-99999 S3 ; probe near a leadscrew and calibrate 3 motors
                        G1 X0 Y0 F6000	
                        

                        <

                        1 Reply Last reply Reply Quote 1
                        • moth4017undefined moth4017 referenced this topic
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA