Physical Buttons on Duet 3 MB6HC RRF 3.01+
-
Hi,
I've installed 4 physical buttons on my front panel and I can't seem to find how to program them to register;
This guide while very helpful seems obsolete due to the E component removed from the 3.01+ gcode
Here is my Config file I wrote based on the guide before I found out about the change in gcode, which doesn't seem to work
; External Triggers M581 T1 E"io1.in" S1 R2 ; Green button trigger 1 only when not printing (Load filament) M581 T2 E"io1.in" S1 R1 ; Green button trigger 2 only when printing (Lower Z) M581 T3 E"io4.in" S1 R2 ; Red button trigger 3 only when not printing (Unload filament) M581 T4 E"io4.in" S1 R1 ; Red button trigger 4 only when printing (Raise Z) M581 T5 E"io2.in" S1 R2 ; Black button trigger 5 only when not printing (Resume) M581 T6 E"io2.in" S1 R1 ; Black button trigger 6 only when printing (Pause, Stop) M581 T7 E"io5.in" S1 R2 ; Blue button trigger 7 only when not printing (LED strip on/off) M581 T8 E"io5.in" S1 R1 ; Blue button trigger 8 only when printing (LED strip on/off)
How are physical button external triggers supposed to be configured in the current RRF version?
I couldn't quite find a matching example in the M950 part
Thanks!
-
@fractalengineer use M950 commands with J parameter to configure those pins as general purpose input ports. Then you can use M581 commands to refer to those input ports.
-
Hi,
I tried to make a button connected to the GPIO port (io5.in) in my Duer 3 v.1.01, that, when pressed the botton, starts a macro. Unfortunately it still doesn't work.I tried to do this:
wiring:
config.g:
M950 J5 C"io5.in" ; Trigger n°5 on io5.in
M581 T5 S1 R0 ; T5=Trigger logico 5, S1=trigger occurs on an inactive-to-active, R0=whether to trigger at any timeMacro: ( Any trigger number # greater than 1 causes the macro file sys/trigger#.g )
sys/trigger5.g
for example
M106 P3 C"LUCE LED" S0 ;TURN OFF LED
I need advice to try.
-
@gianluca in your M581 command you need to add parameter P5 to tell it to monitor the GpIn 5 port that you created in the M950 command. See the M581 documentation.
-
@dc42 Does this apply to the Duet2 boards running RRF3.3 too? I am also building a control panel for my Ooznest Workbee and was just about to use the guide to configure the buttons.
-
-
-
@t3p3tony
Thank you,
the important thing is that the wiring is correct (switch between GND and io5.in).
The measurement of 3.3v is certain, I hope I have used a wrong scale of the multimeter for the measurement of the amperes.
Tonight I make other tests and redo the the measurements with the multimeter. -
Ok I've got it mostly configured now.
I'm trying to have the buttons functions setup now
Starting with the LED strip, I'd like the blue button to switch the light on/off: currently wired on a fan output.
I came up with this based on the object model plugin and gcode meta pdf but it doesn't seem to work
Any tips on fixing it?
; /sys/trigger8.g ; Blue Button only when printing ; 24V LED ON/OFF if fans[3].actualValue < 0 set fans[3].actualValue = 1 else set fans[3].actualValue = 0
Thanks!
-
@fractalengineer said in Physical Buttons on Duet 3 MB6HC RRF 3.01+:
if fans[3].actualValue < 0
Try replacing 0 by 0.5.
-
@dc42 thank you, that makes sense, however that still didn't do it; I get this error message:
4/21/2022, 2:36:28 AM Error: expected '=' in line 6 of trigger8.g
edit: Actually interesting,
I get the error message on line 6 when the fan is on 0
And line 8 when on 1I also tried using the requestedvalue objectmodel with the same result
-
@fractalengineer you can only use the 'set' command to set your own global and local variables. Use M106 commands to change the fan speed.