Page 2 of 2
Re: M94 M95 to turn spindle brake on and off
Posted: Thu May 01, 2025 8:18 am
by Ken Rychlik
You can change it but you may mess up the correct behavior you have working with it now for normal operation. Do you have a spare output relay? If you do you can just call it output5 or whichever it is in the wizard. Then M65 and M85 would turn it on and off. Wire that relay's output to tie into the brake release.
You could do that with relay 7 but you would have to also change the m3-5 macro's
Your plc idea may work, but if there is a simple reliable solution, I go that way.
Re: M94 M95 to turn spindle brake on and off
Posted: Thu May 01, 2025 4:36 pm
by cnckeith
sounds like you are going down a bunny trail.
there is a Spindle Brake button pre programmed in the VCP buttons folder. I would start there.
1.) add spindle brake release to your Wizard outputs as previously stated. then press 'write settings to cnc control'
2.) then add the pre programmed Spindle Brake button to your VCP Skin.
NOTE: this uses the stock wizard generated PLC program. so if you have edited the PLC program, GO back to the Wizard generated one (don't use custom). other wise your edited plc program ain't gonna work.
and wa la you have a spindle brake release button on the VCP. takes about 3 minutes to add a spindle brake on/off button to the VCP.
you can open the xml file to see the code and that it is associated with it if you are interested. this code links the button to the spindle PLC logic for the spindle and the spindle brake.
<vcp_button>
<skin_event_num>79</skin_event_num>
<plc_output>
<number>1119</number>
<color_on>#EC1C24</color_on>
<color_off>#81151C</color_off>
</plc_output>
</vcp_button>
Re: M94 M95 to turn spindle brake on and off
Posted: Thu May 01, 2025 4:42 pm
by cnckeith
richardb15 wrote: ↑Wed Apr 30, 2025 10:24 pm
cnckeith wrote: ↑Wed Apr 30, 2025 3:28 pm
why not use the Wizard canned spindle brake output? "SpindleBrakeRelease"
I have, its set to out7:
Capture.JPG
But that doesn't tell me how to turn it on and off via an M94/95 command as I mentioned above.
You could read your m3/m5 and see what command it uses or verify. Then create a vcp button linked to a custom macro to make it happen. You could also put a toggle switch on your controller that applied and released the brake without acorn being involved.
I've done that, none of the spindle macros have any reference to spindlebrakerelease or out7 so it must be buried deeper.
All I want to do is write a macro so I can assign a VCP button or use the MDI to turn the out7 on/off manually but until I know the code/command I can't do that. I thought it was a simple question?
there are many pre programmed VCP buttons in the C:\cncm\resources\vcp\Buttons\ folder. all of these are obviously not on the VCP as not everyone needs them. all you do is pick the ones you need and add them to your VCP skin.
the one you want is C:\cncr\resources\vcp\Buttons\spin_brake
Re: M94 M95 to turn spindle brake on and off
Posted: Sun May 04, 2025 9:45 pm
by richardb15
Many thanks for the heads-up that function was available in the VCP, I've upgraded to 5.30 to sort that out, then added the spindle brake button to the VCP, all working fine thanks

I could not find any reference to the VCP having all these additional functions/buttons available in the documentation, I don't know how you'd know to look there unless someone told you.
It's tricky getting into this CNC12 eco-system as I'm finding the information online and in the TB's is hit and miss in terms of being out of date, and TB294 and compiling is an example of that. The TB and youtube video say to do it, forum says no. I hope the centroid team may get chance sometime to remove, archive or at least annotate stuff that does not apply to v5.x