@cosmowave said in Changing Stepper Speeds Dynamically with Duet wifi:
M203
No, you can't... I suggest that you re-read my post.
@cosmowave said in Changing Stepper Speeds Dynamically with Duet wifi:
M203
No, you can't... I suggest that you re-read my post.
Hey everyone!
I’ve built a custom machine (not exactly a 3D printer) using a Duet 3 controller, and I could use some help with a challenge I’m facing.
I have three stepper motors that need to run continuously at different speeds. So far, I’ve managed this pretty easily with a g-code like:
G1 X9999999 Y9999999 Z99999999 F1000;
However, here’s where I’m stuck: I need to be able to change the speed of one or two of the steppers while they’re running.
One idea I had was to create a really long g-code file with something like:
G1 X2 Y2 Z2 F100;
Then I’d use an M92 command to change the steps/mm for each axis, effectively adjusting the speed "on the fly."
I’m open to any suggestions or ideas you may have—thanks in advance!
Duet Wifi 2 - Is there an updated way to control the printer using Telegram/Google home?
Here's the solution:
M584 X0 Y1 Z2 U3 E4:5:6 ; set drive mapping
M350 X16 Y16 Z16 U16 E16:16:16 ; configure microstepping with interpolation
M92 X71.11 Y71.11 Z800 U71.11 E400:400:400 ; set steps per mm
M566 X720.00 Y720.00 Z240.00 U720.00 E1080.00:1080.00:1080.00 ; set maximum instantaneous speed changes (mm/min)
M203 X14000.00 Y14000.00 U14000.00 Z2000.00 E1200.00:1200.00:1200.00 ; set maximum speeds (mm/min)
M201 X2000.00 Y2000.00 U2000.00 Y2000.00 Z600.00 E1600.00:1600.00:1600.00 ; set accelerations (mm/s^2)
M906 X1000 Y1000 Z1000 U800 E650:650:650 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout
@jay_s_uk I don't have an extra D in the config file.
@pcr I've added 'V' axis and I manage to control the extruder by G1 V50 for example.
; Drives
M569 P0 S0 ; X - right extruder - physical drive 0 goes forwards
M569 P1 S1 ; Y physical drive 1 goes forwards
M569 P2 S1 ; Z physical drive 2 goes forwards
M569 P3 S1 ; X1 - right extruder physical drive 3 goes forwards
M569 P4 S1 ; right extruder - physical drive 3 goes forwards
M569 P5 S1 ; left extruder - physical drive 3 goes forwards
M569 P6 S1 ; Spool extruder
M584 X0 Y1 Z2 U3 E4:5 V6 ; set drive mapping
M350 X16 Y16 Z16 U16 E16:16 V16 ; configure microstepping with interpolation
M92 X71.11 Y71.11 Z800 U71.11 E400:400 V400 ; set steps per mm
M566 X720.00 Y720.00 Z240.00 U720.00 E1080.00:1080.00 V1080 ; set maximum instantaneous speed changes (mm/min)
M203 X14000.00 Y14000.00 U14000.00 Z2000.00 E1200.00:1200.00 V1200 ; set maximum speeds (mm/min)
M201 X2000.00 Y2000.00 U2000.00 Y2000.00 Z600.00 E1600.00:1600.00 V1600 ; set accelerations (mm/s^2)
M906 X1000 Y1000 Z1000 U800 E650:650 V500 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout
@pcr I've tried both M563 P0 D0:6 and M563 P0 D0:2, with no luck.
What's more, when I try this, HEATER 1 disappears from the GUI (I've got two independent extruders on IDEX printer).
; Tools
M563 P0 D0:2 H1 F0 ; define tool 0
M563 P1 D1 H2 X3 F2 ; tool 1 uses extruder 1 and heater 2 and maps X to U, use fan 2 as the print cooling fan
G10 P0 Y0 X0 Y-0.4 Z0 R180 S180 ; ; set initial tool 0 active and standby temperatures to 0C
G10 P1 Y0 U0 Z0 S200 R200 ; set tool 1 offsets and temperatures
I have a highly fragile filament, in order to successfully print it, I came up with a stepper motor that withdraws the filament out of the spool, and directs it toward the extruder.
I have a Duet wifi + Duex 5, and the spool stepper motor is connected to D6 on the Duex.
I've tried following this, with no success.
Here is the config file:
; Configuration file for Duet WiFi (firmware version 3)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Feb 24 2021 16:17:10 GMT+0200 (Eastern European Standard Time)
; Network configurations
M552 S0;
M552 S1;
M587 S"shafir_secure" P"PaSS$shafir123";
;M587 S"Printer_1" P"canada1234567";
; General preferences
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"My Printer" ; set printer name
; Network
M552 S1 ; enable network
M586 P0 S1 ; enable HTTP
M586 P1 S0 ; disable FTP
M586 P2 S0 ; disable Telnet
; Drives
M569 P0 S0 ; X - right extruder - physical drive 0 goes forwards
M569 P1 S1 ; Y physical drive 1 goes forwards
M569 P2 S1 ; Z physical drive 2 goes forwards
M569 P3 S1 ; X1 - right extruder physical drive 3 goes forwards
M569 P4 S1 ; right extruder - physical drive 3 goes forwards
M569 P5 S1 ; left extruder - physical drive 3 goes forwards
M584 X0 Y1 Z2 U3 E4:5 ; set drive mapping
M350 X16 Y16 Z16 U16 E16:16 ; configure microstepping with interpolation
M92 X71.11 Y71.11 Z800 U71.11 E400:400 ; set steps per mm
M566 X720.00 Y720.00 Z240.00 U720.00 E1080.00:1080.00 ; set maximum instantaneous speed changes (mm/min)
M203 X14000.00 Y14000.00 U14000.00 Z2000.00 E1200.00:1200.00 ; set maximum speeds (mm/min)
M201 X2000.00 Y2000.00 U2000.00 Y2000.00 Z600.00 E1600.00:1600.00 ; set accelerations (mm/s^2)
M906 X1000 Y1000 Z1000 U800 E650:650 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout
; Axis Limits
M208 X98 Y-80 Z-20 U0 S1 ; set axis minima
M208 X458 Y237 Z250 U359.4 S0 ; set axis maxima
; Endstops
M574 X2 S1 P"xstop" ; configure active-high endstop for high 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 S1 P"zstop" ; configure active-high endstop for low end on Z via pin zstop
M574 U2 S1 P"e0stop" ; configure active-high endstop for low end on Z via pin zstop
; Z-Probe
;M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed
M558 P9 C"^zprobe.in" H4 F500 T14000 ;
M557 X100:340 Y10:237 S25; ; define mesh grid
M950 S0 C"duex.pwm5" ; Create a GPIO/Servo pin index using your chosen control pin
G31 X-31.75 Y49.48 Z0.76 P25 ; Set up the probe offsets, trigger height and trigger value in G31:
; 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 S140 ; 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
M143 H1 S280 ; set temperature limit for heater 1 to 280C
M308 S2 P"e1temp" Y"thermistor" T100000 B4138 ; configure sensor 2 as thermistor on pin e0temp
M950 H2 C"e1heat" T2 ; create nozzle heater output on e0heat and map it to sensor 2
M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
M143 H2 S280 ; set temperature limit for heater 1 to 280C
; 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
M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency
M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on
; Tools
M563 P0 D0 H1 F0 ; define tool 0
M563 P1 D1 H2 X3 F2 ; tool 1 uses extruder 1 and heater 2 and maps X to U, use fan 2 as the print cooling fan
G10 P0 Y0 X0 Y-0.4 Z0 R180 S180 ; ; set initial tool 0 active and standby temperatures to 0C
G10 P1 Y0 U0 Z0 S200 R200 ; set tool 1 offsets and temperatures
;G10 P1 X100 Y0 Z0 ; set tool 0 axis offsets
;M563 P1 D1 H2 F1 ; define tool 1
;G10 P1 X100 Y0 Z0 ; set tool 0 axis offsets
;G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C
; Custom settings are not defined
; Miscellaneous
M575 P1 S1 B57600 ; enable support for PanelDue
; Heaters & bed Tuning
; M307 H0 D200 ;
;M307 H1 R4.063 C68.5 D3.79 S0.2 V26.7 ; E0 PID tunining
;M307 H1 R5.489 C58 D25.82 S0.16 V20;
;M307 H2 R5.489 C58 D25.82 S0.16 V20;
M307 H0 R0.280 C426.0 D24.18 V26.8 B0 ;
M307 H1 R4.485 C110.5 D9.65 S0.40 V24.2;
M307 H2 R3.046 C265.8 D11.00 S1.00 V24.3;
M302 S120 R110 ; Allow extrusion starting from 120°C and retractions already from 110°C
Thanks for the fast reply, it did the trick!!
(I haven't yet connected the thermistor).
have an IDEX printer.
Duet 2 Wifi + Duex.
I've managed to set up the additional axis (U) but I can't seem to set up an additional heater for the second extruder.
The second drive show on the gui, but when trying to select T2 and sending: G1 E10, I get this error message: Attempting to extrude with no tool selected.
Here is my config.g file:
; Configuration file for Duet WiFi (firmware version 3)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v3.2.3 on Wed Feb 24 2021 16:17:10 GMT+0200 (Eastern European Standard Time)
; Network configurations
M552 S0;
M552 S1;
M587 S"shafir_secure" P"PaSS$shafir123";
;M587 S"Printer_1" P"canada1234567";
; General preferences
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"My Printer" ; set printer name
; Network
M552 S1 ; enable network
M586 P0 S1 ; enable HTTP
M586 P1 S0 ; disable FTP
M586 P2 S0 ; disable Telnet
; Drives
M569 P0 S0 ; X0 - right extruder - physical drive 0 goes forwards
M569 P1 S1 ; Y physical drive 1 goes forwards
M569 P2 S1 ; Z physical drive 2 goes forwards
M569 P3 S1 ; E0 - right extruder physical drive 3 goes forwards
M569 P4 S1 ; X1 - left extruder - physical drive 3 goes forwards
M569 P5 S1 ; E1 - left extruder - physical drive 3 goes forwards
M584 X0 Y1 Z2 U3 E4:5 ; set drive mapping
M350 X16 Y16 Z16 U16 E16:16 ; configure microstepping with interpolation
M92 X71.11 Y71.11 Z800 U71.11 E400:400 ; set steps per mm
M566 X720.00 Y720.00 Z240.00 U720.00 E1080.00:1080.00 ; set maximum instantaneous speed changes (mm/min)
M203 X9000.00 Y9000.00 U9000.00 Z2300.00 E1200.00:1200.00 ; set maximum speeds (mm/min)
M201 X2000.00 Y2000.00 U2000.00 Y2000.00 Z600.00 E1600.00:1600.00 ; set accelerations (mm/s^2)
M906 X800 Y800 Z800 U800 E500:500 ; set motor currents (mA) and motor idle factor in per cent
M84 S30 ; Set idle timeout
; Axis Limits
M208 X0 Y-100 Z-20 S1 ; set axis minima
M208 X350 Y200 Z250 S0 ; set axis maxima
; Endstops
M574 X2 S1 P"xstop" ; configure active-high endstop for high 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 S1 P"zstop" ; configure active-high endstop for low end on Z via pin zstop
; Z-Probe
M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed
M557 X15:215 Y15:195 S20 ; 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 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"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
M143 H1 S280 ; set temperature limit for heater 1 to 280C
M308 S2 P"e1temp" Y"thermistor" T100000 B4138 ; configure sensor 2 as thermistor on pin e0temp
M950 H2 C"e1heat" T2 ; create nozzle heater output on e0heat and map it to sensor 2
M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
M143 H2 S280 ; set temperature limit for heater 1 to 280C
; 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
M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency
M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on
; 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
; Custom settings are not defined
; Miscellaneous
M575 P1 S1 B57600 ; enable support for PanelDue
; Heaters & bed Tuning
; M307 H0 D200 ;
;M307 H1 R4.063 C68.5 D3.79 S0.2 V26.7 ; E0 PID tunining
M307 H1 R3 C4 D2 S0.25 V15;
M307 H0 R0.280 C426.0 D24.18 S1.00 V26.8 B0 ;
M302 S120 R110 ; Allow extrusion starting from 120°C and retractions already from 110°C
My current wifi settings are in config.g
I understand that this is not the way to set the wifi, but with macro.
How do I set the wifi inside a macro so it will automatically be connected to the network on power on?
@jay_s_uk No, it's a custom build 3d printer made a long time ago.
@droftarts Ok, I'll rewire the fans.
@droftarts Is there a smart solution to the wiring on my printer:
I have two fans that their negative is shared.
Is there a way to control the cooling fan somehow, or do I have to re-wire the fan to have an isolated ground?
@droftarts Well, you were right!!
I connected a different fan directly and it worked perfectly.
I guess that the fan minus is touching the ground somewhere.. I'll need to check where.
Thank you!!
@droftarts The fan should be connected directly, but I'll check again to make sure.
@jay_s_uk Doesn't look burnt.
@jay_s_uk Just for fun, where's the mosfet, and are there 3 mosfet (one for each fan)?
@jay_s_uk This is a brand new card, so I doubt if I blow the MOSFET.