Hello Guest it is April 17, 2021, 05:38:35 AM

Author Topic: Quick conversion of code from linear to angular movement  (Read 11373 times)

0 Members and 1 Guest are viewing this topic.

Quick conversion of code from linear to angular movement
« on: August 23, 2007, 05:10:28 AM »
Hi all,
Wow, it's looking as if Mach3 is becoming the Fanuc of the small to medium machine control market.  Amazing product by the way!!!

I'm looking for a way to quickly convert the value of one of my axis, Y or X,  from linear movement to angular movement for a rotary axis.  Is there a function in Mach3 that can perform this code change quickly?  I know how to mathematicaly calculate this, but as you can imagine converting hundreds of lines of code is time consuming to say the least.  The CAM software I have does not have rotary axis capabilities.

Your help is greatly appreciated.

Alex
     

vmax549

*
Re: Quick conversion of code from linear to angular movement
« Reply #1 on: August 23, 2007, 09:18:16 AM »
You could use the swapaxis function in mach to swap out the y to a axis that way it would run with standard code and the a would act as the y. You would need to setup the A axis for dia so that Mach would know the size of the Y/a axis envelope

Should work. (;-) TP
Re: Quick conversion of code from linear to angular movement
« Reply #2 on: August 23, 2007, 09:55:58 AM »
Am i correct to assume that if I set this up the way you mentioned, it will convert for example 3" linear movement to the equivalent angular move, dependent on the radius of the part being machined?

Thank you,
Alex

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Re: Quick conversion of code from linear to angular movement
« Reply #3 on: August 23, 2007, 01:18:25 PM »
You'll need to run a macro most propably in the macropump doing a cos/tan conversions of the XY DRO's

Whacko for real
Nothing's impossible

vmax549

*
Re: Quick conversion of code from linear to angular movement
« Reply #4 on: August 23, 2007, 01:40:14 PM »
That is the way it is suppose to work, I have not tried it personally. Art gave us that ability a while back just have not had time to try it. Now might be a good time(;-) TP

vmax549

*
Re: Quick conversion of code from linear to angular movement
« Reply #5 on: August 23, 2007, 01:48:14 PM »
Why would you need to convert the y axis with cos/tan????? If you set up the y axis on the centerline of the cylinder and set the limits of the movement to the circumference of the circle it should run it as a flat axis if it thinks it is y.??? Instead of y moving back and forth it just moves around and back. Now you do have to setup on the exact centerline of A to be accurate with z.  And you will have to limit the overlapping of the cuts depending on the diameter of the piece.

(;-) TP

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Re: Quick conversion of code from linear to angular movement
« Reply #6 on: August 23, 2007, 02:15:40 PM »
I might be on the wrong track as to what Alex wants, but if you have a knife for instance to follow the angular travel as a third rotating axis, the diameter is not relevant. You need to resolve the angle of travel in the xy plane and convert it to radians to align the knife.

Don't mind me if I'm on the wrong track, I do that often.

Whacko
Nothing's impossible
Re: Quick conversion of code from linear to angular movement
« Reply #7 on: August 23, 2007, 03:39:04 PM »
Ok,

linear move: G01 X0. Y10. Z0.

Diameter of part is 4"



1.)Circumference of circle = Diameter(4") x Pi(3.14)
                                = 12.5663"
2.)12.5663" = 360 degrees

3.)Original move 10"/circumference(12.5663")=.7975(Percentage)

4.)Percentage(.7975) x 360=286.48degrees


Answer:

Angular move to replace Y10.
G01 X0. A286.48   Z.0

------------------------------------------

Now I need to do this thousands of times over or with some sort of conversion macro or software.

vmax549

*
Re: Quick conversion of code from linear to angular movement
« Reply #8 on: August 23, 2007, 04:46:15 PM »
Thats one way, the way I was discribing was to calculate the circumference of the cylinder, that would be the linear distance for the swapped axis. If you are looking for the angular displacement then please disregard, I might have Misunderstood  what was needed. (;-) Using the a axis as a flat plane axis was the lazy way to engrave a cylinder(;-) You just don't get the ortho corrections

(;-) TP

Offline Whacko

*
  •  239 239
  • Happy Days
    • View Profile
Re: Quick conversion of code from linear to angular movement
« Reply #9 on: August 23, 2007, 06:29:56 PM »
Alex, I don't quite get it. Do you want to move 10" in the Y axis, and then do the angular movement on the A axis to cut a circle of 4" diameter?
What is your application? I can help you with the VB code etc. but I'm not sure what you want to do.

Whacko
Nothing's impossible