SOLVED Firmware "wish" - ref the "C" parameter in M581
-
Long story short but I'm in the process of making a simple joystick switch style pendant to move my XYUVAB machine around. The rationale being that the buttons on DWC only control individual axes and I have a need to move X,U and A concurrently together, and Y, V and B together. I plan to accomplish this by connecting the 4 individual joystick switches to spare IO connectors and using M581 to run macros which will move the axes concurrently as desired.
One potential problem is that the joystick could inadvertently get moved while a print is in progress and the resultant trigger would then cause the print head to move. I can do a hardware a "hardware fix" by fitting a cover or some such over the joystick to prevent accidental activation.
But a more elegant solution would be to expand the use of the "C" parameter in M581. Currently the options are 0 = anytime or 1 = only during a print. So expanding that to include 2 = at anytime except during a print would be good.
-
Sounds like a good option.
In the mean time you could put the following at the beginning of each of your macros.
if job.file.fileName!=null echo "Print loaded. macro cancelled" M99; return from macro
-
I would add this check on top of every macro even if C is expanded to 2 = "when not in print"
-
@OwenD said in Firmware "wish" - ref the "C" parameter in M581:
Sounds like a good option.
In the mean time you could put the following at the beginning of each of your macros.
if job.file.fileName!=null echo "Print loaded. macro cancelled" M99; return from macro
That's brilliant! - Thanks.
(It'll also negate the need for me to make a mechanical cover, and is one of those rare occasions where I consider a "software" solution to be better than a mechanical one ).
-
@deckingman, see the release notes for firmware 3.2beta1 at https://github.com/Duet3D/RepRapFirmware/blob/v3-dev/WHATS_NEW_RRF3.md.
-
@dc42 said in Firmware "wish" - ref the "C" parameter in M581:
@deckingman, see the release notes for firmware 3.2beta1 at https://github.com/Duet3D/RepRapFirmware/blob/v3-dev/WHATS_NEW_RRF3.md.
Well I'll be damned!
M581 trigger condition parameter now supports a new value R2 which means trigger only if not printing from SD card.
Looks like you beat me to it. Out of curiosity, why "R2" and not "C2" and do/will C0 and C1 still work as before?
-
@deckingman said in Firmware "wish" - ref the "C" parameter in M581:
@dc42 said in Firmware "wish" - ref the "C" parameter in M581:
@deckingman, see the release notes for firmware 3.2beta1 at https://github.com/Duet3D/RepRapFirmware/blob/v3-dev/WHATS_NEW_RRF3.md.
Well I'll be damned!
M581 trigger condition parameter now supports a new value R2 which means trigger only if not printing from SD card.
Looks like you beat me to it. Out of curiosity, why "R2" and not "C2" and do/will C0 and C1 still work as before?
Because M581 also allows triggering on endstop switches, so the C parameter refers to the endstop switch for the C axis. C0 and C1 no longer work as before.
-
@dc42 said in Firmware "wish" - ref the "C" parameter in M581:
@deckingman said in Firmware "wish" - ref the "C" parameter in M581:
@dc42 said in Firmware "wish" - ref the "C" parameter in M581:
@deckingman, see the release notes for firmware 3.2beta1 at https://github.com/Duet3D/RepRapFirmware/blob/v3-dev/WHATS_NEW_RRF3.md.
Well I'll be damned!
M581 trigger condition parameter now supports a new value R2 which means trigger only if not printing from SD card.
Looks like you beat me to it. Out of curiosity, why "R2" and not "C2" and do/will C0 and C1 still work as before?
Because M581 also allows triggering on endstop switches, so the C parameter refers to the endstop switch for the C axis. C0 and C1 no longer work as before.
Apologies - I completely forgot that "C" had been change to "R" in 3.1. Just checked my config.g and I have indeed made those changes so I must have known about it earlier.