Hello Guest it is March 28, 2024, 04:21:07 AM

Author Topic: Lathe spindle brake  (Read 16892 times)

0 Members and 1 Guest are viewing this topic.

Lathe spindle brake
« on: June 27, 2009, 04:03:35 PM »
Hi ll,
I am upgrading a Colchested CNC Lathe to Mach.
The sindle has a magnetic brake and I am wondering how I synchronise the brake with the M3.
i.e i would like the brake to be realease and the after a short time delay, give the M3.
on stop, I would like to send the M5 and after a time (say 0.5 sec) switch on the brake.

any pointers would be appreciated .

ATB

Derek
You can "chop it off" but can't "chop it on"

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Lathe spindle brake
« Reply #1 on: June 27, 2009, 04:09:12 PM »
Write custom macros for M3, M4 and M5 and use an output for the brake.
M3 would go something like this


ActivateSignal(OutPut2)
Sleep(500)
DoSpinCW()


Hood
Re: Lathe spindle brake
« Reply #2 on: June 28, 2009, 05:03:31 AM »
Hi Hood,

Thanks for the reply, I have not looked at macros before, so I'm starting right from scratch.....
I imaging my application is a nice easy introduction to macros......now where is my manual.
I'll give it a go, I always find this the best way to learn.
Thanks

Derek
You can "chop it off" but can't "chop it on"

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Lathe spindle brake
« Reply #3 on: June 28, 2009, 05:11:17 AM »
One important thing to remember is that the macros you want to change are the ones within the folder of the profile you use. What I mean is there is a C:\Mach3\Macros folder and that will have a load of macros in it but there will also be folders there which are the macro folders for the different profiles. So for instance if you are using the standard Lathe profile then it will be C:\Mach3\Macros\Mach3Turn that you want to  change the macros.
 Another thing though is if you are going to change macros then it is best to set up a custom profile, that way when you update Mach revisions the custom macros will not be overwritten by standard ones.
Hood
Re: Lathe spindle brake
« Reply #4 on: August 17, 2009, 04:12:39 PM »
Hi
Hood,

I have edited the M3 and M5 macros to:-


ActivateSignal(9)
Sleep(100)
DoSpinCW()

DoSpinStop()
Sleep(100)
DeActivateSignal(9)

The macros work but do not control the brake output.
I see the delays working.

(I have mapped pin 9 to output 9 in ports and pins)
If I toggle the active hi/low, this confirms that the brake is working electrically, but appears the macro does not.

Prob something I have missunderstood.
Any help would be appreciated, I 've been faffing for about 3 hrs now and admit defeat ;D

ATB
Derek

You can "chop it off" but can't "chop it on"

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Lathe spindle brake
« Reply #5 on: August 17, 2009, 04:28:39 PM »
You missed out the OutPut, try this,

ActivateSignal(OutPut9)
Sleep(100)
DoSpinCW()

DoSpinStop()
Sleep(100)
DeActivateSignal(OutPut9)

Hood
Re: Lathe spindle brake
« Reply #6 on: August 17, 2009, 05:09:57 PM »
Thanks Hood,

I'll give that a try tomorrow.

ATB
Derek
You can "chop it off" but can't "chop it on"
Re: Lathe spindle brake
« Reply #7 on: August 19, 2009, 02:59:59 PM »
Hi Hood,

I have tried this and still no joy. ???

I have noticed that if I type M3 into the MDI the macro performs the correct delay but if I click the spindle start icon the delay is ignored.
Either method does not control the OP of the brake.

The brake OP does work if I toggle the ports and pins "active hi active low" selection.
Strange.

Regards
Derek.
You can "chop it off" but can't "chop it on"

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Lathe spindle brake
« Reply #8 on: August 19, 2009, 03:45:16 PM »
Ok if you open the macro in the editor and press the green arrow does it work?
 If yes then check you have it in the correct folder, it needs to be in the macro folder for the profile you are using so if Mach3Turn profile it would be C:\Mach3\Macros\Mach3Turn

Hood
Re: Lathe spindle brake
« Reply #9 on: August 19, 2009, 04:45:30 PM »
You did not mention what kind of spindle motor/controller it is?
Did it previously brake to a stop, or was it just a holding brake?
If it was a holding brake, there must have been some method or signal to indicate zero speed?
Nosmo.