Why doesn't this M574 configuration work



  • I have my Duet 3 powered printer working well with the exception of one detail. Currently all of my endstop opto switches are physically located at the low end which puts the Y endstop at the front of the printer. I would like for the Y endstop opto to be located at the other end of Y (back of printer) which is more convenient from a wiring standpoint. So I change M574 from Y1 to Y2 and invert all of my G1 Y numbers in home all and home Y. Y now moves to the back of the printer (Y max) and the endstop is triggered and all is well. The problem comes when I load a print, Duet homes and then nothing else happens, the print does not start. I put M574 and associated Y numbers back to the way they were and it prints as it should. I'm running DWC 2.15,DSF2.1.2 and 3.01-RC10. I realise there is a new f/w version out but shouldn't this work with this f/w?, What am I missing?



  • I’d ask you post your config.g file; the way you run it is how my blv cube is set up. Double check your axis limits max and min settings to see if they match the way the new endstop configuration is set up. Post yours and I’ll post mine :).



  • Throw in the home files; at a lance i suspect relatives moves vs absolute moves and failing the second time if the printer homes before print?



  • Here ya go,

    ; Configuration file for Duet 3 (firmware version 3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Wed Apr 29 2020 12:52:20 GMT-0600 (Mountain Daylight Time)

    ; General preferences
    G90 ; send absolute coordinates...
    M83 ; ...but relative extruder moves
    M550 P"Duet 3" ; set printer name

    M669 K1 ; select CoreXY mode

    ; Drives
    M569 P0.0 S1 ; physical drive 0.0 goes forwards
    M569 P0.1 S1 ; physical drive 0.1 goes forwards
    M569 P0.2 S0 ; physical drive 0.2 goes backwards
    M569 P0.3 S0 ; physical drive 0.3 goes backwards

    M584 X0.1 Y0.0 Z0.2 E0.3 ; set drive mapping Y = drive 0 X = drive 1 Z = drive 2 Extruder drive 3

    M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation
    M92 X200.00 Y200.00 Z1600.00 E420.00 ; set steps per mm
    M566 X900.00 Y900.00 Z12.00 E120.00 ; set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800 I30 ; set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z-0.6 S1 ; set axis minima
    M208 X310 Y310 Z320 S0 ; set axis maxima

    ; Endstops
    M574 X1 S1 P"!io1.in" ; configure for low end, active-low endstop on X via pin io1.in
    M574 Y2 S1 P"!io2.in" ; configure for high end, active-low endstop on Y via pin io2.in
    M574 Z1 S1 P"!io3.in" ; configure for low end, active-low endstop on Z via pin io3.in

    ; Z-Probe
    M950 S0 C"io4.out" ; create servo pin 0 for BLTouch
    M558 P9 C"io4.in" H2.5 F120 R.350 T6000 ; set Z probe type to bltouch and the dive height + speeds
    G31 P500 X1.5 Y59 Z3.495 ; set Z probe trigger value, offset and trigger height
    M557 X15:295 Y15:252 P6:6 ; define mesh grid

    ; Heaters
    M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0
    M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0
    M143 H0 S110 ; set temperature limit for heater 0 to 110C
    M307 H0 A236.8 C516.8 D3.0 V24.1 B0 ; disable bang-bang mode for the bed heater and set PWM limit
    M140 H0 ; map heated bed to heater 0
    M308 S1 P"temp1" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin temp1
    M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1
    M143 H1 S260 ; set temperature limit for heater 1 to 260C
    M307 H1 A445.5 C173.0 D5.5 V24.1 B0 ; disable bang-bang mode for hotend heater and set PWM limit

    ; Fans
    M950 F0 C"out7" Q500 ; create fan 0 on pin out7 and set its frequency
    M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
    M950 F1 C"out8" Q500 ; create fan 1 on pin out8 and set its frequency
    M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on

    ; Tools
    M563 P0 S"E3D-V6" 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

    ; Custom settings are not defined

    ; Miscellaneous
    T0 ; select first tool



  • The printer does home when the print file is loaded but then stops and does nothing.

    Here is home all,

    ; homeall.g
    ; called to home all axes
    ;
    ; generated by RepRapFirmware Configuration Tool v2.1.8 on Wed Apr 29 2020 12:52:20 GMT-0600 (Mountain Daylight Time)
    G91 ; relative positioning
    G1 H2 Z5 F6000 ; lift Z relative to current position
    G1 H1 X-310 Y310 F1800 ; move quickly to X or Y endstop and stop there (first pass)
    G1 H1 X-310 ; home X axis
    G1 H1 Y310 ; home Y axis
    G1 X5 Y5 F6000 ; go back a few mm
    G1 H1 X-310 F360 ; move slowly to X axis endstop once more (second pass)
    G1 H1 Y310 ; then move slowly to Y axis endstop
    G1 H1 Z-330 F360 ; move Z down stopping at the endstop
    G90 ; absolute positioning
    G92 Z0 ; set Z position to axis minimum (you may want to adjust this)

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



  • @luckyflyer said in Why doesn't this M574 configuration work:

    The printer does home when the print file is loaded but then stops and does nothing.

    if you run g28 or homeall twice does it finish normally, and is there anything in a start.g file or the slicer settings that would be relevant?



  • Double check your axis limits max and min settings to see if they match the way the new endstop configuration is set up.

    Is this the way axis limits should be set up with the new M574 config?

    ; Axis Limits
    M208 X0 Y310 Z-0.6 S1 ; set axis minima
    M208 X310 Y0 Z320 S0 ; set axis maxima



  • @luckyflyer said in Why doesn't this M574 configuration work:

    Double check your axis limits max and min settings to see if they match the way the new endstop configuration is set up.

    Is this the way axis limits should be set up with the new M574 config?

    ; Axis Limits
    M208 X0 Y310 Z-0.6 S1 ; set axis minima
    M208 X310 Y0 Z320 S0 ; set axis maxima

    No they shouldn't change. if you change Y1 to Y2 and reverse the axis limits you're sort of back to square 1. (also not sure the firmware accepts a minima larger than the maxima) revert to

    ; Axis Limits
    M208 X0 Y0 Z-0.6 S1 ; set axis minima
    M208 X310 Y310 Z320 S0 ; set axis maxima



  • I have no file named start.G S3d does have a flip Y axes and it is configured to flip, this is the default setting. I have tried it both ways and neither way works with the new config, have not tried flipping Y when printer is working correctly. I can try running G28 a second time from panel due.



  • @bearer said in Why doesn't this M574 configuration work:

    @luckyflyer said in Why doesn't this M574 configuration work:

    Double check your axis limits max and min settings to see if they match the way the new endstop configuration is set up.

    Is this the way axis limits should be set up with the new M574 config?

    ; Axis Limits
    M208 X0 Y310 Z-0.6 S1 ; set axis minima
    M208 X310 Y0 Z320 S0 ; set axis maxima

    No they shouldn't change. if you change Y1 to Y2 and reverse the axis limits you're sort of back to square 1. (also not sure the firmware accepts a minima larger than the maxima) revert to

    ; Axis Limits
    M208 X0 Y0 Z-0.6 S1 ; set axis minima
    M208 X310 Y310 Z320 S0 ; set axis maxima

    I have not tried it that way, so I'm not sure about checking axes limits min & max to see if they match the way the new endstop configuration is set up.



  • @luckyflyer said in Why doesn't this M574 configuration work:

    so I'm not sure about checking axes limits min & max to see if they match the way the new endstop configuration is set up.

    unless moving the endstop causes the available travel on the axis to increase or decrease you don't need to change M208. But if you hav 310mm travel and moving the endstop means you can only travel 305mm then update M208 accordingly. High or low end doesn't matter in that respect, just over all travel.



  • I upload a file to print ( a known good file that I've printed before) the heaters come up to temp, the printer homes and then nothing. I sent a G28 from panel due console still nothing. I come to the pc where dwc is and send G28 the blue send box just circles , I hit estop to get it to stop.



  • @bearer said in Why doesn't this M574 configuration work:

    @luckyflyer said in Why doesn't this M574 configuration work:

    so I'm not sure about checking axes limits min & max to see if they match the way the new endstop configuration is set up.

    unless moving the endstop causes the available travel on the axis to increase or decrease you don't need to change M208. But if you hav 310mm travel and moving the endstop means you can only travel 305mm then update M208 accordingly. High or low end doesn't matter in that respect, just over all travel.

    There would be a few mm change because the opto sensor trigger is at the one end a little closer to the rail physical stop, when put at the other end the circuit board is flipped moving the trigger point a little.



  • @luckyflyer said in Why doesn't this M574 configuration work:

    There would be a few mm change because the opto sensor trigger is at the one end a little closer to the rail physical stop, when put at the other end the circuit board is flipped moving the trigger a little.

    the simplest would be to place or jog the head at Y0 then run G1 F-sensible-feedrate Y400 H3 it should effectively measure your Y axis (up to 400mm but stop when endstop is triggered) and set M208 in config-override.g (maybe you have to save it with M500 or update config.g manually if you don't use config-override.g)



  • Ok, I'll do that but if not configured correctly would that cause the issue I'm having? I thought the axes limits were to prevent over extending an axes and hitting a hard stop.



  • @luckyflyer i think you're correct, but i'm happy to defer to higher powers on most thing config.

    however having Z-0.6 in you M208 and G92 Z0 in your homeall seems odd to me.



  • Hmm, I did not catch that. I have the -.6 because my bed has a dip in the middle. Front left corner is much closer to 0 but I'll change home all anyway.



  • Double check your axis limits max and min settings to see if they match the way the new endstop configuration is set up.

    Ok I get what your saying.


  • administrators

    @luckyflyer said in Why doesn't this M574 configuration work:

    Double check your axis limits max and min settings to see if they match the way the new endstop configuration is set up.

    Is this the way axis limits should be set up with the new M574 config?

    ; Axis Limits
    M208 X0 Y310 Z-0.6 S1 ; set axis minima
    M208 X310 Y0 Z320 S0 ; set axis maxima

    As @bearer said several posts ago, you need to swap the Y values over in those two commands. As they stand, no motion will be allowed.



  • Nuramori, can you post your config.g file, thanks



  • I can run this code from the console and it prints as it should, at the correct location etc.

    G92 E0
    G1 X130.0 Y5 Z0.0 F2000
    G1 X40.0 E20.0 F1000.0

    This is part of my starting script in S3d. I believe that this tells me that my M208 and M574 commands which are configured thus,

    ; Axis Limits
    M208 X0 Y0 Z-0.6 S1 ; set axis minima
    M208 X300 Y300 Z300 ; set axis maxima

    ; Endstops
    M574 X1 S1 P"!io1.in" ; configure for low end, active-low endstop on X via pin io1.in
    M574 Y2 S1 P"!io2.in" ; configure for high end, active-low endstop on Y via pin io2.in
    M574 Z1 S1 P"!io3.in" ; configure for low end, active-low endstop on Z via pin io3.in

    are configured correctly in config.g.
    However when a S3d print is loaded via dwc with this start code the tool position display in dwc advances to Y5 and then very briefly at X130 then to X40 and stays there and does not change, no filament is extruded.

    I now believe that there is something not configured correctly in Simplify 3d for this printer configuration because S3d works correctly when M574 is set to Y1 instead of Y2. Do the experts agree with this or am I missing something?



  • I'll also add the with the above configuration when homed X=0 Y=300 Z=0 is displayed and that all movements from the console are correct.

    I sure would like to get this problem resolved.



  • @luckyflyer Please post the contents of the Starting Script tab in Simplify3D.



  • Complete start script

    M109 S195 ; wait for hotend temp
    M190 S60 ; wait for bed temp
    G28 ; home all axes
    G29 S1 ; load bed mesh
    G92 E0 ;set extruder to 0
    G1 X130.0 Y5 Z0.0 F2000 ; move tool
    G1 X40.0 E20.0 F1000.0 ; extrude 90 mm of filament to prime nozzle
    G92 E0 ; set extruder to 0



  • This is my config.g file, run on a coreXY that's set up as you have (x endstop on the left as min, y endstop at that back as max) for you to compare. It homes to the back left corner, and 0,0 is the front left corner.

    I have a toolboard and triple independent z axis on a duet3, so there are parts you can ignore. I always put a pin name legend in the beginning, which helps me keep my wiring organized as a reference when coding this file....

    ; Configuration file for Duet3 (firmware version 3.01 RC12)
    ; executed by the firmware on start-up
    ;
    ; --------------- Pin/connection Mapping Legend -------------------
    ; 0.out0      - Bed heater
    ; 0.out1
    ; 0.out2
    ; 0.out3
    ; 0.out4      - Radiator cooling fan - WC heatsink
    ; 0.out5
    ; 0.out6
    ; 0.out7
    ; 0.out8
    ; 0.out9      - Duet board cooling fan
    ; 0.out4.tach - Radiator cooling fan rpm wire - WC heatsink
    ; 0.out5.tach
    ; 0.out6.tach
    ; 0.io0.in
    ; 0.io1.in    - Emergency stop switch
    ; 0.io2.in    - Y max active low endstop switch
    ; 0.io3.in
    ; 0.io4.in
    ; 0.io5.in
    ; 0.io6.in
    ; 0.io7.in
    ; 0.io8.in
    ; 0.io0.out
    ; 0.io1.out
    ; 0.io2.out
    ; 0.io3.out
    ; 0.io4.out
    ; 0.io5.out
    ; 0.io6.out
    ; 0.io7.out
    ; 0.io8.out
    ; 0.servo, out10 (only on v0.5, not on v0.6)
    ; 0.pson
    ; 0.spi.cs0
    ; 0.spi.cs1
    ; 0.spi.cs2
    ; 0.spi.cs3
    ; 0.temp0      - Bed Thermistor
    ; 0.temp1
    ; 0.temp2
    ; 0.temp3      - Coolant Temp Sensor
    ; 0.mcu-temp   - MCU sensor
    ;
    ;----------Toolboard 1 (CAN ID#20)
    ; 20.out0      - Hotend Heater
    ; 20.out1
    ; 20.out2      - Parts cooler on printhead
    ; 20.out1.tach
    ; 20.out2.tach
    ; 20.io0.in    - Z probe type to bltouch current - Piezo future
    ; 20.io1.in    - X min active low endstop switch
    ; 20.io0.out   - GPIO port 0 on toolboard io0, servo mode - BLTouch Z-Probe
    ; 20.temp0     - Extruder Thermistor
    ; 20.temp1
    ; 20.button0
    ; 20.button1
    ;
    ; -----------------------------------------------------------------
    ;
    ; General preferences
    
    G4 P2000                          ; Hold your Horses.
    G90                               ; send absolute coordinates...
    M83                               ; ...but relative extruder moves
    G21                               ; Set units to Millimeters
    M550 P"DUET3"                     ; set printer name
    M575 P1 S1 B115200                ; Set things up for the PanelDue
    
    M584 X0.3 Y0.2 Z0.0:0.1:0.4 E20.0 ; set drive mapping to each axis
    M669 K1                           ; Select CoreXY mode - New format
    
    ; Network
    M552 S1                           ; enable network
    ; M552 P192.168.3.120             ; Static IP Address
    M586 P0 S1                        ; enable HTTP
    M586 P1 S0                        ; disable FTP
    M586 P2 S0                        ; disable Telnet
    
    ; Drives
    M569 P0.0 S0                      ; physical drive 0 goes backwards - Z Axis Left (1)
    M569 P0.1 S0                      ; physical drive 1 goes backwards - Z Axis Right Back (2)
    M569 P0.2 S0 D3                   ; physical drive 2 goes backwards - Y Axis, activate Stealthchop
    M569 P0.3 S0 D3                   ; physical drive 3 goes backwards - X Axis, activate Stealthchop
    M569 P0.4 S0                      ; physical drive 4 goes backwards - Z Axis Right Front (3)
    M569 P20.0 S1 D3                  ; physical drive 5 goes forwards - Extruder 1
    
    ; Set up three Z-axis location
    M671 X-42.5:390.9:390.9 Y172.5:291.5:49.5 S5 ; leadscrews at 1 - left, 2 - rear right and 3 - front right
    
    M92 X199.27 Y199.27 Z397.23 E2700          ; set steps per mm
    M350 X16 Y16 Z16 E16 I1                    ; configure micro-stepping with interpolation
    M566 X800.00 Y800.00 Z400.00 E240.00       ; set maximum instantaneous speed changes (mm/min)
    M203 X12000.00 Y12000.00 Z2500.00 E1200.00 ; set maximum speeds (mm/min)
    M201 X6000.00 Y6000.00 Z800.00 E800.00     ; set accelerations (mm/s^2)
    M906 X1000 Y1000 Z1000 E800 I30            ; set motor currents (mA) and motor idle factor in percent*100
    
    M84 S30                                    ; Set idle timeout
    
    ; Axis Limits
    M208 X0 Y0 Z0 S1                           ; set axis minima
    M208 X320 Y320 Z350 S0                     ; set axis maxima
    
    ; Endstops
    
    M574 X1 S1 P"20.io1.in"                    ; X min active high endstop switch
    M574 Y2 S1 P"0.io2.in"                     ; Y max active high endstop switch
    
    ; Z-Probe - BLTouch - *CURRENT*
    M574 Z1 S2                                 ; set endstops controlled by probe
    M558 P9 C"^20.io0.in" H5 F2000 T12000      ; set Z probe type to bltouch and the dive height + speeds (bltouch NEEDS pullup)
    ; G31 P100 X28.5 Y-5 Z2.65                 ; set Z probe trigger value, offset and trigger height - 0.25MM NOZZLE
    G31 P100 X-29.99 Y1.04 Z0.55               ; set Z probe trigger value, offset and trigger height - 0.40MM NOZZLE
    
    ; Z-Probe - PIEZO - *FUTURE*
    ; M574 Z1 S2                               ; set endstops controlled by probe
    ; M558 P8 C"20.io0.in" H10 F2000 T20000    ; set Z probe type to PIEZO and the dive height + speeds
    ; G31 P100 X0 Y0 Z-0.1                     ; set Z probe trigger value, offset and trigger height
    
    G30                                        ; Probe Z
    
    ; Configure Heaters and Sensors
    M308 S0 P"0.temp0" Y"thermistor" T100000 B3950          ; Configure bed temperature sensor
    M950 H0 C"0.out0" T0                                    ; Define heater 0 (bed heater) - bed_heat pin and Temp Sensor 0 
    M143 H0 S120 A2                                         ; set temperature limit for heater 0 to 120c
    M140 H0                                                 ; Map heated bed to heater 0
    
    M308 S1 P"20.temp0" Y"thermistor" T100000 B3950         ; Configure extruder 1 temperature sensor
    M950 H1 C"20.out0" T1                                   ; Define heater 1 (hot-end E0) to use the "20.out0" pin and Temp Sensor 1
    M143 H1 S265 A2                                         ; set temperature limit for heater 1 to 265C
    
    M308 S2 P"mcu-temp" Y"mcu-temp" A"Duet Board"           ; Configure MCU sensor
    M308 S3 P"temp3" Y"thermistor" T10000 B3988 A"Coolant"  ; Configure coolant sensor
    
    ; Configure Fans
    M950 F0 C"20.out2" Q100                 ; Define Fan_0 for use - Parts Cooler on Printhead - 4010 fan
    M950 F1 C"!0.out4+^0.out4.tach" Q25000  ; Define Fan_1 for use - Radiator cooling - WC heatsink. - PWM fan
    M950 F2 C"0.out9" Q25000                ; Define Fan_2 for use - Duet board cooling fan
    M950 S0 C"20.io0.out"                   ; Define GPIO port 0 on IO0, servo mode - BLTouch Z-Probe - *CURRENT*
    M950 J0 C"^!0.io1.in"                   ; Input 0 uses 0.io1.in pin, pullup enabled
    
    ; Fans
    M106 P0 S0                          ; set fan 0. Parts Cooler on Printhead
    M106 P1 T25:40 H2                   ; Set fan 1. Manages Radiator fan for water-cooled loop.
    M106 P2 T35:45 H2                   ; Set fan 2. Manages Duet board fan.
    
    ;Set PID values
    M307 H0 A289.6 C634.8 D0.9 V23.3 B0 ; disable bang-bang mode for the bed heater and set PWM limit
    M307 H1 A561.8 C236.5 D5.8 V23.3 B0 ; disable bang-bang mode for the extruder heater and set PWM limit
    
    ; Pressure Advance
    M572 D0 S0.25                        ; Set pressure advance to offset elasticity
    
    ; Filament Sensor
    ; M591 D20.0 P7 C"0.io3.in" S0 L1.84   ; Detect filament issues
    
    ; Tools
    M563 P0 S"Extruder 1" D0 H1 F0      ; define tool 0. Fan 0 operates with an active hot-end
    G10 P0 X0 Y0 Z0 R0 S0               ; set tool 0 axis offsets active and standby temperatures to 0C
    
    ; Emergency Stop
    M574 S1 P"^!0.io1.in"               ; Define Emergency endstop - emergency stop switch condition
    M581 P0 S1 T0                       ; Define action to be taken with activation of emergency stop switch
    
    ; Miscellaneous
    T0                                  ; select first tool
    

Log in to reply