Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Fred_evans on February 21, 2019, 09:57:41 AM

Title: writing subroutines
Post by: Fred_evans on February 21, 2019, 09:57:41 AM
Hello Chaps ,
I seem to be running around in circles like a fowl with its head cut off.
I am sure someone can help me
I want to machine a rod down to a certain diameter using a subroutine
and parameters
#1 is the starting diameter
#2 is the finished diameter
#3 is the depth of cut
(The material between the two diameters has to be removed .)
For ease of understanding lets say start at 103mm and machine down
to 89mm in 2 mm depth of cut.
My intention is to take the first cut and jump into a subroutine,
execute the subroutine the correct number of times  until 1 mm is left
then jump out of the subroutine and do a final cut of 1mm

If someone could post a bit of code that I can work through that does this-
then I would be very happy
Many thanks
and best regards

fred










Title: Re: writing subroutines
Post by: RICH on February 22, 2019, 05:48:20 AM
See this topic for canned cycle for turning down to a diameter:
https://www.machsupport.com/forum/index.php?topic=4297.msg30870#msg30870

There is a wizard to do the same.

RICH
Title: Re: writing subroutines
Post by: Fred_evans on February 22, 2019, 10:54:05 AM
thankc rich- will study it now
Title: Re: writing subroutines
Post by: Fred_evans on February 22, 2019, 11:27:07 AM
I had a look at it -cant wait to get to the machine tomorrow
thanks

fred