Hello Guest it is March 29, 2024, 07:13:21 AM

Author Topic: writing subroutines  (Read 988 times)

0 Members and 1 Guest are viewing this topic.

writing subroutines
« 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










think of the trees-- use both sides of the computer paper

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: writing subroutines
« Reply #1 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
Re: writing subroutines
« Reply #2 on: February 22, 2019, 10:54:05 AM »
thankc rich- will study it now
think of the trees-- use both sides of the computer paper
Re: writing subroutines
« Reply #3 on: February 22, 2019, 11:27:07 AM »
I had a look at it -cant wait to get to the machine tomorrow
thanks

fred
think of the trees-- use both sides of the computer paper