by spumco » Tue Apr 07, 2020 5:01 am
I think so. I've never written a macro, but reading the documentation here's how - given my inexperience - I think it could be done:
Create 4 buttons and stick them on your screen, each with the rapid % you want. Make the buttons blink, or light up depending on which one is active.
Create a macro for each button (this can probably be done in one macro, but I'm afraid I don't know how to do that)
(Simple method)
You calculate in advance the velocity you want for the axes and the macro uses the 'setfield' to write that value in the axis velocity fields. The 100% button has your current rapid setting.
(More complicated method, but isn't dependent on you remembering to change the desired speeds if you change your default rapids)
1. Macro reads the current field value for all the axes velocity (i.e. field #9 for X)
2. Macro writes that value to a user variable number
3. Macro calculates desired rapid speed based on user variable above
4. Macro writes new value to axis velocity using 'setfield'
5. 100% button/macro returns to original setting by writing the variable in #2 above.
Optional - the Constructor or Destructor macro is edited to call the 100% macro so you return back to normal speed when UCCNC starts up.
I'm sure I'm missing something, but I think that's the basic outline. Hopefully someone will come along and offer some more concrete examples or suggestions - this sounds like a useful feature.