button Tigger files
-
I have a few buttons attached to my Duet2wifi
and I have a simple macro with a global variable to track weather filament is loaded or not
I recently upgraded from 3.4.2 to 3.4.4 and I noticed a change in behavior
my trigger3.g file
;load unload trigger macro if global.filamentload = 1 M98 P/macros/unloadfilament.g M99 elif global.filamentload = 0 M98 P/macros/loadfilament.g M99
before the upgrade this worked fine now it will load the filament and then right after it will unload the filament
I have 2 theories one is I am getting bounce on the button or the way M99 or trigger files work has changed slightly
here is my button config just in case
; Buttons M950 J1 C"!^e1stop" ; Input 1 uses e1Stop pin, inverted, pullup enabled (yellow) M950 J2 C"!^e0stop" ; Input 2 uses e0Stop pin, inverted, pullup enabled (white) M950 J3 C"!duex.e2stop" ; Input 3 uses panel due pin, inverted, pullup enabled (blue) M950 J4 C"!duex.e3stop" ; Input 4 uses panel due pin, inverted, pullup enabled (black) M950 J5 C"!duex.e4stop" ; Input 5 uses panel due pin, inverted, pullup enabled (green) M950 J6 C"!duex.e5stop" ; Input 6 uses panel due pin, inverted, pullup enabled (red) M581 T2 P1 S1 R2 ; power on and off button (yellow) M581 T3 P2 S1 R2 ; load unload filament while printer is not running (white) M581 T4 P3 S1 R0 ; pause / resume while print is running (blue) M581 T5 P4 S1 R2 ; lower bed 50mm (black) while the printer is not running (black not printing) M581 T6 P4 S1 R1 ; lower bed 50mm (black) while print is paused (black while printing) M581 T0 P6 S1 R0 ; estop (red)
I am going to relocate everything from the trigger3 to a separate Macro as it is recommended the trigger files be one line and see if that helps
if we had a "R" option for while print is paused that would be awesome would save some extra coding
anyways thanks
-
I read this because I wanted to know what Winnie-Pooh files are
-
@broncosis said in button Tigger files:
am going to relocate everything from the trigger3 to a separate Macro as it is recommended the trigger files be one line and see if that helps
Where did you read that? It's only the power fail command string that has to be on one line.
If the problem is bounce, that can normally be avoided by including a G4 delay command of e.g. 1 second at the end of the trigger macro, or in your case before each M99 command because it won't reach the end.
-
@dc42
well thats entirely possible I read that and misunderstood it or because I have read a ton
lately I am just getting things confusedthanks for clearing it up
I have a bunch more print to get done in the next while so I will keep testing and let you know
I am leaning more to it being bounce and the board is queuing multiple pressessome times it will power on then power off or vise versa when I tap my power button too
this is my trigger2.g file I use for power control
;powerbutton trigger macro if state.atxPower == true ;if on turn off M104 S0 M140 S0 M81 elif state.atxPower == false ;else if off turn on M80 G4 s1
thanks Again for the reply
-
@o_lampe LOL well I guess I caught a hefalump
-
ok after a few tries I noticed that it seems to be a bounce I can't see what that board is Queuing but the power macro runs fast enough that I can see the results pretty easy and a quick push
would lead to power on then off where a push and brief hold would result in the expected behaviorI added a 0.1uf cap to each of my 6 buttons I have and it seems to reduced this effect to the point where I can not reproduce it. so here's hoping that is all it was
thanks again @dc42 its amazing the amount of time and support you put in
here