Use of Canbus for stall detection on remote board
-
Hi
Just a quick question when will stall detection be available via canbus satellite boards (In latest full release (3.4.6) it does not appear to be possible. I am trying to get stall detection via a 3HC expansion board connected via canbus. The drive is connected to the 3HC board
-
@kj3d should work from RRF 3.4 and later, see https://docs.duet3d.com/User_manual/RepRapFirmware/CAN_limitations#temporary-limitations
Make sure the expansion board firmware is up to date. Otherwise post your config, responses to M122, commands you are using etc.
Ian
-
The extruder is simply to convey filament to the other extruders and its "Load" code is below
;Motor stall detection
;T2 ; select tool 2
;M302 P1 ; enable cold extrusion
;G4 S1 ; wait for one second
;G4 S1
;G1 P1.1 F3000 ; retract a little filament
;M400 ; wait for move to finish before changing current;M915 E2 S3 ; set stall sensitivity
;M913 E80 ; motor current to 30%
;M83 ; relative extrusion
;G1 H1 E800 F1000 ; feed up to 800mm until stall
;M913 E100 ; restore normal motor current
;M302 P0 ; disable cold extrusion
;M291 P"Filament Prime complete!" S0 T3 ; display message(The lines appear above appear commented out - in the macro they are not)
-
m122 b1
Diagnostics for board 1:
Duet EXP3HC rev 1.01 or earlier firmware version 3.4.6 (2023-07-21 14:15:46)
Bootloader ID: not available
All averaging filters OK
Never used RAM 158504, free system stack 173 words
Tasks: Move(notifyWait,0.0%,128) HEAT(notifyWait,0.1%,88) CanAsync(notifyWait,0.0%,69) CanRecv(notifyWait,0.5%,80) CanClock(notifyWait,0.1%,71) TMC(notifyWait,57.0%,99) MAIN(running,32.1%,409) IDLE(ready,0.0%,40) AIN(delaying,10.2%,263), total 100.0%
Last reset 01:49:18 ago, cause: software
Last software reset at 2021-08-15 15:42, reason: HardFault bfarValid precise, available RAM 154828, slot 2
Software reset code 0x0060 HFSR 0x40000000 CFSR 0x00008200 ICSR 0x00000803 BFAR 0x30303051 SP 0x20002fd8 Task MAIN Freestk 350 ok
Stack: 30303030 20002ff8 00000000 00000000 70707070 00023a09 ffffffff 61000000 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0000007c ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
Driver 0: pos 212040, 684.0 steps/mm,standstill, SG min 0, mspos 344, reads 50872, writes 19 timeouts 0, steps req 212040 done 212040
Driver 1: pos 0, 684.0 steps/mm,standstill, SG min 0, mspos 8, reads 50875, writes 16 timeouts 0, steps req 0 done 0
Driver 2: pos 0, 80.0 steps/mm,standstill, SG min 0, mspos 8, reads 50881, writes 11 timeouts 0, steps req 0 done 0
Moves scheduled 3, completed 3, in progress 0, hiccups 0, step errors 0, maxPrep 24, maxOverdue 0, maxInc 0, mcErrs 0, gcmErrs 0
Peak sync jitter -3/15, peak Rx sync delay 180, resyncs 0/0, no step interrupt scheduled
VIN voltage: min 24.0, current 24.0, max 24.0
V12 voltage: min 12.2, current 12.2, max 12.3
MCU temperature: min 31.7C, current 32.7C, max 32.7C
Last sensors broadcast 0x00000000 found 0 28 ticks ago, 0 ordering errs, loop time 0
CAN messages queued 52504, send timeouts 0, received 321264, lost 0, free buffers 37, min 37, error reg 0
dup 0, oos 0/0/0/0, bm 0, wbm 0, rxMotionDelay 292, adv 37101/37190 -
The error message I get is unable to initiate extruder end stops
-
@kj3d to clarify: reporting of stalls from motors attached to expansion boards is supported in 3.4 and later, but stall detect endstops on motors attached to expansion boards are not yet.
Note, if you want to use the resume-after-power fail functionality then stall detection endstops on axis motors are not suitable, because the trigger point is not consistent enough.
-
Thanks for that. I was looking to sense when the filament had completed its feed from the feed extruder to the main extruder before that started its load sequence.
Reporting the stall would be a useful event, but I cant see how to configure that?
Alternatively monitoring the main extruder during the actual operation of G1 E2000 F1000 controlled by the 3HC board (running the feed extruder) (The main extruder has a filament sensor on it (albeit that's controlled by a tool board) Is it possible to monitor sensors (located on other boards) whilst a G1 command is executing on a distinct and separate canbus board, if so how and do I have any choice on monitoring frequency?
-
@kj3d I’m not sure if this will work, but try changing this
M915 E2 S3
to
M915 P1.1 S3
Then it should look for the stall of the specific motor, not the endstop.
Ian
-
Thanks Ian, Will try that in the morning and let you know how I got on.
-
Hi
That worked. I can now reliably detect the stall. Ideally I would like to stop the filament feeding when the stall is detected.
At present I use G1 E1000 F1000 to feed filament up to a second extruder, how would be best to interrupt the G code part way if a stall is detected if it reaches the second extruder after 900mm (bearing in mind the end stop limitations with the canbus boards)