Simple relay control... or not?
-
Tried that, @jay_s_uk, but got the following error:
Error: M3: Requested spindle RPM out of range.
I also tried S0, which didn't produce an error, but didn't operate the relay, either
-
@nightowl999 ok, attempt 2.
Remove theL1
from the M950.
And just send something like M3 S4000 (I know we don't have RPM control) -
Well, that worked @jay_s_uk!
-
@nightowl999 great, so any S value should activate the spindle. So just make sure your gcode has that an you'll be fine.
M5 should then turn it off -
Yep, S1 doesn't work, but S1000 does.
For some reason, and I haven't done anything but add then remove the L1 you suggested earlier, using just M3 works now!
-
OK, so I really don't know what's going on here.
AS per my last post, M3 and M5 activated and deactivated the relay.
Since shutting down and restarting the Duet after lunch, M£ doesn't work again - even combining that with an S1000 or S5000 command.
This is very perplexing!
-
@nightowl999 can you post your full config.g?
Ian
-
Sure can, @droftarts - here you go...
; Configuration file for Duet 3 (firmware version 3.3)
; executed by the firmware on start-up
;
; generated by RepRapFirmware Configuration Tool v3.3.10 on Tue Apr 05 2022 16:17:08 GMT+0100 (British Summer Time); General preferences
M453 ; set machine to CNC mode
G90 ; send absolute coordinates...
M83 ; ...but relative extruder moves
M550 P"Weeble" ; set printer name; Network
M552 P0.0.0.0 S1 ; enable network and acquire dynamic address via DHCP
M586 P0 S1 ; enable HTTP
M586 P1 S0 ; disable FTP
M586 P2 S0 ; disable Telnet; Configure Drives
M569 P0.0 S0 ; physical drive 0.0 goes backwards - X axis
M569 P0.1 S1 ; physical drive 0.1 goes forwards - Y1 axis
M569 P0.2 S1 ; physical drive 0.2 goes forwards - Y2 axis
M569 P0.3 S0 ; physical drive 0.3 goes backwards - Z axis
M584 X0.0 Y0.1:0.2 Z0.3 ; set drive mapping; Configure Motors
M350 X16 Y16 Z16 I1 ; configure microstepping with interpolation
M92 X400 Y400 Z400 ; set steps per mm
M566 X500 Y500 Z500 ; set maximum instantaneous speed changes (mm/min)
M203 X2500 Y2500 Z2500 ; set maximum speeds (mm/min)
M201 X150 Y150 Z150 ; set accelerations (mm/s^2)
M906 X2400 Y2400 Z 2400 ; set motor currents (mA) 80% of maximum (3000mA)
M84 S0 ; Disable motor idle current reduction; Axis Limits
M208 X0 Y0 Z0 S1 ; set axis minima
M208 X535 Y787 Z100 S0 ; set axis maxima
; M208 X0:535 Y0:787 Z0:100 S0 ; set axis minima and maxima; Endstops
M574 X1 S1 P"io8.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin io8.in
M574 Y2 S1 P"io6.in+io3.in" ; configure switch-type (e.g. microswitch) and dual self-squaring high ends on Y1 via pin io6.in and on Y2 via pin io3.in
M574 Z2 S1 P"io2.in" ; configure switch-type (e.g. microswitch) endstop for high end on Z via pin io2.in; 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
; Fans
; Makita and relay configuration
M950 R0 C"out1+out8" ; enable router relay on out8
M563 P0 S"Makita" R0 ; assign spindle 0 to tool 0 and name it Makita
T0 ; select tool 0; AMB spindle configuration
; M950 R0 C"xxx" L0:25000 Q1000 ; create spindle with index 0
; M563 P1 S"Spindle 1" R0 ; create tool 1 with spindle 0 and name it "Spindle 1"
; M453 ; set machine to CNC mode
; T1 ; select tool 1
; M3 S0
; M5 ; stop spindle; Custom settings are not defined
; Miscellaneous
M564 S1 H1 ; Disable jog commands when not homed
; M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss -
-
-
-
-
-
I've got a bit of an update on this, but I'm not sure if it's me, the firmware of the machine...
When I first start DWC up and send the "M3" command, this shows green in the Console, but the relay doesn't operate. However, if I send "M3 S5000" this also shows green and the relay does operates. Thereafter, entering just "M3" operates the relay. M5 deactivates the relay.
It sounds like I should be adding an M3 S5000 line somewhere in the config.g file, but wouldn't this operate the relay and, ultimately, the router? I suppose I could follow that with an "M5" line, but it doesn't sound good practice to me!Thanks
-
@nightowl999 From the M3 page:
M3 can be called without any parameters and will start the spindle of the current tool turning clockwise at the spindle RPM of that tool.
So I guess you should define a spindle speed for your tool using M568, then select the tool and then do M3 and it should start up.
Give it a try and let us know.