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

    endstop trigger and bangbang questions

    Scheduled Pinned Locked Moved Unsolved
    General Discussion
    5
    42
    1.8k
    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.
    • deltajeggaundefined
      deltajegga
      last edited by

      i want to add an emergency stop switch, i read the firmware 3 page and as i understand it i need to put M581 P"duex.e2stop" T0 C0 and connect to the far right endstop on the duex with the two outer pins? it does not seem to do anything.

      second , is there a way to adjust the bangbang "allowable temperature range"? right now it triggers when its just .1 deg off, and its just flickering the lights a lot, i even have a zero crossing SSR and its on a 33x55 inch 1kw heater. can you use PWM with an SSR?

      1 Reply Last reply Reply Quote 0
      • aidarundefined
        aidar
        last edited by

        What firmware version? You probably need this : https://duet3d.dozuki.com/Wiki/Gcode#Section_M581_RepRapFirmware_3_01RC2_and_later

        1 Reply Last reply Reply Quote 0
        • deltajeggaundefined
          deltajegga
          last edited by

          v3.1.1

          i read this page, it says S is no longer used.
          https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_M581

          1 Reply Last reply Reply Quote 0
          • Phaedruxundefined
            Phaedrux Moderator
            last edited by

            I'm not sure about the trigger, but for your bed heater question, you should do a PID tuning for the bed and use PWM control rather than bang-bang.

            Z-Bot CoreXY Build | Thingiverse Profile

            deltajeggaundefined 1 Reply Last reply Reply Quote 0
            • deltajeggaundefined
              deltajegga @Phaedrux
              last edited by

              @Phaedrux ok, thanks. should i repost the trigger question somewhere else?

              1 Reply Last reply Reply Quote 0
              • Phaedruxundefined
                Phaedrux Moderator
                last edited by

                No, here is fine.

                Make sure the endstop pin you're using matches the pin name you're using in the command.

                Z-Bot CoreXY Build | Thingiverse Profile

                1 Reply Last reply Reply Quote 0
                • deltajeggaundefined
                  deltajegga
                  last edited by deltajegga

                  yeah... duex.e2stop is the far right endstop on the duex. it does nothing. ive also tried the other endstops with respective names.

                  1 Reply Last reply Reply Quote 0
                  • Phaedruxundefined
                    Phaedrux Moderator
                    last edited by

                    Can you post your entire config.g?

                    Did you specify the pin with M950 J?

                    https://duet3d.dozuki.com/Wiki/Gcode#Section_M581_RepRapFirmware_3_01RC2_and_later

                    Z-Bot CoreXY Build | Thingiverse Profile

                    1 Reply Last reply Reply Quote 0
                    • deltajeggaundefined
                      deltajegga
                      last edited by

                      no i did not. it seems to be missing from here.
                      https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_M950_Create_heater_fan_or_GPIO_servo_port

                      i dont quite understand it. i tried J6 but that didnt work. is there a page that shows the pin numbers and names? or do i also need to add C to M950?

                      ; Configuration file for Duet WiFi (firmware version 3)
                      ; executed by the firmware on start-up
                      ;
                      ; generated by RepRapFirmware Configuration Tool v3.1.1 on Sun May 31 2020 21:54:40 GMT-0700 (Pacific Daylight Time)
                      
                      ; General preferences
                      G90                                                ; send absolute coordinates...
                      M83                                                ; ...but relative extruder moves
                      M550 P"1M"                                         ; set printer name
                      
                      
                      
                      ; Network
                      M552 S1                                            ; enable network
                      M586 P0 S1                                         ; enable HTTP
                      M586 P1 S0                                         ; disable FTP
                      M586 P2 S0                                         ; disable Telnet
                      M587 S"MTS" P"Judy1985"
                      
                      
                      
                      ; Drives
                      M569 P0 S0                              ; physical drive 0 goes backwards  X
                      M569 P1 S1                              ; physical drive 1 goes forwards   RY
                      M569 P2 S0                              ; physical drive 2 goes backwards  RZ
                      M569 P3 S1                              ; physical drive 3 goes forwards   E
                      M569 P5 S1                              ; physical drive 5 goes forwards   LY
                      M569 P6 S0                              ; physical drive 6 goes backwards  LZ
                      
                      M584 X0 Y1:5 Z2:6 E3                                     ; set drive mapping
                      
                      M350 X16 Y16:16 Z16:16 E16 I1                            ; configure microstepping with interpolation
                      
                      M92 X114.29 Y114.29:114.29 Z400.00:400.00 E420.00        ; set steps per mm
                      
                      M566 X300.00 Y100:100 Z12:12 E120.00                     ; set maximum instantaneous speed changes (mm/min)
                      
                      M203 X2600.00 Y2600:2600 Z500:500 E1200.00               ; set maximum speeds (mm/min)
                      
                      M201 X100.00 Y50:50 Z20:20 E250.00                       ; set accelerations (mm/s^2)
                        
                      M906 X800 Y1100:1100 Z600:600 E800 I30                   ; set motor currents (mA) and motor idle factor in per cent
                      M84 S30                                                  ; Set idle timeout
                      
                      
                      
                      
                      ; Axis Limits
                      M208 X0 Y0 Z0 S1                                   ; set axis minima
                      M208 X1400 Y800 Z900 S0                            ; set axis maxima
                      
                      ; Endstops
                      M574 X1 S1 P"xstop"                                ; configure active-high endstop for low end on X via pin xstop
                      M574 Y1 S1 P"ystop"                                ; configure active-high endstop for low end on Y via pin ystop
                      M574 Z1 S2                                         ; configure Z-probe endstop for low end on Z
                      
                      ; Z-Probe
                      M950 S0 C"duex.e2heat"                             ; create servo pin 0 for BLTouch
                      M558 P9 C"zprobe.in+zprobe.mod" H5 F120 T6000      ; set Z probe type to bltouch and the dive height + speeds
                      G31 P500 X28.3 Y0 Z2.5                             ; set Z probe trigger value, offset and trigger height
                      M557 X15:1350 Y50:750 S75                          ; define mesh grid
                      
                      
                      ; Heaters
                      M308 S0 P"bedtemp" Y"thermistor" T100000 B4138     ; configure sensor 0 as thermistor on pin bedtemp
                      M950 H0 C"bedheat" T0                              ; create bed heater output on bedheat and map it to sensor 0
                      M307 H0 B1 S1.00                                   ; enable bang-bang mode for the bed heater and set PWM limit
                      M140 H0                                            ; map heated bed to heater 0
                      M307 H0 A46.7 C538.0 D3.3 V24.0                    ; bed tuning parameters
                      
                      M143 H0 S120                                       ; set temperature limit for heater 0 to 120C
                      M308 S1 P"e0temp" Y"thermistor" T100000 B4138      ; configure sensor 1 as thermistor on pin e0temp
                      M950 H1 C"e0heat" T1                               ; create nozzle heater output on e0heat and map it to sensor 1
                      M307 H1 B0 S1.00                                   ; disable bang-bang mode for heater  and set PWM limit
                      
                      
                      
                      ; Fans
                      M950 F0 C"fan0" Q500                               ; create fan 0 on pin fan0 and set its frequency
                      M106 P0 S0 H-1                                     ; set fan 0 value. Thermostatic control is turned off
                      
                      ; 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
                      
                      
                      
                      ; Miscellaneous
                      M911 S22 R23 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
                      T0                                                 ; select first tool
                      
                      
                      M950 J6
                      M581 P"duex.e2stop" T0 C0                               ;emergency stop
                      
                      
                      1 Reply Last reply Reply Quote 0
                      • deltajeggaundefined
                        deltajegga
                        last edited by

                        oh i found this, do i just add M950 J1 C"duex.e2stop"?
                        how many values are there for J?
                        https://duet3d.dozuki.com/Wiki/Connecting_an_Emergency_Stop

                        1 Reply Last reply Reply Quote 0
                        • Phaedruxundefined
                          Phaedrux Moderator
                          last edited by Phaedrux

                          My understanding is that J is just the index number. The pin being attached to that index is the actual physical pin name being used. "duex.e2heat" for example.

                          From the M950 wiki entry example: M950 J1 C"!^e1stop" ; Input 1 uses e1Stop pin, inverted, pullup enabled

                          Then in the M581 P you'd reference the J number from the M950.

                          M950 J1 C"e1stop"

                          M581 P1 T0 C0

                          J1 = P1

                          At least I think that's how it's working.

                          Z-Bot CoreXY Build | Thingiverse Profile

                          1 Reply Last reply Reply Quote 0
                          • deltajeggaundefined
                            deltajegga
                            last edited by

                            that would make sense, but i tried it and still no dice.

                            1 Reply Last reply Reply Quote 0
                            • aidarundefined
                              aidar
                              last edited by

                              Not sure, but if i remember correctly what i readed other day, you have to enable pull-up for duex endstops. So your M950 should looks like :
                              M950 J1 C"^duex.e2stop"

                              1 Reply Last reply Reply Quote 0
                              • deltajeggaundefined
                                deltajegga
                                last edited by

                                just tried that. still nothing. i wish all the RRF V3 information was more centrally contained.

                                1 Reply Last reply Reply Quote 1
                                • deltajeggaundefined
                                  deltajegga
                                  last edited by

                                  so is there anything else i can try?

                                  deckingmanundefined 1 Reply Last reply Reply Quote 0
                                  • deckingmanundefined
                                    deckingman @deltajegga
                                    last edited by

                                    @deltajegga said in endstop trigger and bangbang questions:

                                    so is there anything else i can try?

                                    Yes. Firstly make sure the switch you've connected is actually working as it should. If you go to the web interface you should find a tab that shows the end stops and their trigger states. I think it's "settings - machine specific" or some such. The end stops are listed in numerical order from 0 so it might not be obvious which is which. But no matter. Activate your switch while observing that page. One of those end stops should change state.

                                    If the switch shows triggered when it isn't and vice versa, then you'll need to invert things so that it detects a falling edge rather than a rising edge (or vice versa). That is done by using either S0 or S1 in your M581 (can't remember which is which - try them both and see which one works).

                                    Ian
                                    https://somei3deas.wordpress.com/
                                    https://www.youtube.com/@deckingman

                                    deltajeggaundefined 1 Reply Last reply Reply Quote 1
                                    • deltajeggaundefined
                                      deltajegga @deckingman
                                      last edited by

                                      @deckingman wouldent the led also turn on or off?

                                      1 Reply Last reply Reply Quote 0
                                      • deltajeggaundefined
                                        deltajegga
                                        last edited by

                                        a new development, apparently

                                        ;M950 J1 C"!^duex.e2stop"
                                        ;M581 P1 T0 C0

                                        makes it reset when i home the Y axis...

                                        1 Reply Last reply Reply Quote 0
                                        • Phaedruxundefined
                                          Phaedrux Moderator
                                          last edited by

                                          What is the switch and how is it wired?

                                          Z-Bot CoreXY Build | Thingiverse Profile

                                          deltajeggaundefined 1 Reply Last reply Reply Quote 0
                                          • deltajeggaundefined
                                            deltajegga @Phaedrux
                                            last edited by deltajegga

                                            @Phaedrux just a bare switch wired normally closed. after i commented that bit out, it homed all just fine. also if i just pushed the switch by hand it wouldn't reset, only when i ran home y or home all

                                            Phaedruxundefined 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA