Hello Guest it is April 27, 2024, 01:31:27 AM

Author Topic: Question about G1 speed  (Read 5809 times)

0 Members and 1 Guest are viewing this topic.

Question about G1 speed
« on: May 28, 2007, 08:47:34 AM »
I am familiar with the G1 command, where the 'f' value sets a speed in units/minute. I am about to bring on a fourth axis, a 6" rotary table, and am wondering how the speed gets calculated if I have a G1 command that has both a rectangular coordinate move (x,y, or z) as well as a rotational move (a, b, or c)? My x,y,z is in inches and I assume the a,b,c is in degrees.

So at some point the CNC software has to calculate a vector length, based on the current position and the desired final position. Then, with a given speed rate, it gets the movement done in (length divided by speed) minutes. But if there's a combination of linear and rotational movements, I am not ure how it will calculate the vector length. For this purpose, does it treat one degree of riotation the same as one inch of linear movement? Would a one degree rotation and a one inch movement of the z-axis equal a vector length of 1.4142 "units"? To get that I took the square root of 1 squared plus 1 squared, or the square root of 2.

I ask this because I usually use a speed of 3 to 5 units per minute when doing linear stuff. But if a complete revolution is going to be considered 360 units, then the speed will need to be significantly faster. I'd still want the z-axis to descend at about 5 units per minute and for it to finish a one inch boring depth therefore in 12 seconds (0.2 minutes). So the table would need to revolve completely in that same one 12 seconds, or 30 units per second or 1800 units per minute. This is where my confusion comes from. Is the speed rate then the square root of (1800^2 + 5^2) ???

Any help is appreciated!!!
All your base are belong to us. You are on the way to destruction. You have no chance to survive make your time.

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Question about G1 speed
« Reply #1 on: May 28, 2007, 12:18:06 PM »
Hey Tiger,
    As far as your step per units, they need to be set to what ever number will give you one reveloution I think. I think it gives trouble if you set your steps per to= one degreee I think, not certain though so maybe someone will verify this. To use the diameter as the feedrate, go into config, toolpath. See pic below. two check boxes there. Then you can enter a diameter in the settings page for the diameter of the axis. I haven't got a rotary table set up yet so I'm not certain of the above but hopefully it will help.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Question about G1 speed
« Reply #2 on: May 31, 2007, 04:21:17 PM »
Chaoticone,

I don't understand. I spent this past long weekend outfitting the rotary table with the servo. I went to set up Mach2 to use this as a fourth, rotary axis. It comes up as axis "4" along with "X", "Y", and "Z". I set it up to read degrees. If I jog it 90 units, it turns the table 1/4 of a revolution. This is a 90:1 table with a motor that has an encoder that gives 2000 steps per its revolution. So one degree is 90*2000/360 or 1500 steps/unit.

My question is more a g-code one. If my (x,y,z is) at (0.000, 0.000, 0.000) and my table is at 0.000 degrees, and I run this line:

G1 x1.000 y1.000 z1.000 a90 f??????      (this is just as an example)

What do I put for the speed (after the f, in the line above)? Or should 90 degrees be represented by 0.25? That would make one unit be one full revolution.

I'm just confused. I've never programmed g-code for rotary tables before.

Hey Tiger,
    As far as your step per units, they need to be set to what ever number will give you one reveloution I think. I think it gives trouble if you set your steps per to= one degreee I think, not certain though so maybe someone will verify this.
All your base are belong to us. You are on the way to destruction. You have no chance to survive make your time.

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Question about G1 speed
« Reply #3 on: May 31, 2007, 06:15:05 PM »
The F should be what ever you want the feed rate to be. If you want the othe rhtree axis to move to a location and then start the a axis rotating you should put it on another line like this.
G1 x1.0 y1.0 z1.0 f10
G1 a90 f10.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
no
« Reply #4 on: May 31, 2007, 06:44:31 PM »
What I want is a combined linear axis PLUS rotational axis move. Think of drawing spirals. That's a change in radius at the same time as a change in angle.

My original question is how to figure feed rate when you're dealing with mixed units (inches and degrees). I understand inches per minute. I understand degrees per minute (the example you just gave). What I don't see is how to mix inches and degrees to calculate a feed rate.

Or should I look at it all as generic "units", where the x might move 1.000 unit, and the a moves 90.000 units? If I wanted a 1.000 inch and 90 degree move done in one minute, the feed rate would be sqrt(1^2 + 90^2) = 90.006 units / minute?
All your base are belong to us. You are on the way to destruction. You have no chance to survive make your time.

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Question about G1 speed
« Reply #5 on: May 31, 2007, 07:04:04 PM »
Quote
Or should I look at it all as generic "units", where the x might move 1.000 unit, and the a moves 90.000 units?


That is correct. Mach looks at the units. Your feed rate is the surface speed of your tool, nothing else. Say you have a rod that is going to have one spiral flute cut in it 1 inch from tip to tip. You want your Code to look like this if you are set up in degrees in your a and say your x is the axis it is running in. Your code would look like this. G1 X1.0 A360.0 F? This F value is surface speed. If you put in a 1 then it will take, I don't know, it is not important. The thing that is important is the surface speed. When you do the math to get the desired Feed rate for the cutter, that is the f value. If your surface speed needs to be 30 IPM then F=30. When you enter you Use diameter as feedrate, Mach does the math for you. I hope we are talking about the same thing. I have sent you a personal message.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

vmax549

*
Re: Question about G1 speed
« Reply #6 on: May 31, 2007, 08:22:22 PM »
In the end I think you will be limited by the speed of the A axis. Mach will adjust the other axis (xyz) to maintain the proper interpolation up to the top speed of the A axis. There are two ways to look at it, yo can deal with it in polar movements in degrees or you can set the rotational diameter and work it as a flat plane.

(;-) TP
Re: Question about G1 speed
« Reply #7 on: July 25, 2007, 05:57:23 PM »
Chaoticone
This one for you :-))
How I can make A axis swivel from 0 to left and right say +30 degree and -30 degree and same time Z axis lower say 0.5mm on every 30 degree A moves simultaniously. This I need for cutting a deep groove across the bar but I can only position tool correctly on the 0 mean center of the groove. If I can do this from the end then is not a problem G1 z0.5 a60 and next G1 z0.5 a0 but from 0 would Mach2 make -30 too?
Thanks
« Last Edit: July 25, 2007, 06:01:17 PM by coolfox »

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Question about G1 speed
« Reply #8 on: July 25, 2007, 07:19:16 PM »
Hey Coolfox,
    I think I understand what you want, not certain though so run it in the air.

G0 A30.0               Rapids the a to 30
G1 Z-0.5 F?            feeds the z into the material.    I don't know what you want your feed rate to be.
G1 A0.0 Z0.0 F?      Feeds a and z to 0 in one motion
G1 A-30.0 Z-0.5 F?  Feeds A to - 30 and z to -.5 in one motion
G0 Z10.0               Rapids z 10 units out of part.

I hope this is what you wanted.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Question about G1 speed
« Reply #9 on: July 27, 2007, 09:59:49 AM »
Chaoticone
Thanks a lot m8, this code do work exactly how I need !!!!
Cheers