Hello Guest it is May 24, 2019, 06:06:46 PM

Author Topic: Spindle Warm Up program help  (Read 7838 times)

0 Members and 1 Guest are viewing this topic.

Spindle Warm Up program help
« on: December 26, 2008, 03:47:57 PM »
I'm not a GCode guy, but I can see now how I could use some basic knowledge.  Because I need to write a simple GCode program that turns on my spindle, runs it at a particular RPM for a set amount of time, and then changes that RPM and runs for that same amount of time.  Basically, I'm wanting a simple program to warm up my water cooled spindle for say 12 minutes. 

I'd like to run the spindle at about 6000 rpm for 4 minutes, then run at 12,000 rpm for another 4 minutes, and finally at 18000 rpm for a final 4 minutes.  Then I'd like it to shut off.  Maybe it would also be good to have it go to a particular safe position before I start this warmup.   

My problem is that I'm so used to running ALL my programs thru my CadCam software that I NEVER write any GCode.  I'd like to start learning some basics, and this seems like a good place to start.

Can someone here get me going in the right direction, or write a simple program and maybe explain some of it? 

Thanks so much! 

Wayne from White Salmon
Re: Spindle Warm Up program help
« Reply #1 on: December 26, 2008, 03:59:04 PM »
Hi Wayne,
 I'll take a shot.
G0 Z**
X** Y**
M3   
S6000
G4 P4  (minutes)
S12,000
G4 P4
S18,000
G4 P4
M5
M30

Offline Hood

*
  •  25,817 25,817
  • Carnoustie, Scotland
    • View Profile
Re: Spindle Warm Up program help
« Reply #2 on: December 26, 2008, 04:49:24 PM »
G0 Z** (Where ** is the Z position you want)
G0 X** Y** (Where X** and Y** are the positions you want x and Y to move to)
M3 S6000   (Spindle clockwise 12,000rpm)
G4P240      (pause for 240 seconds, making sure you dont have milli seconds chosen in general config for G4)
M3 S12000
G4P240
M3 S18000
G4P240
M5          (stop spindle)
M30
%

Edit, see RC posted before me, I typed out this reply a while ago but forgot to send before I disapeared for a while LOL. G4 can be in seconds or mili seconds but as far as I know not minutes.
Hood
« Last Edit: December 26, 2008, 04:54:31 PM by Hood »
Re: Spindle Warm Up program help
« Reply #3 on: December 26, 2008, 05:03:39 PM »
Thanks for saving me there Hood.  ;)
I got crossed up on the min/sec  but knew not to use ms ::)
I'm happy I got it as close as I did, :D
RC 8)

Offline Hood

*
  •  25,817 25,817
  • Carnoustie, Scotland
    • View Profile
Re: Spindle Warm Up program help
« Reply #4 on: December 26, 2008, 05:14:07 PM »
No probs RC :)
Worth noting is the difference in the way RC and myself have done basically the same thing but mine has a lot more in it. For example my second line has a G0 in it and as you see RC's doesnt. The second G0 is not needed as the previous line has set it to that but for a beginner it is often best to write things out longhand as its easier to follow when reading through. Same goes for the M3 (which means turn spindle clockwise) once the spindle is moving then a change of speed doesnt need the M3 but again it is often easier to follow code if its there as it is always a chance you had a M4 (anti clock) way back in your code and you have forgotten. Lastly you will see after the M30 I have a % sign, this does nothing except lets you know by looking that you have finished the line that the M30 was on by pressing the return key, if you pressed the return key then it would still run fine but just looking at the code in the editor you wouldnt know you had. If you dont end a line of code it wont show or be executed.
 Oh and a last lastly LOL is if you press the G Code button down near the reset button you will get a list of G Codes and a brief description of what they do, might help you out as I know it has helped me many times :)
Hood
Exactly what I was hoping for!
« Reply #5 on: December 26, 2008, 07:52:45 PM »
Wow, thats EXACTLY what I was hoping for.  The program is simpler than I thought.  I knew there was a G or M code to pause, but I thought that somehow I needed to take some manual action to end the pause.  I can see here that I can determine the length of the pause, and that the next line of code restarts with its command or function.  That's great.  Hood, RC, thanks for the tips. 

A quick question.  Is there a start up string that I need that preceeds these GCode lines, or can I just create a notepad file with the code you and RC created (inserting the start location of course) and run that?  I notice the CAM program I use has some code- G90, G20, G49, that start the file.

Thanks for the help! 
Re: Spindle Warm Up program help
« Reply #6 on: December 26, 2008, 08:50:43 PM »
 :)
Here is a clip from the manual.
RC
Re: Spindle Warm Up program help
« Reply #7 on: January 13, 2016, 06:58:25 AM »
Recently I converted my machine (AXYZ Millenium) under the control of MACH3.
Using wonderful 2010 screnset.

To initial spindle warm up, setup zeros and soft limits enablling check written a small macro code.

I call it M900 and write code M900 in initialization string field.

Perhaps it will be useful to someone.

macro:

Ret = MachMsg("Reference Axis?", "Axis Question", 1)
If Ret = 1 Then
Code "M887"
While IsMoving()
Wend
Sleep(1000)

Code "M885"
While IsMoving()
Wend
Sleep(1000)

Code "M886"
While IsMoving()
Wend
Sleep(1000)

If GetOEMLED(815) Then
Message "Soft Limits ON"
Else
DoOEMButton(119)
sleep(100)

If GetOEMLED(815)=0 Then
Message "Can Not enable SoftLimits!"
Else
Message "Soft Limits ON"
End If

End If
 
ElseIf Ret = 2 Then
End If   

Ret = MachMsg("WarmUp Spindle?", "Spidle Question", 1)
If Ret = 1 Then
SetSpinSpeed(5000)
DoSpinCW()
Message "Spindel warmup 10 min left"

For i=0 To 7
Sleep(30000)
Next i

SetSpinSpeed(10000)
Message "Spindel warmup 6 min left"

For i=0 To 11
Sleep(30000)
Next i

DoSpinStop()
Message "Ready"


ElseIf Ret = 2 Then
End If