Enable driver pin/interrupt fro pid controller
-
hi,
im using duet 3 main board (6hc) + duet 3 expansion board for a while,
the setup is a Cartesian printer with multiple tools.
firmware version: RC-12 _3.1.1.1
web cotrol: version 3.1.1also using duet wi fi with similar pretty much config file.
here is my config file:
; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"HH2" ; set printer name ; Network M552 p192.168.200.9 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 S0 ; physical drive 0 goes forwards M569 P1 S1 ; physical drive 1 goes forwards M569 P2 S0 ; physical drive 2 goes forwards M569 P3 S1 ; physical drive 3 goes forwards M569 P4 S0 ; physical drive 4 goes forwards M569 P5 S0 ; physical drive 5 goes forwards M569 P1.0 S1 R1 D2 ; Drive E0 M569 P1.1 S1 R1 D2 ; E1 printhead M569 P1.2 S1 R1 D2 ; E2 printhead M569 P2.0 S1 R1 D3 ; E2 printhead M569 P2.1 S1 R1 D3 ; E2 printhead M584 X0 U1 Y2:3 Z4:5 E1.0:1.1:1.2:2.0:2.1:2.2 ; set drive mapping M350 X16 U16 Y16:16 Z16:16 E4:4:4:4:4:4 I1 ; Configure microstepping with interpolation ; M92 X100 U100 Y80.00 Z462.5 E80:80:75:75:80:100 ; set steps per mm M566 X700 Y1500 Z250 U700 E800:800:800:800:800:800 ; set maximum instantaneous speed changes (mm/min) M203 X15000 U15000 Y15000 Z2000 E10000:10000:20000:15000:15000:15000 ; set maximum speeds (mm/min) M201 X3000 U3000 Y2000 Z300 E500:500:500:500:2000:500 ; set accelerations (mm/s^2) M906 X2000 U2000 Y1500 I10 ; set motor currents (mA) and motor idle factor in per cent M906 E2100:2100:1400:1400:4000:1400 I10 M906 Z2100 I50 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 U0 Y0 Z0 S1 ; set axis minima M208 X550 U550 Y450 Z2000 S0 ; set axis maxima M564 S1 H0 ; Allow axis move without home and outside boundries M206 X-50 Y0 U-50 ;offset axes ; Endstops M574 X1 S1 P"io0.in" ; configure for low end, active-low endstop on X via pin io1.in M574 Y1 S1 P"io1.in" ; configure for high end, active-low endstop on Y via pin io2.in M574 U1 S1 P"io2.in" ; configure for high end, active-low endstop on Y via pin io2.in ; Heaters M140 H-1 ; disable heated bed (overrides default heater mapping) ; Fans ; Tools M563 P0 X0 D4:5 S"F0" ;Define tool 0 M567 P0 E0.5:1 ;MIXING RATIO tool 0 M563 P1 X0 D4:5 S"F1" ;Define tool 1 M567 P1 E1:1.7 ;MIXING RATIO tool 1 M563 P2 X0 D3 S"F2" ;Define tool M563 P3 D1:4 S"F3" ;Define tool M567 P3 E0.5:1.5 ;MIXING RATIO tool 1 M563 P4 X0 D5 S"F4" ;Define tool G10 P0 X-138.0 Y100.0 Z0.0 ;Set tool 0 axis offsets G10 P1 X-144.0 Y0.0 Z0.0 ;Set tool 1 axis offsets G10 P2 X0.0 Y0.0 Z0.0 ;Set tool 1 axis offsets ; Custom settings are not defined
lately, i want to use external PID controller which use a sensor to enable/block the motor operation.
the PID controller works that it close the loop between 2 terminals.
when i use external driver is no problem cause the PID close the loop for the enable pin or close the loop for the "pulse" input.
how can i implement this PID controller to the TMC driver on the DUET board?
can i approach the enable pin/ "pulse" signal for the TMC driver on board?
maybe using an interrupt with the GPIO somehow?*what is the best way to do this in your opinion? *
appreciate any help,
-
@moo16 said in Enable driver pin/interrupt fro pid controller:
can i approach the enable pin/ "pulse" signal for the TMC driver on board?
all the drivers share the enable signal, but if you can find a place to get to it (look for TP23) and not too worried about warranties, go for it.
other option would be to use any input and use a trigger and see if
M18
orM84
toggles the enable signal or otherewise achieves what you want.it might help to elaborate a little on what the duet is doing while the external PID controller wants to enabl/disable motors, as I think having a hardwired and shared enable pin for all the drivers might be an issue? Using a trigger like mentioned above should let you have one drive coasting - but i aslo think any g-code that uses that axis will fault because its not homed?
-
@moo16 said in Enable driver pin/interrupt fro pid controller:
firmware version: RC-12 _3.1.1.1
RC12? or 3.1.1 final? Should update if not.
-
@Phaedrux
i will update today to the latest