# Machsupport Forum

## Mach Discussion => General Mach Discussion => Topic started by: Nagle on August 17, 2010, 03:28:14 AM

Title: Rotational speed
Post by: Nagle on August 17, 2010, 03:28:14 AM
According to the manual, section 10.1.6, when a move involves at least one linear axis and a rotational axis, the feed rate for the rotational axis is computed using the "correction diameter" to convert a feed rate in linear units into an angular rate which will get roughly that feed rate at the indicated diameter.  That's reasonable enough.

Then, though, the manual says "For rotation of one rotational axis with X, Y, and Z axes not moving, the feed rate means degrees per minute of the rotational axis.". So, every time the program calls for a pure rotational move, the feed rate is supposed to be drastically different than for coordinated moves. Which is usually not what you want, especially with programs that may just happen to generate a move that's a pure rotation.

I haven't tried this on the real mill (which has an older version of Mach 3) yet, but i've been running Mach 3 R3 042 040 (unregistered/demo) on a computer not connected to a machine tool to test the GCode,.  The A "radius" is set to 2.0, the "Radius Correct" indicator is yellow, feedrate is 54, but the A axis never moves faster than about 1 degree/second, which is far too slow for the indicated linear feed rate.
Title: Re: Rotational speed
Post by: RICH on August 17, 2010, 06:12:47 AM
Must admit that it can get confusing, IMHO, and below is my summary of the different axis motions as taken from the manuals.
If your indexing using the A then you would use steps per degree ( that's conventional in industry as i understand it).
You should find the velocity and acceleration which is appropriate for the A axis. So just using the A to index is somewhat straight forward.

Now if your going to slave the A to some axis then things get more complicated. Feedrate gets modified / blended / coardinated based on a radius that you can define in Mach and remember that the feerate  may get restricted to the slowest axis based on velocity. A real kicker is when you want some feedrate, and it reverts to say A settings which are slower, but the feedrate is not realy linear; ie  and you find that the feedarate is not actualy say doubling but rather is only  increased by say 10%. For a stepper the torque is decreasing as the velocity is increasing so even though you call out for more velocity / feedrate but it physicaly can't do it, thus a slow physical feedrate. Good reason for a servo on the rotary........

So you can if you wish make the A movement be angular or linear and then axis movement changes depending on gcode, the feedrate mode,
etc. So take a look at G93, G94, and G95.

Co-ordinated Linear Motion  (Section 10.1.5 in manual)
Co-ordinated linear motion - each axis moves at constant speed and all axes move from their starting positions to their end
positions at the same time, also defined as control the axes so that, at all times, each axis has completed
the same fraction of its required motion as the other axes
- IE; any two axes ( x,y or z ) produces motion in a straight line
- the motion can be done at prevailing or rapid feedrate and may default to the slower axis feedrate

FEEDRATE ( unless G93 is used ) Section 10.1.6 in manual
1. X, Y, Z  + A, B, C         - without simultaneous rotation -  F =length / minute  ( along the linear path )
2. X, Y, Z  + A, B, C         - with simultaneous rotation -       F =length / minute  ( for the XYZA combination linear path ~ modified F
based on a diameter)
3. X, Y, Z  + A or B or C  - with simultaneous rotation -       F= Degrees / minute of  A or B or C
3. X, Y, Z  + A B C                                                                  F= Degrees / minute  using a blended ABC / conceptual angular motion
for total time

3 Feed Rate Modes - ( Section 10.7.25 in manual )
G93        - inverse time feed rate -            F = 1/F#  minutes ( if the F number is 2.0, the move should be completed in half a
Minute)
- if active, an F word must appear on every line which has a G1, G2, or G3 motion
-  an F word on a line that does not have G1, G2, or G3 is ignored.
-  does not affect G0 (rapid traverse) motions.
It is an error if: inverse time feed rate mode is active and a line with G1, G2, or G3
(explicitly or implicitly) does not have an F word

G94        - units per minute feed rate         F= inches / minute, mm / minute, or degrees / minute, determined by length  units are being
used and which axis or axes are moving

G95          units per rev feed rate                F= number of inches / mm / degrees per spindle revolution, determined by what length units
are being used and which axis or axes are moving.

RICH
Title: Re: Rotational speed
Post by: Nagle on August 18, 2010, 05:08:32 PM
OK. So can you set the feed rate differently for different axes?
Title: Re: Rotational speed
Post by: RICH on August 18, 2010, 06:42:19 PM
Quote
So can you set the feed rate differently for different axes?

I guess the question you asked can be expressed as follows if that's what you mean:
G1 X1 F1 Y1 F2 Z1 F3 ( all three axis  moving simultaneusly and a different feedrate for each )
BUT you can't code like that,  as only one feedrate on a line is allowed!  ;)

For individual axis moves, yes, you can have different feedrates. The feedrate is "modal" as it remains
/ applies for all following lines until it is changed to something different. The feedrate could be modified
if the axis velocity is  not appropriate for the feedrate.

Now you may ask........Well what happens when you do different combinations of feedrate, feedrate mode,  steps per unit settings, rotary / linear?
I don't have an answer!  ;D
Do a matrix of all the possible combinations ....and then test and see.
I fooled around with that some time ago, never finished trying the different combinations.

RICH
Title: Re: Rotational speed
Post by: Nagle on August 21, 2010, 01:00:48 AM
OK, I've been trying a few things. (Again, I'm testing on Mach 3 Version R3.042.040 in demo mode, not on the actual CNC machine, which has a registered version.)

This is an engraving-like job on the outside of a cylinder.  (I'm making a print wheel, which is a reverse engraving job,
but I'm debugging by trying to engrave simple patterns on a cylinder.)

The radius is set to 2.0" in Mach 3, and the A axis is set as rotational in Setup->Toolpath, where I also set Axis of Rotation
to X axis, and set "A rotations enabled" and "Use radius for feedrate".
The 3D display reflects this; I see the proper A axis rotation in the tool path display.
So Mach3 is properly understanding the setup geometry.

I set the feedrate in the Gcode as F100, and I have coordinated moves in X and A.  Y=0.0 at all times.  What seems to happen is that
I get rotation at 100 degrees/minute, and linear motion at 100 inches/minute.  Even for coordinated moves where
both X and A are changing. So X movement is as specified, but A movement is far too slow, by about a factor of 10.

I tried putting a "Y0.0" after all A moves in the GCode, thinking that perhaps it would make Mach do the "coordinated move" feedrate
calculation as described in the manual. That had no effect.  I've tried making small changes to the X coordinates so that the moves
in the A axis aren't pure A axis rotations.  That had no effect.  I tried exiting and restarting the program after making changes
to Config->Toolpath. No effect.  Reloaded G-code. No effect. Clicked on "Regen Toolpath". Redrew the Tool Path display pane
correctly, no effect on feed speed.

Any ideas?

I can't get that "coordinated speed" feature no matter what I do.
Title: Re: Rotational speed
Post by: alenz on August 21, 2010, 02:35:52 AM
What do you have your A-Axis velocity set to in Config > Motor Tuning? It sounds like it’s set too low. For your example, (100 in/min & 2.0 in radius) it should be 2860 deg/min or higher. Note that the entry is in deg/min (even tho the header reads ‘In’s or mm’s per min’.) If it is set low you will get the results you describe.
HTH
Al
Title: Re: Rotational speed
Post by: Nagle on August 21, 2010, 02:58:42 AM
Thanks.  That's it.  I set it to 1200 units/min, or roughly 3 deg/sec, and speeds came up to a reasonable level.

OK, now I think I've found all the necessary settings.  Clearer documentation would help.
Title: Re: Rotational speed
Post by: alenz on August 21, 2010, 03:46:41 AM
Great :)
Title: Re: Rotational speed
Post by: beedoebeedoe on January 23, 2015, 03:16:00 PM
What is meant by "correction diameter"? How is that set?
Title: Re: Rotational speed
Post by: BR549 on January 23, 2015, 05:04:49 PM
HUM, that is not right.  You have to set the rotary axis to the PROPER  steps per as defined by your hardware setup . I think you will find that in DEMO mode the axis rotational correction does not work.  IF your steps per are TOO HIGH you will NEVER get the required speed to match the XY axis in feedrate. The A will only go so fast.

IF you need speed in the rotary you need to change out the hardware to the proper ratios for speed.

Just a thought, (;-) TP
Title: Re: Rotational speed
Post by: beedoebeedoe on January 26, 2015, 07:41:13 AM
So there is no "Correction Diameter" box. It's all about setting the steps correctly?
Title: Re: Rotational speed
Post by: BR549 on January 26, 2015, 11:11:03 AM
YES there is a  Rotational axis correction DRO . IT IS used to blend the velocities of XY to the rotary on a combined move.

The Point I am making is you cannot just change the " steps per " to change the velocity. That part MUST be set as per the hardware so that mach3 can move correctly.

(;-)TP