Page 1 of 2

SPIN BRAKE to vacuum ON/OFF

Posted: Wed Feb 05, 2020 9:10 am
by Martin Zarnay
Gey guys , i have another question as im not using Spindle break, and i think not many ppl are using that.
How can i change this Spinbreak to Vacume on off, On virtualjogpanel ??

And is there any Keyboard Shortcut to control that ?

Re: SPIN BRAKE to vacuum ON/OFF

Posted: Wed Feb 05, 2020 10:25 am
by martyscncgarage
Martin Zarnay wrote: Wed Feb 05, 2020 9:10 am Gey guys , i have another question as im not using Spindle break, and i think not many ppl are using that.
How can i change this Spinbreak to Vacume on off, On virtualjogpanel ??

And is there any Keyboard Shortcut to control that ?
You can create a Macro to turn on an output. You need to choose what M code you want to use. You can then program one of AUX keys on the VCP or the wireless MPG.

I did a Phoenix 4x4 router a while back, I used M35 to turn it on and M36 to turn it off. I used Output 4

In the M36 Macro, there is a delay of 3 seconds. This clears the hose after the router motor is turned off.
See the G4 P3 line in the Macro:

;SET DustCollectionOn = M35, RST DustCollectionOn = M36
;mfunc36.mac
G4 P3
IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 100 ;Skip macro if graphing or searching

M95 /35 ;Request to RST DustCollectionOn

N100

Re: SPIN BRAKE to vacuum ON/OFF

Posted: Wed Feb 05, 2020 3:55 pm
by Martin Zarnay
Yes you right, I should do that with different button than this one. Ans start writing macro :D

Re: SPIN BRAKE to vacuum ON/OFF

Posted: Thu Feb 06, 2020 10:37 am
by martyscncgarage
Here is the M35 Macro. I have not tested with 4.20.1

;SET DustCollectionOn = M35, RST DustCollectionOn = M36
;mfunc35.mac

IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 100 ;Skip macro if graphing or searching

M94 /35 ;Request to SET DustCollectionOn

N100

Re: SPIN BRAKE to vacuum ON/OFF

Posted: Wed Nov 24, 2021 2:24 am
by fma1955
Hello Marty,
I have had virtually no experience with macros. I want to use buttons 1 & 2 on my MPG to turn the Dust extractor & Vacuum table on. Will this code work (as is) by placing it in the code of one of the buttons? If not do you know if anyone has written the macro to do such for the MPG. Thank you for any help in advance.

Re: SPIN BRAKE to vacuum ON/OFF

Posted: Wed Nov 24, 2021 11:07 am
by Gary Campbell
Here is some sample code I use to toggle an output: (change the "2" to your preferred output number) This allows the same macro button to turn an output on or off, depending on its existing state

IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

N100
IF #60002 THEN GOTO 300 ; the "2" in #60002 is output #2

N200
M62 ;the "2" in 62 is output 2
GOTO 1000

N300
M82 ;the "2" in 82 is output 2

N1000 ; end

Re: SPIN BRAKE to vacuum ON/OFF

Posted: Thu Nov 25, 2021 1:37 am
by fma1955
Thank you very much Gary,
Is that code right for the WirelessMPG which I forgot to say I have?
Gary Campbell wrote: Wed Nov 24, 2021 11:07 am Here is some sample code I use to toggle an output: (change the "2" to your preferred output number) This allows the same macro button to turn an output on or off, depending on its existing state

IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

N100
IF #60002 THEN GOTO 300 ; the "2" in #60002 is output #2

N200
M62 ;the "2" in 62 is output 2
GOTO 1000

N300
M82 ;the "2" in 82 is output 2

N1000 ; end

Re: SPIN BRAKE to vacuum ON/OFF

Posted: Thu Nov 25, 2021 2:48 am
by fma1955
I don't know if it is different but using the code on my WirelessMPG will turn the light on ports 2,3 & 4 by changing the number you indicated. Ports 5 & 6 are the ports that have my Dust ext. & Vacuum on. When I change the numbers to 5 & 6 nothing happens.
Thank you for your help.

Gary Campbell wrote: Wed Nov 24, 2021 11:07 am Here is some sample code I use to toggle an output: (change the "2" to your preferred output number) This allows the same macro button to turn an output on or off, depending on its existing state

IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

N100
IF #60002 THEN GOTO 300 ; the "2" in #60002 is output #2

N200
M62 ;the "2" in 62 is output 2
GOTO 1000

N300
M82 ;the "2" in 82 is output 2

N1000 ; end

Re: SPIN BRAKE to vacuum ON/OFF

Posted: Thu Nov 25, 2021 11:28 am
by Gary Campbell
When I change the numbers to 5 & 6 nothing happens
Are the outputs configured to "OUTPUT5" and "OUTPUT6" or something other than that? My code works for an output configured as the generic "number", Marty's works for one configured as an internal function

Re: SPIN BRAKE to vacuum ON/OFF

Posted: Fri Nov 26, 2021 1:13 am
by fma1955
Yes they are Gary in (Output definitions) but I don't know how to change them. Clicking on them or double clicking does nothing.
Thank you
Gary Campbell wrote: Thu Nov 25, 2021 11:28 am
When I change the numbers to 5 & 6 nothing happens
Are the outputs configured to "OUTPUT5" and "OUTPUT6" or something other than that? My code works for an output configured as the generic "number", Marty's works for one configured as an internal function