Stopping 2 axis with 1 endstop
-
Hi all
I'am working on getting an MMU2s unit working on my printer powered by a duet 2 wifi running 3.1.1
i have an endstop that detects when there is filament present between the drive gears of my E3d Hemera extruder.
and what i would like to do is drive 2 separate axis until the endstop is switched.
the 2 axis is :
the V axis which is the drive gears in the MMU2 unit.
and the E axis of the hemera.is there anyway this can be done?
atm its driving the filament using the V axis until it stalls using sensorless detection, but it does not seem to be the most reliable. due to the changing conditions af the filament as it goes through the Bowden tube towards the extruder.
-
Are the V and E axis the same steps per mm? You might be able to combine the axis and then drive them together until an endstop is triggered and then split them back up into V and E.
Can you share your config.g to show how things are configured right now? Maybe some more details on how your system is setup.
-
@Phaedrux can't post my config before tomorrow
But the e axis is about 409 step/mm
And the v axis is only about 145 steps/mmI had considered combining them but could not figure out a way to do it do to the big difference if steps per mm
-
What Phaedrux said:
A macro.
Combines the two motors as a mixing extruder with a ratio between the motors, so they function as a single axis.
Then home that axis.
Then reconfigure the motors to split them back into separate axies.
finally a G92 E0.Hopefully that makes sense. I've not ever tried to home E, but I don't see why it wouldn't work.
Remember, you can totally reconfigure RRF on the fly.
-
a mixing extruder might be the way forward.
if i can figure out how to work it into my config.i have attached my config and all the macros for Tool 0
the other tools 1-4 is the same only having the selector positions different.its still a WIP and there is much more to at. but its what i got atm.
Config.g
; Configuration file for Duet WiFi (firmware version 1.21) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v2 on Tue Mar 05 2019 15:58:37 GMT+0100 (Centraleuropæisk normaltid) ;3dprint counter M950 S4 C"duex.pwm2" ;heater 7 as servo pin 4 M42 P4 S0 ; servo pin4 set to low ; General preferences G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves ; Network M550 P"P3steel" ; Set machine name M551 P"iasdf" ; Set password M552 S1 ; Enable network M586 P0 S1 ; Enable HTTP M586 P1 S0 ; Disable FTP M586 P2 S0 ; Disable Telnet ; Drives M584 X0 Y8 E1 Z2:4 V3 W7 U9 ; two Z motors connected to driver outputs Z and E1 M569 P0 S1 ; Drive 0 goes forwards M569 P1 S0 ; Drive 1 goes backwards M569 P2 S1 ; Drive 2 goes forwards M569 P3 S1 ; Drive 3 goes forwards M569 P4 S1 ; Drive 4 goes forwards M569 P8 S0 ; Drive 8 goes backwards M569 P9 S0 ; Drive 9 goes backwards M569 P7 S1 ; Drive 7 goes forwards M350 X16 Y16 Z16:16 V16 U16 W16 I1 ; Configure microstepping without interpolation M350 E16 I1 ; Configure microstepping with interpolation M92 X80.00 Y80.00 Z400.00:400.00 E409.0 U400 V162 W26 ; Set steps per mm M566 X300.00 Y300.00 Z36.00:36.00 E360.00 U200 V3600 W300 ; Set maximum instantaneous speed changes (mm/min) M203 X12000.00 Y12000.00 Z1200.00:1200.00 E7200.00 U1000 V7000 W9000 ; Set maximum speeds (mm/min) M201 X900.00 Y900.00 Z120.00:120.00 E15000.00 U500 V900 W900 ; Set accelerations (mm/s^2) M906 X1500.00 Y1500.00 Z800.00:800.00 E1250.00 U800 V1000 W750 I30 ; Set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ;Duel z compensation M671 X-55:296 Y0:0 S5 ; leadscrews at left (connected to Z) and right ; Axis Limits M208 X-8 Y-5 Z0 U0 V-1000 W0 S1 ; Set axis minima M208 X237 Y215 Z200 U75 V1000 W78 S0 ; Set axis maxima ; Stall detection M915 X Y U V W S20 R1 F1 ; Endstops M574 X1 Y1 S3 ; Set endstops controlled by motor load detection M574 U2 W1 S3 M574 Z1 S2 ; Set endstops controlled by probe M574 V1 P"e0stop" S1 ;Filament sensor ;M591 D0 P1 C"ystop" ;led setup M950 P2 C"e1heat" Q500 M42 P2 I1 S1 ; set lighting on full bright ; Z-Probe M950 S0 C"duex.pwm1" ; create servo pin 0 for BLTouch M558 P9 C"^zprobe.in" H5 F240 T9000 ; Set Z probe type to bltouch and the dive height + speeds G31 P500 X-14.65 Y19,29 Z3 ; Set Z probe trigger value, offset and trigger height M557 X20:222 Y15:215 S30 ; Define mesh grid ; Heaters M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 A"Bed" ; 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 A109.9 C411.9 D9.6 V11.7 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"spi.cs1" Y"rtd-max31865" A"Hotend" ; create sensor number 1 as a PT100 sensor in the first position on the Duet 2 daughter board connector M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 M307 H1 A354.8 C196.4 D4.3 V12 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S400 M308 S2 Y"drivers" A"Drivers" ; Set temperature limit for heater 1 to 400C ; Fans M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency M106 P0 S0 H-1 C"Part Cooler" ; set fan 0 value. Thermostatic control is turned off M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency M106 P1 S1 H1 T45 C"Heatsink Cooler" ; set fan 1 value. Thermostatic control is turned on ;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 D0 H1 ; 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 M563 P2 D0 H1 ; Define tool 2 G10 P2 X0 Y0 Z0 ; Set tool 2 axis offsets G10 P2 R0 S0 ; Set initial tool 2 active and standby temperatures to 0C M563 P3 D0 H1 ; Define tool 3 G10 P3 X0 Y0 Z0 ; Set tool 3 axis offsets G10 P3 R0 S0 ; Set initial tool 3 active and standby temperatures to 0C M563 P4 D0 H1 ; Define tool 4 G10 P4 X0 Y0 Z0 ; Set tool 4 axis offsets G10 P4 R0 S0 ; Set initial tool 4 active and standby temperatures to 0C ;retraction setup M207 P0 S0.8 F3000 Z0.2 ;basic Retraction setup ; Automatic saving after power loss is not enabled M911 S10.7 R22 P"M913 X0 Y0 G91 M83 G1 Z3 E-1 F1000" ; Custom settings are not configured T-1 P0
Tpre0.g
; called before tool 0 is selected G90 ; absolute moves M913 U100 V100 W100 G1 U1 F2000 ; move selector to T0 position G1 W4 F10000 ; move idler to T0 position M400 ; wait for moves to stop M98 P"tpremaster.g" ;M591 D0 P2 C"xstop" S1 ; activate filament sensor
TpreMaster.g
M574 V1 S1 P"e0stop" ; set V axis max endstop to switched low G91 ; relative moves G1 V40 H1 F3000 ; feed filament to filament sensor G92 V0 ; force V to 0mm G1 V10 F3000 ; feed a bit more to reliably switch sensor and reach tube G92 V0 ; force V to 0mm M400 ; wait for moves to finish if !sensors.endstops[4].triggered ; checks if V axis endstop is triggered M291 P"Filament loading failed" S3 abort M574 V1 S3 ; set V axis max endstop to sensorless M913 V50 ; reduce motor current to 30% to prevent grinding M915 V S20 F0 ; set stall guard parameters M400 ; wait for moves to finish G1 H1 V900 F5000 ; fast feed filament into extruder G92 V0 ; force V to 0mm G90 ; absolute moves
Tpost0.g
; called after tool 0 has been selected M913 U100 V100 W100 ; 100% current on UVW G1 W4 ; move W to engage filament M116 P0 ; wait for nozzle heat up M98 P"tpostmaster.g" ; run postmaster.g
TpostMaster.g
G1 E10 V10 F300 ; feed filament into extruder with both V and E axis ;activate laser pew pew pew G90 ; absolute moves G1 W78 F10000 ; move W to safe position G91 ; relative moves G1 E10 F5000 ; drive extruder for 90mm ;G1 E10 F300 ; slowly load the hotend G90 ; absolute moves
-
the whole mixing extruder is not really making sense to me. so if anyone has a good idea iam all ears
-
The same concept is discussed here: https://forum.duet3d.com/topic/20236/duplicate-extruder-signal
Does that make more sense?
-
@Phaedrux that makes alot more sense thanks,
But from my testing with a single extruder iam not able to asigne a endstop switch to a extruder axisWould it be possible to move the axis in a "while" loop according to the filament sensor. Without having it be constantly accelerating and ?
-
@lahn92 said in Stopping 2 axis with 1 endstop:
But from my testing with a single extruder iam not able to asigne a endstop switch to a extruder axis
I wasn't sure about this either, which is why I originally asked if the steps per mm were the same, then you could combine the axis into a non-extruder axis.
But I still wonder if an endstop could be used to stop extrusion. I feel like that should be a thing.
It can be done with stall detection to load filament.
https://duet3d.dozuki.com/Wiki/Stall_detection_and_sensorless_homing#Section_Using_extruder_stall_detection_during_filament_loading@lahn92 said in Stopping 2 axis with 1 endstop:
Would it be possible to move the axis in a "while" loop according to the filament sensor. Without having it be constantly accelerating and ?
I'm not sure about that either.
-
@Phaedrux said in Stopping 2 axis with 1 endstop:
@lahn92 said in Stopping 2 axis with 1 endstop:
It can be done with stall detection to load filament.
https://duet3d.dozuki.com/Wiki/Stall_detection_and_sensorless_homing#Section_Using_extruder_stall_detection_during_filament_loadingYeah that's the way i already have it working it's drives the filament untill it stalls on the extruder gears. And they drives the v and e axis 10 mm. And the uses the filament monitor to check for correct load.
But my problem is that the conditions change quite a lot making the stall detection hard to tune.
-
So i have messed with it a bit more trying to use some while loops.
pretty much this
while !sensors.filamentMonitors[0].filamentPresent G1 V1 E1 F1000
and that actually works okay up to a point. the loading it smooth and continues. but the problem seems to be that it might be buffering some moves because it will continue moving a bit after triggering the filament monitor.
i then tried adding a G4 P100 or a M400
this makes it so that it triggers at the correct time but makes it run slow and chopping as it moves 1 mm stops, moves 1 mm, stops and so on.