Filament sensor
-
Please post your full config.g and the the results of sending M122 and M98 P"config.g" in the gcode console please. Also post the contents of your filament-change.g macro.
-
@phaedrux
Hi, thank you for the fast responce .
Here is my config.g; General preferences G90 ; Send absolute coordinates... M83 ; ...but relative extruder moves ; Network M111 S0 ; Debug off M550 Deluxe600 ; Machine name (can be anything you like) M551 inman. ; Machine password (used when you connect Duet Web Control or via FTP) M540 PBE:EF:DE:AD:FE:ED ; MAC Address (only needed if you have more than one Duet 0.6 or 0.8.5 on the same network) M552 S1 P192.168.210.202 ; IP address (0 = use DHCP) M554 P192.168.104.217 ; Gateway (not used yet) M553 P255.255.255.0 ; Netmask M555 P2 ; Set output to look like Marlin M575 P1 B57600 S1 ; Set auxiliary serial port baud rate and require checksum (for PanelDue) ; 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 M584 X0 Y1 Z2 E3 ; set drive mapping M350 Z8 X16 Y16 I1 ; Configure microstepping with interpolation M350 E32 I0 ; Configure microstepping without interpolation M92 X50 Y50 Z400 E280 ; Set steps per mm M566 X480 Y480 Z5 E270 ; Set maximum instantaneous speed changes (mm/min) M203 X12000 Y12000 Z720 E7200 ; Set maximum speeds (mm/min) M201 X1000 Y1000 Z125 E5000 ; Set accelerations (mm/s^2) M906 X1400 Y1400 Z2200 E700 I1 ; Set motor currents (mA) and motor idle factor in per cent M84 S5 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S0 ; Set axis minima M208 X545 Y545 Z675 S0 ; Set axis maxima ; Endstops M574 X1 S1 P"!xstop" ; configure active-high endstop for low end on X via pin xstop M574 Y2 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"exp.heater3" ; create servo pin 0 for BLTouch M558 P9 C"^zprobe.in" A5 H4 F100 T6000 ; set Z probe type to bltouch and the dive height + speeds G31 X0 Y0 Z0.9 ; set Z probe trigger value, offset and trigger height M557 X0:500 Y40:500 S100:100 ; define mesh grid ;Filament Runout Sensor M591 P1 C"e0stop" S1 D0 ; filament monitor connected to E0 endstop ; 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 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 S100 ; set temperature limit for heater 0 to 100C 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 S1 H-1 ; 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 S0.5 H1 T60 ; set fan 1 value. Thermostatic control is turned on M950 F2 C"fan2" Q500 ; create fan 2 (bed) on pin fan2 and set its frequency M106 P2 S1 H0 T50 ; Tools M563 P0 D0 H1 ; Define tool 0 G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets G10 P0 R20 S0 ; Set initial tool 0 active and standby temperatures to 0C ;LED control M950 P5 C"e1heat" ;set e1heat as a GPIO output pin M501 M107
M122
=== Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3 (2021-06-15 21:44:54) running on Duet Ethernet 1.02 or later Board ID: 08DDM-9FAMU-JW4S4-6JKD8-3SJ6M-T3Y7V Used output buffers: 3 of 24 (15 max) === RTOS === Static ram: 23876 Dynamic ram: 70804 of which 0 recycled Never used RAM 19736, free system stack 126 words Tasks: NETWORK(ready,24.5%,244) HEAT(delaying,0.0%,330) Move(notifyWait,0.1%,313) MAIN(running,75.2%,445) IDLE(ready,0.3%,29), total 100.0% Owned mutexes: === Platform === Last reset 00:05:30 ago, cause: power up Last software reset at 2021-07-28 10:51, reason: User, GCodes spinning, available RAM 16640, slot 2 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Step timer max interval 0 MCU temperature: min 29.0, current 39.8, max 40.2 Supply voltage: min 24.1, current 24.3, max 24.4, under voltage events: 0, over voltage events: 0, power good: yes Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0 Driver 0: position 750, standstill, SG min/max not available Driver 1: position 0, standstill, SG min/max 0/226 Driver 2: position 1964, standstill, SG min/max 0/376 Driver 3: position 0, standstill, SG min/max not available Driver 4: position 0, standstill, SG min/max not available Driver 5: position 0 Driver 6: position 0 Driver 7: position 0 Driver 8: position 0 Driver 9: position 0 Driver 10: position 0 Driver 11: position 0 Date/time: 2021-07-31 20:31:26 Cache data hit count 4294967295 Slowest loop: 6.18ms; fastest: 0.17ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 10 SD card 0 detected, interface speed: 20.0MBytes/sec SD card longest read time 1.4ms, write time 0.0ms, max retries 0 === Move === DMs created 83, maxWait 136889ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 14, completed moves 14, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 1], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 === 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 idle 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 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === Filament sensors === Extruder 0 sensor: ok === Network === Slowest loop: 15.52ms; fastest: 0.02ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions HTTP sessions: 1 of 8 Interface state active, link 100Mbps full duplex
M98 P"config.g"
RepRap name: My Duet Error: Bad command: man. Error: Z axis maximum must be greater than minimum 7/31/2021, 8:31:27 PM M122
filament-change.g
M83 ; relative extruder moves G1 E-5 F2000 ; retract 5mm of filament G91 ; relative positioning G1 Z10 F360 ; lift Z by 10mm G90 ; absolute positioning G1 X5 Y272.5 F6000 ; go to X=0 Y=0 M98 P"Unload" M25
-
@deluxe-600 said in Filament sensor:
Error: Bad command: man.
M551 inman. ; Machine password
Put quotes around your password.
https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M551_Set_Password
Quotation marks around the password are mandatory in RRF3, but discretionary in earlier firmware versions.
@deluxe-600 said in Filament sensor:
Error: Z axis maximum must be greater than minimum
; Axis Limits
M208 X0 Y0 Z0 S0 ; Set axis minima
M208 X545 Y545 Z675 S0 ; Set axis maximaDo you notice anything wrong with your axis minima and maxima? You have S0 for both. Maximum should be S1.
https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M208_Set_axis_max_travel
@deluxe-600 said in Filament sensor:
G31 X0 Y0 Z0.9
You're missing the X Y offset for your probe.
https://duet3d.dozuki.com/Wiki/Test_and_calibrate_the_Z_probe#Section_Measuring_Probe_X_Y_Offset
@deluxe-600 said in Filament sensor:
;Filament Runout Sensor M591 P1 C"e0stop" S1 D0 ; filament monitor connected to E0 endstop
Are you sure you're actually connected to the e0stop pin?
If you insert and remove the filament to trigger the endstop, does the endstop LED on the board go on and off?
Are you sure the switch triggers on high?M591 P1 or P2
1=simple sensor (high signal when filament present)
2=simple sensor (low signal when filament present)What kind of filament runout switch is it? Photo? Link?
@deluxe-600 said in Filament sensor:
I would like the sensor when it detects no filament to run the "filament-change.g" macro i have created for it.
I don't think this will be possible.
https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M591_RepRapFirmware_Num_3
The action on a filament error is to pause the print and advise you that there has been a filament error.
Filament-change.g is used by M600.
https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M600_Filament_change_pause
This command behaves like M226 except that if macro file filament-change.g exists in /sys on the SD card, it is run in preference to pause.g.
If you want the switch to do something specific, use this method described here https://duet3d.dozuki.com/Wiki/Connecting_and_configuring_filament-out_sensors#Section_Firmware_1_18_and_earlier
To make the firmware run a script when the filament runs out, use M581 to associate the endstop you chose with a "trigger". Trigger 0 is an emergency stop (probably not what you want), trigger 1 pauses the print (running pause.g), and otherwise trigger n runs the file triggern.g., which you can write yourself.
Finally, the trigger only happens when the endstop changes state. If you try to start a print with the filament out, the trigger won't happen. So add M582 to the start of your prints to check the filament state and run the trigger if there's no filament.
https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M581_RepRapFirmware_3_01_and_later
-
@phaedrux Thank you for the reply.
I am using filament sensor from Prusa MINI because i had it laying around.
Its a optical gate acting like a normal switch.
The sensor works as the print stops and the light on the board turns on.I understand i need the filament runout to send M600 command but i dont know how to do it.
-
@deluxe-600 in RRF3.3 if you configure a filament monitor using M591, when it reports no filament RRF will try to run filament-error#.g where # is the extruder number, or failing that filament-error.g. If neither of those is found then it runs pause.g.
-
@dc42
Sorry to hijack this thread, but I don't want to create a new one for this.
I've heard somewhere in the wiki that the filament sensor needs to be on the same board than the extruder it's watching to.
Is it still the case with 3.3+?
I'm about to switch to Duet 3 with 1LC toolboard, my filament sensor is outside the carriage, on the main board. -
@dc42
So if i understand it correctly. I need to find or make filament-error#.g and put the contents of
filament-change.g in it? Or how should i do it correctly?Or maybe delete the filament-error#.g or filament-error.g for it to run pause.g?
Best would be if i could somehow run filament-change.g as a result of no fillament trigger.
-
@deluxe-600 just copy filament-change.g to filament-error.g; or have filament-error.g call filament-change.g using M98.
-
@dc42 Thanks, i will try that and let you know.
-
@kipk said in Filament sensor:
@dc42
Sorry to hijack this thread, but I don't want to create a new one for this.
I've heard somewhere in the wiki that the filament sensor needs to be on the same board than the extruder it's watching to.
Is it still the case with 3.3+?
I'm about to switch to Duet 3 with 1LC toolboard, my filament sensor is outside the carriage, on the main board.I have a very similar situation. I'm about to add a filament sensor and have two questions:
-
The question above that was already asked, must the detector be connected to the same (tool) board that's running the extruder?
-
If I'm using a tool board, in the M591 configuration, Is the correct parameter "D121.0" since the extruder is run from the tool board, or just "E0"?
Thanks
-
-
@dc42 After a bit of trial and error i figured it out .
For some reason adding just M98 P"pause.g" in the filament-error does nothing.
So i just copied everything from pause.g to filament-error.g but then i wanted the tool to be put in stand by. After a few tries i figured out it needs to be writen is specific order to work.
So here is my final version of filament-error.g that actualy does what its suposed to.G10 P0 R20 ; Set standby temp of tool 0 to 20*
M83 ; relative extruder moves
G1 E-50 F2000 ; retract 10mm of filament
G91 ; relative moves
G1 Z5 F500 ; raise nozzle 5mm
G90 ; absolute moves
G1 X20 Y525 F6000 ; go to X=20 Y=525
T-1 ; Deselect toolThank you for the help guys, have a great day.
-
@kb58 said in Filament sensor:
I have a very similar situation. I'm about to add a filament sensor and have two questions:
The question above that was already asked, must the detector be connected to the same (tool) board that's running the extruder?
If I'm using a tool board, in the M591 configuration, Is the correct parameter "D121.0" since the extruder is run from the tool board, or just "E0"?
I know, the thread is a little bit old. But I had the same questions, nobody has been answered and maybe it will help other users with Filament sensor and 1LC...
- Yes, it have to...
- D0 is ok. Here's my config.
; Filament sensor (Duet) M591 D0 P3 C"121.io1.in" S1 R70:130 L24.8 E3.0 ; Duet3D rotating magnet sensor for extruder drive 0 is connected to E0 endstop input, enabled, sensitivity 24.8mm.rev, 70% to 130% tolerance, 3mm detection length M591 D0 ; display filament sensor parameters for extruder drive 0