Page 1 of 1

Spindel warm up macro and Plc

Posted: Wed Mar 06, 2024 1:46 am
by Houseman303
I had Marc (cncnsw) write me an automatic spindle warm up plc. It's customizable and I no longer have to remember to warm up the spindle bearings. It is executed for the first time immediately after homing and is valid for 15 minutes on my machine before the spindle needs to be warmed up again. Hopefully the ceramic bearings will thank me for a long time. If you are interested, contact Marc directly.

8-)

Re: Spindel warm up macro and Plc

Posted: Wed Mar 06, 2024 3:11 pm
by cnckeith
Right on. Marc is a Centroid CNC Control Guru!

fyi..you may be interested to know that centroid supplies a "factory" spindle warm up macro mfunc77.mac (and many other helpful macros) along with the Acorn and AcornSix CNC12 installations. the spindle warm up macro provided is following the warm up instructions provided by Spindle Depot for their fantastic FM30 spindle but, you can easily modify the macro to suit/match any other spindle warm up requirements just by changing a few numbers or lines. If you are using the VCP you can easily copy the VCP button folder with the image and the xml file that makes the button work into your oak/allin1dc/hickory VCP and use this macro.
spindle warm.png

here is the macro

;------------------------------------------------------------------------------
; Filename: mfunc77.mac
; SPINDLE WARM-UP for CNC Depot FM30 12,000 rpm spindle,
; Description: Centroid Provided Example Spindle Warm up cycle. User edits to thier requirements.
; Notes: Spindle Cooling Fan delay timer set to 120 seconds (setting is in the Wizard menu for Spindle setup)
; Requires:
; For tips on writing custom macros.
; https://www.centroidcnc.com/centroid_di ... amming.pdf
;------------------------------------------------------------------------------

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

N100 ;Insert your code between N100 and N1000

M201 "#)**REMOVE THE TOOL FROM THE SPINDLE**\nThen Press Cycle Start TO CONTINUE"

;G53 Z0 ; optional move Z to Z home

;G53 X12 Y2 ; optional move X and Y to a machine coordinate position

M3 S3000 ; Turn on Spindle at 25% of MAX RPM (.25x12,000)
G4 P180 ; Run for 3 minutes
M5 ; Turn off Spindle
G4 P60 ; Heat Soak for 1 minute
M3 S6000 ; Turn on Spindle at 50% of MAX RPM (.5x12,000)
G4 P240 ; Run for 4 minutes
M5 ; Turn off Spindle
G4 P60 ; Heat soak for 1 minute
M30 S9000 ; Turn on Spindle at 75=% of MAX RPM (.75x12,000)
G4 P240 ; Run for 4 minutes
M5 ; Turn off Spindle
G4 P60 ; Heat soak for 1 minute

N1000 ;End of Macro


related docs.
introduction to macros v https://www.centroidcnc.com/centroid_di ... amming.pdf
VCP editing https://www.centroidcnc.com/centroid_di ... manual.pdf

Re: Spindel warm up macro and Plc

Posted: Wed Mar 06, 2024 5:14 pm
by Houseman303
Marc makes the difference, Spindle warm up is carried out automatically, you don't have to remember to press a button.

Re: Spindel warm up macro and Plc

Posted: Wed Mar 06, 2024 8:45 pm
by ShawnM
I added some code to my homing macro so when it's finished homing at startup it then asks me if I want to run the spindle warm up procedure, a simple "yes" or "no" answer by the operator and it either does or doesn't run the spindle warm up macro. No PLC changes needed.

Re: Spindel warm up macro and Plc

Posted: Thu Mar 07, 2024 12:14 am
by Houseman303
I could have easily done it, but I wanted an automatic process. If the machine stands still for a longer period of time (can be freely defined), the spindle needs to be warmed up again. So I don't have to think about doing it. If the spindle is in regular operation through a program, the time until another spindle warm-up is required is extended.

Re: Spindel warm up macro and Plc

Posted: Thu Mar 07, 2024 2:33 pm
by cnckeith
ShawnM wrote: Wed Mar 06, 2024 8:45 pm I added some code to my homing macro so when it's finished homing at startup it then asks me if I want to run the spindle warm up procedure, a simple "yes" or "no" answer by the operator and it either does or doesn't run the spindle warm up macro. No PLC changes needed.
yeah that's a nice way to do it