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

    Problem in endstop triggering

    Scheduled Pinned Locked Moved Unsolved
    Duet Hardware and wiring
    3
    4
    148
    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.
    • AndrewStainesundefined
      AndrewStaines
      last edited by

      Hi, I am using Duet mainboard 6XD and 2 1XD expansion boards operates with the firmware version 3.4.4. My endstop is configured in main board at I/O port 1 and 2 for X and Y axis.
      Using a switch type endstop which is connected to input pin and ground of each specified port(i/o port 1 and 2) with an pullup enabled(by firmware).

      Case 1: DUET MB 6XD with no expansion board connected
      Endstop works normal and finding no issues.

      Case 2: DUET MB 6XD with expansion board.
      Works fine when endstop triggered. If not the endstop is in floating state(which means showing triggered and not triggered randomly).
      These state changes randomly even the endstop is not triggered all the time of this process.

      Endstop wiring remains same for both the cases which is 1wire to input pin and another to GND.
      Below is my config file.

      G90 ; absolute coordinates
      M83 ; relative extruder moves
      M550 P"Xtrud" ; set hostname
      
      ; Accessories
      M575 P1 S0 B57600 ; configure PanelDue support
      
      ; Network
      M551 P"password" ; set machine password
      M552 P0.0.0.0 S1 ; configure Ethernet adapter
      M586 P0 S1 ; configure HTTP
      
      ; Wait a moment for the CAN expansion boards to become available
      G4 S2
      
      ; Motor Idle Current Reduction
      M906 I30 ; set motor current idle factor
      M84 S30 ; set motor current idle timeout
      
      ; External Drivers
      M569 P0.0 S1 R0 T5:5:10:0 ; driver 0.0 goes forwards and requires an active-low enable signal (Y axis)
      M569 P0.1 S0 R0 T5:5:10:0 ; driver 0.1 goes backwards and requires an active-low enable signal (Y axis)
      M569 P0.2 S1 R0 T5:5:10:0 ; driver 0.2 goes forwards and requires an active-low enable signal (Z axis)
      M569 P0.3 S1 R0 T5:5:10:0 ; driver 0.3 goes forwards and requires an active-low enable signal (Z axis)
      M569 P0.4 S1 R0 T5:5:10:0 ; driver 0.4 goes forwards and requires an active-low enable signal (Z axis)
      M569 P0.5 S1 R0 T5:5:10:0 ; driver 0.5 goes forwards and requires an active-low enable signal (Z axis)
      M569 P122.0 S1 R0 T5:5:10:0 ; driver 122.0 goes forwards and requires an active-low enable signal (X axis)
      M569 P123.0 S1 R0 T5:5:10:0 ; driver 123.0 goes forwards and requires an active-low enable signal (extruder 0)
      
      ; Axes
      M584 X122.0 Y0.0:0.1 Z0.2:0.3:0.4:0.5 ; set axis mapping
      M350 X16 Y16 Z16 I0 ; configure microstepping without interpolation
      M92 X9 Y9 Z9 ; configure steps per mm
      M208 X0:3800 Y0:5000 Z0:4000 ; set minimum and maximum axis limits
      M566 X900 Y900 Z12 ; set maximum instantaneous speed changes (mm/min)
      M203 X6000 Y6000 Z180 ; set maximum speeds (mm/min)
      M201 X500 Y500 Z20 ; set accelerations (mm/s^2)
      
      ; Extruders
      M584 E123.0 ; set extruder mapping
      M350 E1 I0 ; configure microstepping without interpolation
      M92 E9 ; configure steps per mm
      M566 E120 ; set maximum instantaneous speed changes (mm/min)
      M203 E3600 ; set maximum speeds (mm/min)
      M201 E250 ; set accelerations (mm/s^2)
      
      ; Kinematics
      M669 K0 ; configure Cartesian kinematics
      
      ; Endstops
      M574 X1 P"!^io1.in" S1 ; configure X axis endstop
      M574 Y1 P"!^io2.in" S1 ; configure Y axis endstop
      M574 Z0 ; configure Z axis endstop
      
      ; Tools
      M563 P0 D0 H1 F0 ; create tool #0
      M568 P0 R0 S0 ; set initial tool #0 active and standby temperatures to 0C
      

      Tried inverting the S parameter by 1 to 0.

      ; Endstops
      M574 X1 P"!^io1.in" S0 ; configure X axis endstop
      M574 Y1 P"!^io2.in" S0 ; configure Y axis endstop
      M574 Z0 ; configure Z axis endstop
      

      Also tried not to invert the input pin.

      ; Endstops
      M574 X1 P"^io1.in" S1 ; configure X axis endstop
      M574 Y1 P"^io2.in" S1 ; configure Y axis endstop
      M574 Z0 ; configure Z axis endstop
      

      I don't know what's the mistake if it works fine when no expansion boards are connected.

      Any help is appreciated. Thanks in advance.
      @dc42 ,@T3P3Tony ,@Phaedrux

      jay_s_ukundefined droftartsundefined 2 Replies Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk @AndrewStaines
        last edited by

        @AndrewStaines looks like you have them wired as normally open and they're picking up interference. Wire the normally closed instead

        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

        1 Reply Last reply Reply Quote 0
        • droftartsundefined
          droftarts administrators @AndrewStaines
          last edited by

          @AndrewStaines Are you sure both 1XDs are running the same version of the firmware as the 6XD? Please send M122 and M122 B122 and M122 B123, and post the response.

          When you switch to 'Case 2' it looks like you have the X axis running from one of the 1XDs. Using an endstop on the mainboard to control a motor on an expansion board is supported from 3.3 or later, so check that the 1XD is not on 3.2.

          You shouldn't need to activate the endstop pullup resistor with ^ in the name. Each IO input already has a 27K pullup resistor.

          M574 ... S0 does not invert the input (it did in old versions of the firmware, but not in RRF 3.x, see https://docs.duet3d.com/User_manual/Reference/Gcodes#m574-set-endstop-configuration). S0 isn't even listed as a valid value for S, so probably generates an error, or is ignored. The ! in the pin name inverts the input.

          Apart from the above, I'd tend to agree with @jay_s_uk that the endstop wires are picking up interference when the wiring is swapped from 'Case 1' to 'Case 2'.

          Ian

          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

          1 Reply Last reply Reply Quote 0
          • AndrewStainesundefined
            AndrewStaines
            last edited by AndrewStaines

            @droftarts said in Problem in endstop triggering:

            Are you sure both 1XDs are running the same version of the firmware as the 6XD?

            Checked the firmware version on main board and expansion board, both are running at 3.4.4

            @jay_s_uk said in Problem in endstop triggering:

            looks like you have them wired as normally open and they're picking up interference. Wire the normally closed instead

            I have tried with the normally closed connection. But when triggered it goes to the floating state even triggered all the time.

            All the motors are in ON state in the case 1;(Without connecting the expansion board). During which no floating state occur, so I think its not a interference problem.

            Here is my Diagnostics report

            edit: I have changed my CAN address of both board as 40 and 41

            code_text

            M122
            === Diagnostics ===
            RepRapFirmware for Duet 3 MB6XD version 3.4.4 (2022-10-20 16:19:15) running on Duet 3 MB6XD v1.0 or later (standalone mode)
            Board ID: 0JD2M-999AL-D25S4-7JKD8-3SJ6Q-K41H3
            Used output buffers: 1 of 40 (14 max)
            === RTOS ===
            Static ram: 151264
            Dynamic ram: 95092 of which 0 recycled
            Never used RAM 104244, free system stack 190 words
            Tasks: NETWORK(ready,38.1%,251) ETHERNET(notifyWait,0.1%,451) HEAT(notifyWait,0.0%,374) Move(notifyWait,0.0%,266) CanReceiv(notifyWait,0.0%,773) CanSender(notifyWait,0.0%,335) CanClock(delaying,0.0%,340) MAIN(running,60.9%,951) IDLE(ready,0.9%,29), total 100.0%
            Owned mutexes: USB(MAIN)
            === Platform ===
            Last reset 00:14:46 ago, cause: power up
            Last software reset at 2024-11-17 10:37, reason: User, GCodes spinning, available RAM 104244, slot 1
            Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task MAIN Freestk 0 n/a
            Error status: 0x00
            Aux0 errors 0,0,0
            Step timer max interval 669
            MCU temperature: min 36.3, current 44.8, max 45.0
            Supply voltage: min 0.1, current 23.4, max 23.6, under voltage events: 0, over voltage events: 0, power good: yes
            12V rail voltage: min 0.0, current 12.2, max 12.2, under voltage events: 0
            Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
            Events: 0 queued, 0 completed
            Driver 0: ok
            Driver 1: ok
            Driver 2: ok
            Driver 3: ok
            Driver 4: ok
            Driver 5: ok
            Date/time: 2024-11-17 11:40:46
            Slowest loop: 999.85ms; fastest: 0.05ms
            === Storage ===
            Free file entries: 10
            SD card 0 detected, interface speed: 25.0MBytes/sec
            SD card longest read time 2.3ms, write time 0.0ms, max retries 0
            === Move ===
            DMs created 125, segments created 3, maxWait 123085ms, bed compensation in use: none, comp offset 0.000
            === MainDDARing ===
            Scheduled moves 8, completed 8, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 8], CDDA state -1
            === AuxDDARing ===
            Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
            === Heat ===
            Bed heaters -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0
            === GCodes ===
            Segments left: 0
            Movement lock held by null
            HTTP is idle in state(s) 0
            Telnet is idle in state(s) 0
            File is idle in state(s) 0
            USB is ready with "M122" in state(s) 0
            Aux is idle in state(s) 0
            Trigger is idle in state(s) 0
            Queue is idle in state(s) 0
            LCD is idle in state(s) 0
            SBC is idle in state(s) 0
            Daemon is idle in state(s) 0
            Aux2 is idle in state(s) 0
            Autopause is idle in state(s) 0
            Code queue is empty
            === CAN ===
            Messages queued 4449, received 12831, lost 0, boc 0
            Longest wait 1ms for reply type 6024, peak Tx sync delay 2662, free buffers 50 (min 49), ts 4435/4008/0
            Tx timeouts 0,0,426,6,0,0 last cancelled message type 30 dest 127
            === Network ===
            Slowest loop: 4.01ms; fastest: 0.03ms
            Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
            HTTP sessions: 1 of 8
            = Ethernet =
            State: active
            Error counts: 0 0 0 0 0 0
            Socket states: 2 2 2 2 2 0 0 0
            === Multicast handler ===
            Responder is inactive, messages received 0, responses 0
            ok
            
            
            
            
            
            M122 B41
            Diagnostics for board 41:
            Duet EXP1XD firmware version 3.4.4 (2022-10-14 11:45:39)
            Bootloader ID: SAMC21 bootloader version 2.4 (2021-12-10)
            All averaging filters OK
            Never used RAM 5556, free system stack 88 words
            Tasks: Move(notifyWait<null>,0.0%,153) HEAT(notifyWait<null>,0.1%,115) CanAsync(notifyWait<null>,0.0%,64) CanRecv(notifyWait<null>,0.0%,77) CanClock(notifyWait<null>,0.0%,64) MAIN(running<null>,96.5%,441) IDLE(ready<null>,0.0%,40) AIN(delaying<null>,3.4%,142), total 100.0%
            Last reset 00:01:38 ago, cause: power up
            Last software reset data not available
            Driver 0: pos 0, 9.0 steps/mm, steps req 0 done 0
            Moves scheduled 0, completed 0, in progress 0, hiccups 0, step errors 0, maxPrep 0, maxOverdue 0, maxInc 0, mcErrs 0, gcmErrs 0
            Peak sync jitter 2/6, peak Rx sync delay 192, resyncs 0/0, no step interrupt scheduled
            VIN voltage: min 23.5, current 23.9, max 24.1
            MCU temperature: min 32.0C, current 33.6C, max 33.6C
            Last sensors broadcast 0x00000000 found 0 199 ticks ago, 0 ordering errs, loop time 0
            CAN messages queued 810, send timeouts 0, received 505, lost 0, free buffers 37, min 37, error reg 0
            dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 0
            ok
            
            
            M122 B40
            Diagnostics for board 40:
            Duet EXP1XD firmware version 3.4.4 (2022-10-14 11:45:39)
            Bootloader ID: SAMC21 bootloader version 2.4 (2021-12-10)
            All averaging filters OK
            Never used RAM 5556, free system stack 88 words
            Tasks: Move(notifyWait<null>,0.0%,153) HEAT(notifyWait<null>,0.1%,115) CanAsync(notifyWait<null>,0.0%,64) CanRecv(notifyWait<null>,0.0%,77) CanClock(notifyWait<null>,0.0%,64) MAIN(running<null>,96.5%,443) IDLE(ready<null>,0.0%,40) AIN(delaying<null>,3.4%,142), total 100.0%
            Last reset 00:01:44 ago, cause: power up
            Last software reset data not available
            Driver 0: pos 0, 90.0 steps/mm, steps req 0 done 0
            Moves scheduled 0, completed 0, in progress 0, hiccups 0, step errors 0, maxPrep 0, maxOverdue 0, maxInc 0, mcErrs 0, gcmErrs 0
            Peak sync jitter 1/5, peak Rx sync delay 201, resyncs 0/0, no step interrupt scheduled
            VIN voltage: min 23.8, current 23.8, max 23.8
            MCU temperature: min 32.9C, current 34.3C, max 34.4C
            Last sensors broadcast 0x00000000 found 0 217 ticks ago, 0 ordering errs, loop time 0
            CAN messages queued 206, send timeouts 0, received 122, lost 0, free buffers 37, min 37, error reg 0
            dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 0
            ok
            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA