Page 2 of 2

Re: Wizard Assigning Random Output Numbers <answered>

Posted: Tue May 13, 2025 7:09 am
by tblough
You could always add logic to the PLC along the lines of: if spindle is off and speed < 200rpm then engage mechanical brake.

Re: Wizard Assigning Random Output Numbers <answered>

Posted: Tue May 13, 2025 7:46 am
by ShawnM
Or, could you not just simply add a 2-3 second delay in your M5 before the mechanical brake is engaged. Then you could also manually activate it with the VCP button when needed for tool changes. Unless I’m missing something here, which I often do. :D

Re: Wizard Assigning Random Output Numbers <answered>

Posted: Tue May 13, 2025 8:11 am
by richardb15
I've been warned not to meddle with the PLC source code outside the Wizard!

My M5 couldn't be more simple, just two lines:
M95 /1/2/19
G4P.01


The M95 relates to the following in the plc source code:
M3 IS SV_M94_M95_1 ;(Spindle CW)
M4 IS SV_M94_M95_2 ;(Spindle CCW)
M19 IS SV_M94_M95_19;(Spindle Orient), M20 Off

Not so simple to just add in a time delay to stop the brake engaging, as the logic is buried deep into the source code for it. It makes an appearance in the source code around lines 3930 and 5850 but I can't fathom what causes it to turn OUT7 off (brake on, its power to release) and how to add a delay into that. Report attached if anyone has ideas?

Re: Wizard Assigning Random Output Numbers <answered>

Posted: Tue May 13, 2025 10:06 am
by Ken Rychlik
I am more simple minded. I manually make my macro's do what I want, and when I want. If you leave an output on 1-8 as output5 in the wizard for instance. Then M65 turns on and M85 turns off. I use those M commands in my macros. Add the delays where I need them and don't have any issues. There are more elegant ways to get it done obviously, but simple things I can understand always suit me.

Re: Wizard Assigning Random Output Numbers <answered>

Posted: Tue May 13, 2025 10:12 am
by Allin1Chris
richardb15 wrote: Tue May 13, 2025 1:38 am I have an electromechanical brake on the spindle motor, and an electrical resistive one via the VFD, but the VFD one doesn't really do anything as the mechanical one engages and stops the spindle so quick. I'd like to just use the VFD one for the first 2-3 seconds after an M3 command, then have the electro-mech one engage to keep the spindle still for changing ER collets etc but I don't think there is that functionality in the CNC12/Acorn6 to have a brake engage delay. Right now I'm just using the spindlebrake VCP button and drive the mechanical one off all the time xcept when I'm changing collets etc.
Would Commanding an S0 in your M5 macro work for this? Then perform a G4 P3 then do the standard M5 stuff (M95 /1/2) which will engage the brake at that time.

Though a PLC solution is perfectly viable as well.

Re: Wizard Assigning Random Output Numbers <answered>

Posted: Tue May 13, 2025 10:54 am
by ShawnM
That's what I suggested Chris, very easy to do and no PLC edits. And his VCP button would still function for manual engagement when needed.

Re: Wizard Assigning Random Output Numbers <answered>

Posted: Wed May 14, 2025 1:58 am
by richardb15
Thanks everyone for the thoughts and input, I'll give this a go next time I've got a bit of free time to play around with macros.