Endstops not stopping external drivers on the expansion header



  • I an using the expansion header running hybrid servo drives, the movements are fine all the endstops report back fine with the m119 command. Problem is they dont stop any of the motors when they are triped. All the endstops work correctly when I was using the duex 5 with the onboard drivers.

    ; Configuration file for Duet WiFi (firmware version 1.17)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool on Sat Sep 02 2017 15:26:26 GMT-0400 (Eastern Daylight Time)

    ; 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
    M911 S12.0:19.5:22.0 // auto-pause at 19,5V, then either stop at 12V or auto-resume at 22V

    M667 S1 ; Select CoreXY mode
    M208 X0 Y0 Z0 S1 ; Set axis minima
    M208 X700 Y700 Z800 S0 ; Set axis maxima

    ; Endstops
    M574 X2 Y2 Z2 S1 ; Define active high microswitches
    M558 P1 X0 y0 Z0 H5 F120 T6000 ; Set Z probe type to unmodulated, the axes for which it is used and the probe + travel speeds
    G31 P500 x46 y0 Z1.27; Set Z probe trigger value, offset and trigger height

    ; Drives
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P4 S1 ; Drive 4 goes forwards
    m569 p5 s1 r1 ; Drive 5 goes forwards
    m569 p6 s1 r1 ; Drive 6 goes forwards
    m569 p7 s1 r1 ; Drive 7 goes forwards
    m569 p8 s1 r1 ; Drive 8 goes forwards
    m569 p9 s1 r1 ; Drive 9 goes forwards
    m584 x5 y6 z7:8:9 E3:4
    M350 E16:16 I0 ; Configure microstepping without interpolation
    M92 X160 Y160 Z800 E476.5:476.5; Set steps per mm
    M566 X1600 Y1600 Z200 E120:120 ; Set maximum instantaneous speed changes (mm/min)
    M203 X15000 Y15000 Z3000 E1200:1200 ; Set maximum speeds (mm/min)
    M201 X800 Y800 Z150:150:150 E5000:5000 ; Set accelerations (mm/s^2)
    M906 X2000 Y2000 Z2000 E1200:1200 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Heaters
    M143 S300 ; Set maximum heater temperature to 300C
    M301 H0 S1.00 P1088.5 I1.567 D1486.6 T0.4 W180 B30 ; Use PID on bed heater (may require further tuning)
    M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0
    M305 P1 T100000 B4725 C7.060000e-8 R4700 ; Set thermistor + ADC parameters for heater 1
    M305 P2 T100000 B4725 C7.060000e-8 R4700 ; Set thermistor + ADC parameters for heater 2
    Heater 0 model: gain 58.4, time constant 694.7, dead time 2.0, max PWM 1.00, mode: PID

    ; 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
    M563 P1 D1 H2 ; Define tool 1
    G10 P1 X0 Y0 Z0 ; Set tool 1 axis offsets
    G10 P1 R0 S0 ; Set initial tool 1 active and standby temperatures to 0C

    ; Network
    M550 PMJ 30 ; Set machine name
    M552 S1 ; Enable network
    ; Access point is configured manually via M587 by the user
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

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


  • administrators

    M584 maps axes to drivers. It does not map endstops. So you should use the X, Y and Z endstop inputs on the Duet.



  • @dc42:

    M584 maps axes to drivers. It does not map endstops. So you should use the X, Y and Z endstop inputs on the Duet.

    I am using them but they are not stopping the movement. it seems as if it is not sending the signal to the appropriate drive. It will work if i disconnect the expansion board and plug a stepper into the integrated chip.



  • So if the endstops wont stop movement to external drivers via the breakout board can you open the endstops up for mapping in the firmware? Or do you have any other suggestions for what is happening? otherwise I have a 5k printer that is useless. The drives are hss57 hybrid servo drives. 3z 1x 1y.



  • I have started with a blank sd card and re did all the files from scratch and still the end stops don't work with the external drives. I tried firmware 1.19.2 and now have 1.20RC4 neither worked. If I plug a standard stepper into the integrated driver it stops when the endstop is triggered. but it will not stop any of the drives on the breakout. does the breakout not support STOP? I am using the ethernet but I have a WIFI laying around and also a DUEX5 but not sure how to run 5 external drivers from them. It is just frustrating because everything moves just as it should it just wont stop… I cleaned up the config file when I wrote the new one with some of the suggestions I found in the other forum posts. It just seems like the end stop is not communicating to the breakout board. Is there a way to test this? I have included the new config file. I have not set final size, thermocouples, fans, and all that stuff yet but that should not matter. All the movement; and end stop info is correct. I did see a rather rude guy posting on here about the same issue but he uploaded new firmware and that solved his problem or so he said ( not quite sure if he was truly all there, if you know what I mean).

    Configuration file for Duet Ethernet (firmware version 1.20 or newer)
    ; executed by the firmware on start-up

    ; 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
    M911 S22 R23 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000"

    M667 S1 ; Select CoreXY mode
    M208 X0 Y0 Z0 S1 ; Set axis minima
    M208 X670 Y720 Z750 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y2 Z2 S1 ; Set active high endstops
    M558 P1 H5 F120 T6000 ; Set Z probe type to unmodulated and the dive height + speeds
    G31 P500 X0 Y0 Z2.5 ; Set Z probe trigger value, offset and trigger height
    M557 X15:655 Y15:705 S20 ; Define mesh grid

    ; Drives
    M569 P3 S0 ; Drive 3 goes backwards
    M569 P4 S1 ; Drive 4 goes forwards
    M569 P5 S1 R1 T4 ; Drive 5 goes forwards
    M569 P6 S1 R1 T4 ; Drive 6 goes forwards
    M569 P7 S1 R1 T4 ; Drive 7 goes forwards
    M569 P8 S1 R1 T4 ; Drive 8 goes forwards
    M569 P9 S1 R1 T4 ; Drive 9 goes forwards
    M584 X5 Y6 Z7:8:9 E3:4 ; Apply custom drive mapping
    M350 X16 Y16 Z16:16:16 I0 ; Configure microstepping without interpolation
    M350 E16:16 I1 ; Configure microstepping with interpolation
    M92 X160 Y160 Z800:800:800 E476.5:476.5 ; Set steps per mm
    M566 X1600 Y1600900 Z50:50:50 E120:120 ; Set maximum instantaneous speed changes (mm/min)
    M203 X15000 Y15000 Z750:750:750 E1200:1200 ; Set maximum speeds (mm/min)
    M201 X700 Y700 Z75:75:75 E250:250 ; Set accelerations (mm/s^2)
    M906 X2000 Y2000 Z2000:2000:2000 E800:800 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Heaters
    M301 H0 S1.00 P10 I0.1 D200 T0.4 W180 B30 ; Use PID on bed heater (may require further tuning)
    M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0
    M143 H0 S120 ; Set temperature limit for heater 0 to 120C
    M305 P1 T100000 B4138 C0 R4700 X101 ; Set thermistor + ADC parameters for heater 1 and remap it to channel 101
    M143 H1 S400 ; Set temperature limit for heater 1 to 400C
    M305 P2 T100000 B4138 C0 R4700 X102 ; Set thermistor + ADC parameters for heater 2 and remap it to channel 102
    M143 H2 S400 ; Set temperature limit for heater 2 to 400C

    ; 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
    M563 P1 D1 H2 ; Define tool 1
    G10 P1 X0 Y0 Z0 ; Set tool 1 axis offsets
    G10 P1 R0 S0 ; Set initial tool 1 active and standby temperatures to 0C

    ;*** Networking - Enable for both WiFi and Ethernet boards.
    M552 S1 ; Turn network on

    ;*** Ethernet networking: Adjust the IP address and gateway in the following 2 lines to suit your network
    M552 P0.0.0.0 ; (0 = DHCP)
    M554 P192.168.1.255 ; Gateway
    M553 P255.255.255.0 ; Netmask

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

    ; Custom settings are not configured, endstops, and probe info is correct.


  • administrators

    I am puzzled by your report. The endstops work independently of whether you are using internal or external drivers, so there should be no difference between the two.

    The first step in debugging endstop issues is to test the endstops and their configuration. Go to the Settings -> Machine Properties page or Duet Web Control. In the "Endstop hit" column, the first, second and third rows show the state of the X, Y and Z endstops. Ignore the fact that column to the left says "Drive", because the "Endstop hit" column is unrelated to drives. Check that the X, Y and Z endstop states displayed there follow the state of the switches themselves.



  • They all register fine, 0,1,2 all say no and when triped they say yes. X,Y,Z all still move even when it says yes in that column.



  • @mhallett:

    They all register fine, 0,1,2 all say no and when triped they say yes. X,Y,Z all still move even when it says yes in that column.

    sure why not? It is only when you home that they will serve…



  • So you are saying the only time an endstop works is when you are executing a home command?



  • @mhallett:

    So you are saying the only time an endstop works is when you are executing a home command?

    Yes



  • Ok i will write all the home files and give it a shot, thank you.



  • yes the firmware will take hard limits coded into the config.g to take care of the print limits once homed



  • No dice I ended up with two broken sendstops LOL. As i said earlier if I plug a standard stepper into the the integrated stepper drivers it functions just fine. It is just the expansion that is is not communicating with. Everything move is the correct direction to home just does not trigger the external drives to stop. I am going to swap the Ethernet board with a Wifi I have laying around and see what happens. maybe there is a short in the 50 pin connector. I am going to use the same sd card so everything is equal. Will see what happens.



  • Problem solved!!!!!! not sure what is wrong with the ethernet board but wifi works beautifully.Guess I will just hang on to the ethernet board for my sons delta that will use the integrated drivers. Thanks guys for all the help….



  • So is it just a faulty board or other people have similar problems with endstops when using expansion breakout board?



  • I am guessing just a faulty expansion header. The rest of the board operates just fine but the 50 pin plug has something going on with it. Usually the problem is the endstop or the wiring so I was going nuts trying to figure out what was going on. This has been my first real issue that was not of my doing and I have built 4 printers all with duet electronics.



  • Is there anywhere I can send this Ethernet board to have it repaired?


  • administrators

    Bear in mind that when you map axis drivers using M584, that does not map endstops. You must still use the XYZ endstop inputs on the Duet.



  • It was, I know it is a board issue. I swapped to my wifi board that I was saving for a different printer and it works fine. The only thing I changed was the board, I even swapped the sdcard so it was running identical settings and firmware. I don't want a free repair I will gladly pay to have it done, but just don't know of anyone qualified to send it to.


  • administrators

    I don't see how it can be a hardware problem. Please can you try the latest release (1.20.1RC2) and if that has the same problem, share your config.g and homing files.



  • Sure give me a day or two to switch the boards around. in advance these are my config.g and home files.
    ; Configuration file for Duet Ethernet (firmware version 1.20 or newer)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool on Mon Dec 25 2017 21:58:57 GMT-0500 (Eastern Standard Time)

    ; 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
    M911 S22 R23 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000"

    M667 S1 ; Select CoreXY mode
    M208 X0 Y0 Z0 S1 ; Set axis minima
    M208 X673 Y673 Z694.29 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y2 Z2 S1 ; Set active high endstops
    M558 P1 X0 Y0 Z0 H5 F120 T6000 ; Set Z probe type to unmodulated and the dive height + speeds
    G31 P500 X30 Y-5 Z1.74 ; Set Z probe trigger value, offset and trigger height
    M557 X90:630 Y43:603 S30 ; Define mesh grid
    M584 X5 Y6 Z7:8:9 ; three Z motors connected to driver outputs 2, 5 and 6
    M671 X336:94:652.5 Y613:53:53 S30 ; leadscrews at rear left, front middle and rear right

    ; Drives
    M569 P3 S0 ; Drive 3 goes backwards
    M569 P4 S1 ; Drive 4 goes forwards
    M569 P5 S0 ; Drive 5 goes forwards
    M569 P6 S0 ; Drive 6 goes forwards
    M569 P7 S0 ; Drive 7 goes forwards
    M569 P8 S0 ; Drive 8 goes forwards
    M569 P9 S0 ; Drive 9 goes forwards
    M584 X5 Y6 Z7:8:9 E3:4 ; Apply custom drive mapping
    M350 X16 Y16 Z16:16:16 I0 ; Configure microstepping without interpolation
    M350 E16:16 I1 ; Configure microstepping with interpolation
    M92 X80 Y80 Z400:400:400 E476.5:476.5 ; Set steps per mm
    M566 X800 Y800 Z400:400:400 E120:120 ; Set maximum instantaneous speed changes (mm/min)
    M203 X8000 Y8000 Z2500:2500:2500 E1200:1200 ; Set maximum speeds (mm/min)
    M201 X1800 Y1800 Z700:700:700 E250:250 ; Set accelerations (mm/s^2)
    M906 X2000 Y2000 Z2000 E800:800 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Heaters
    M301 H0 S1.00 P10 I0.1 D200 T0.4 W180 B30 ; Use PID on bed heater (may require further tuning)
    M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0
    M143 H0 S120 ; Set temperature limit for heater 0 to 120C
    M305 P1 X150 ; Set thermocoupler remapped 150
    M143 H1 S400 ; Set temperature limit for heater 1 to 400C
    M305 P2 X151 ; Set Thermocoupler remapped 151
    M143 H2 S400 ; Set temperature limit for heater 2 to 400C

    ; 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
    M563 P1 D1 H2 ; Define tool 1
    G10 P1 X89.40 Y0 Z0 ; Set tool 1 axis offsets
    G10 P1 R0 S0 ; Set initial tool 1 active and standby temperatures to 0C
    M912 P0 S-7

    ;*** Networking - Enable for both WiFi and Ethernet boards.
    M552 S1 ; Turn network on

    ;*** Ethernet networking: Adjust the IP address and gateway in the following 2 lines to suit your network
    M552 P0.0.0.0 ; (0 = DHCP)
    M554 P192.168.1.255 ; Gateway
    M553 P255.255.255.0 ; Netmask

    ; Fans
    M106 P3 T20 H100
    M563 P0 D0 H1 ; tool 0 uses extruder 0, heater 1 (and fan 0)
    M563 P1 D1 H2 F2 ; tool 1 uses extruder 1, heater 2 and fan 1 2

    ; homeall.g
    ; called to home all axes
    ;

    ; Relative positioning ; uncomment this line to lift the nozzle after homing
    G91
    ; Course home Z
    G1 Z725 F2500 S1
    ; Course home X
    G1 X-675 F8000 S1
    ; Course home Y
    G1 Y675 F8000 S1

    ; Move away from the endstops
    G1 X5 Y-5 F400
    G1 Z-5 F400

    ; Fine home X
    G1 X-10 F400 S1
    ; Fine home Y
    G1 Y10 F400 S1
    ;fine home Z
    G1 Z10 f400 S1

    ; Absolute positioning
    G90



  • also the firmware is 1.20.1RC2



  • I don't know if this might be relevant but when I changed my CoreXY to XYUV, after mapping the drives I had to move the axes maxima to a position in the gcode file that was after the M584 command. I see in the config.g that your M208 is before the M584.

    Also this from the Wiki might be relevant.

    "Assigning a drive using M584 does not remove its old assignment. Therefore, if you assign a drive that defaults to being an extruder drive, you should also assign the extruder drives explicitly as in the above example. Failure to do so may result in unexpected behaviour".

    Edit. That's big printer BTW!



  • Ok so I switched back to the Ethernet and used the same SD card and verified that the firmware is the undated one and when homing the endstops do not trigger the motors to stop. I even swapped the min and max codes so the max comes first and still the same. Not sure what the deal is.


  • administrators

    Please try disconnecting the endstop switches from the Duet. As you have configured them to be active high, this should make them all read as if triggered. Then try to home X or Y when it is not already in the home position. Does the motor move towards the homing switch, or not?


Log in to reply