Hello Guest it is May 11, 2021, 01:27:54 PM

Author Topic: Peck Drilling macros for the Lathe  (Read 12544 times)

0 Members and 1 Guest are viewing this topic.

melee

*
Peck Drilling macros for the Lathe
« on: December 13, 2009, 10:45:07 AM »
Hi All

As noted in the below thread (and others) various users, including myself, have had problems with the G83 and/or G83.1 drilling canned cycles as implemented by Mach on the lathe.
http://www.machsupport.com/forum/index.php/topic,12874.0.html

I have written alternative macros, M830 and M831, which provide lathe peck drilling with full retraction of drill and rapid peck drilling with partial retraction to break swarf strings, respectively.

These macros follow similar methodology and syntax to my previous macros published on this forum, so should be quickly assimilated by any of you using them.

There is in any case a full README file which gives details of usage and simple example files.

Macros can be downloaded from  (SEE POST BELOW FOR NEW LINK TO NEW MACROS )

Usual caveats and disclaimers apply.  Not warranted fit for any purpose, you can modify, copy etc as you wish, but you can't pretend you wrote them.

Any bug fixes etc will be updated via this topic, so check it for a while after downloading.

Enjoy

Melee

« Last Edit: December 17, 2009, 11:46:01 AM by melee »

Offline RICH

*
  • *
  •  7,419 7,419
    • View Profile
Re: Peck Drilling macros for the Lathe
« Reply #1 on: December 13, 2009, 11:51:33 AM »
Thanks for your efforts Melee as i know i will use them for some upcomming work to be done.
RICH

melee

*
Bug Fix
« Reply #2 on: December 14, 2009, 12:45:03 PM »
Hi

Apologies - found the typo!  There always is at least one.
If only VBS insisted upon all variables being defined, like other languages, this one could not have occurred.

Was not serious, just would have prevented any X value other than 0 being used.
For drilling on the lathe that is unlikely to occur, unless it has an indexing spindle and a powered drill head etc.

Zip file updated - date stamp should be 14th Dec

regards

Melee

Offline RICH

*
  • *
  •  7,419 7,419
    • View Profile
Re: Peck Drilling macros for the Lathe
« Reply #3 on: December 14, 2009, 06:52:43 PM »
Melee,
Glad you found it because that's the first thing i was going to use it for. I have a high speed drill that will be mounted on the carriage and will be using it to drill off axis, perpendicular, and on an angle. The lathe spindle can be indexed manualy but eventualy automated such that it will be used like a rotary table. Will try the macro out in a few days, should be interesting.

RICH
« Last Edit: December 14, 2009, 06:55:09 PM by RICH »

melee

*
Re: Peck Drilling macros for the Lathe
« Reply #4 on: December 15, 2009, 03:45:28 AM »
Look forward to your results.  Not something I can test other than in theory.

regards

Melee

Offline RICH

*
  • *
  •  7,419 7,419
    • View Profile
Re: Peck Drilling macros for the Lathe
« Reply #5 on: December 16, 2009, 11:13:40 PM »
Melee,
Tried the maco's out but they didn't work for what i was trying to do.
They will only peck one time for small values of Z & Q and values must be the same or you will get an error message.

G20 examples:  ;M831 X0 Z-1 R.01 Q0.2 P1 D1 F10   this will peck 5 times
                      ;M831 X0 Z-.01 R.01 Q.002 P1 D1 F.1 get an error message "no digits found where real             
                                                                           number should be"
                      ;M831 X0 Z-.01 R.01 Q.01 P1 D1 F.1   this will only run 1 time
                      ;M831 X0 Z-.02 R.01 Q.01 P1 D1 F.1   get an error message "no digits found where real             
                                                                           number should be"

I am just experimenting on how to drill 0.020" holes  at 20,000 rpm on my lathe.
The following works: G83 X0.0 Z-0.010 R.010 Q0.001 F.04 but is painfully slow and the G83.1 won't rapid as you as you already know.

RICH

 

melee

*
Re: Peck Drilling macros for the Lathe
« Reply #6 on: December 17, 2009, 04:06:03 AM »
Hi Rich

Thanks for the feedback, I haven't tested them with imperial values.

The error messages you are getting are not from the macro, but from Mach itself. 
They must be related to the Z values that are getting output to Mach, when dividing fractional values by other fractional values.

>>  ;M831 X0 Z-1 R.01 Q0.2 P1 D1 F10   this will peck 5 times
This is correct as Z/Q = 5

>>  ;M831 X0 Z-.01 R.01 Q.01 P1 D1 F.1   this will only run 1 time
This is also correct, as peck distance is same as drilling distance  Z/Q = 1

>>  ;M831 X0 Z-.01 R.01 Q.002 P1 D1 F.1 get an error message "no digits found where real number should be"
This the Mach GCode warning, similar to what you get if you enter GO instead of G0

I have an idea where the problem is, albeit not why it is happening and will come back to you.

I am working on a much improved version of the macros which will work on lathe (conventional or indexing spindle) or mill.
They will allow incremental repeat drilling along a plane and also repeat calls to the macro in the same code block, either using the same
parameters or new ones.

I will fix this problem and post the completed new macros soon.

regards

Melee
« Last Edit: December 17, 2009, 04:10:31 AM by melee »

melee

*
Peck Drilling Macros for Lathe and Mill
« Reply #7 on: December 17, 2009, 11:47:12 AM »
Hi Rich et al

I have solved the problem and finished the new macros.

It was related to division of already fractional numbers by others, some negatively signed. 
It resulted in an output at one stage of G0 Z--0.002 which caused the Mach syntax error.

I had not used such low numbers in my tests, compared to the delicacy of your work, most of mine is agricultural!

The new macros will work on either lathe or mill and can incrementally repeat drill along a single plane.
Repeat calls to the macros can be used to program a complete pattern grid of holes.

There are a lot of examples, including some imperial ones based on your figures, all of which work on my set up.

The parameters and required syntax have changed slightly from the original version to allow the new features.
Read the README file and all will become clear.

Hope these do what you want now.

The original macros have been removed

Download new macros from   HERE 

(Updated 30th Dec 2009 - re-download optional - small tweak makes pecking a little faster)

regards

Melee
« Last Edit: December 30, 2009, 12:06:56 PM by melee »

Offline RICH

*
  • *
  •  7,419 7,419
    • View Profile
Re: Peck Drilling macros for the Lathe
« Reply #8 on: December 17, 2009, 01:27:32 PM »
Thanks Melee that was quick,
I'll try them out. Here is a link on what i am up to

http://www.machsupport.com/forum/index.php/topic,12484.msg88231.html#msg88231

RICH

Offline RICH

*
  • *
  •  7,419 7,419
    • View Profile
Re: Peck Drilling macros for the Lathe
« Reply #9 on: December 17, 2009, 07:54:26 PM »
Tried the macros on the lathe and they are working fine.
The M831 is realy nice when you are at some of the feedrates i have been trying and saves a lot time.
Thanks again,
RICH