By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Forum House Ad Zone

Calling a sub routine equally at 20 degrees

All Topics | Latest Posts

Search for:  in Thread Title in  
mick04/08/2015 17:26:48
421 forum posts
49 photos

Now I'm of the old G code school of programing without access to any CAD/CAM. What I need to do is call a pocket sub routine 18 times at 20 degree intervals around a circular blank using Mach3 control. Back when the world was young I programmed Bridgeport series 1 where a sub routine could be rotated by including 'A' followed by the required angle. I've looked through the manual and all I can see is the coordinate rotation which isn't what I need, so is there a method of calling the sub routine incrementally at 20 degree intervals, or even better a short hand method of calling the sub routine 18 times at 20 degrees.

Thanks

David Clark 104/08/2015 17:50:19
avatar
3357 forum posts
112 photos
10 articles

I printed an article in MEW in the CNC series I did. This allowed you to do any number of holes on a diameter. It will be available in the digital archives or perhaps someone could post it on here if the editor has no objections.

Neil Wyatt04/08/2015 17:53:08
avatar
19226 forum posts
749 photos
86 articles

Can you remember which issue it was?

Neil

David Clark 104/08/2015 17:55:06
avatar
3357 forum posts
112 photos
10 articles

Just found it in workshop pages. CNC milling part 3. Read the text that goes with it and all will be explained. Three variables control radius and angle and no of repeats. (One less than number of holes).

Edited By David Clark 1 on 04/08/2015 18:00:29

Neil Wyatt04/08/2015 20:57:43
avatar
19226 forum posts
749 photos
86 articles

Here's alink to David's article. More to be found under 'Workshop -> processes' on the black menu bar.

**LINK**

Neil

mick05/08/2015 09:19:52
421 forum posts
49 photos

Hi. Neil, Hi. Dave.

I've had a quick play with this, but it doesn't seem to like rectangular pockets, as the graphics show two darts diametrically opposed, but its not beyond the bounds of possibility that I might be missing something here. Drilling a series of holes would be quite straight forward as there are no X or Y moves contained within the canned cycle, but the sub routine contains X, Y and Z moves all of which will enjoy both + & - values as the cycle progresses, so there needs to be some number crunching to reproduce the rectangle 18 times. As I said back in the day when I used this function regularly the angular value was proceeded with the letter address A, though for the life of me I can't remember the G number that was also called.

Mick

Bowber05/08/2015 09:34:20
169 forum posts
24 photos

I think this is what your after.

http://www.cnccookbook.com/CCCNCGCodeG68G69CoordinateRotation.htm

G68 and G69

Steve

David Clark 105/08/2015 09:51:55
avatar
3357 forum posts
112 photos
10 articles

I missed the rectangular pocket bit. All you need to do is use the program to move to the co-ordinates then use an incremental cycle to call the square pocket. As long as the pocket cycle is taken back to the co-ordinate of the hole, it should repeat fine. I can't remember the incremental g code for a pocket (If there is one as it is 10 years since I have done CNC programming). You could do a circular pocket and then clean out the reast of the rectangle. You would need to rotate the pocket at each position as well.

Edited By David Clark 1 on 05/08/2015 09:54:49

mick05/08/2015 16:57:59
421 forum posts
49 photos

The mist has cleared, thanks to all. The Cnccookbook site is a useful resource Steve.

All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Sign up to our Newsletter

Sign up to our newsletter and get a free digital issue.

You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy

Latest Forum Posts
Support Our Partners
cowells
Sarik
MERIDIENNE EXHIBITIONS LTD
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest

 

Donate

donate