CNC Services Northwest


Centroid Control Rotary Fourth Axis Tips

Telling the control you have a rotary axis

Centroid's Machine Parameter #94 is used to tell the control whether the fourth axis is a rotary axis, and how to display it on the DRO.

The value in Parameter 94 is a combination of values. You add up the values for the options you want, and enter the sum in Parameter 94. The options are as follows:

FlagValueMeaning (include value if:)
Rotary Axis1.0000Fourth axis is a rotary axis
Suppress DRO rotations2.0000You do not want to see revolution count on DRO (e.g. display 380° as 20.00°, not 1R20.00°)
Do not park8.0000You want to exclude the fourth axis from movement with F10/Park
Display as linear32.0000You want to see total degrees on DRO (e.g. display 380° as 380.0000)

For example, if you have a rotary fourth axis; you don't want it to move back to home when you press F10 to Park the machine; and you want to see total degrees on the DRO; then you would enter 41.0000 for Parameter 94 (1+8+32).

If you are not sure what you want, set Parameter 94 to 1.0000. You can always add other options later.

To set Parameter 94:

  1. Press F1 for Setup
  2. Press F3 for Configuration
  3. Enter the configuration password ("137")
  4. Press F3 for Parameters
  5. Arrow over and down to Parameter 94
  6. Enter the desired value
  7. Press F10 to Save
  8. Press ESC twice to return to the main screen.

Turning the rotary fourth axis on and off

If you are not going to be using the rotary table for a while, and especially if you plan to unplug it from your control, you should disable it or "turn it off". This means not only releasing power from its servo motor, but also telling the control not to attempt to use it.

Starting with CNC7 software version 8.00 (released in 2002), you can add a function key to the Setup screen to quickly and easily turn the fourth axis on and off. To add this key, you must set Machine Parameter #131. The value you set in this parameter depends on the label you use for the fourth axis in your CNC programs.

The fourth axis may be labeled A, B, C, U, V, or W. A, B and W are the most common choices.

To enable the quick on/off switching key, set Parameter 131 to the value which corresponds to your axis label below:

Axis LabelValueAxis LabelValue
A11.0000U41.0000
B21.0000V51.0000
C31.0000W61.0000

To set Parameter 131:

  1. Press F1 for Setup
  2. Press F3 for Configuration
  3. Enter the configuration password ("137")
  4. Press F3 for Parameters
  5. Press F8 for the second page (Parameters 100-199)
  6. Arrow over and down to Parameter 131
  7. Enter the desired value
  8. Press F10 to Save
  9. Press ESC twice to return to the main screen.

The F6 key should now appear on your Setup screen, whenever you press F1 for Setup. If the fourth axis is currently enabled, F6 will disable it (switching to 3-axis mode). If the fourth axis is currently disabled, F6 with enable it (switching to 4-axis mode).

If the machine was homed with the fourth axis disabled, and you later enable the fourth axis, you will need to re-home the machine before you can run any jobs.

Programming with the rotary fourth axis

As an indexer in Intercon

In your Intercon program, you can index the rotary axis in either of two ways: as part of a normal Rapid move (which may also include X, Y, and/or Z) or as a stand alone Rotary move.

To Insert a Rapid move, press F1/Rapid. If you have a rotary axis, you will see fields for the rotary axis angle below the normal X, Y, and Z fields.

You can enter the rotary axis angle as either degrees, minutes, and seconds, or as a single decimal degrees value. If you enter degrees, minutes, or seconds, Intercon will calculate decimal degrees. If you enter decimal degrees, Intercon will calculate degrees, minutes, and seconds.

The rotary axis angle can be either absolute (measured from the zero degree position you will set on the Part Setup screen) or incremental (measured from the previous rotary axis angle). Press F1 on any of the rotary axis angle fields to toggle between absolute and incremental.

To Insert a stand alone Rotary move, press F6/Other, then F7/Rotary.

The same fields will appear for the Rotary operation as appeared at the bottom of the Rapid move. The Rotary operation will produce a single Rapid move on the rotary fourth axis. It will not move X, Y, or Z.

As an indexer in G codes

You can index your rotary fourth axis in G codes using simple G0 (rapid) moves. In the default absolute positioning mode (G90), rotary axis positions are in degrees, measured from the zero degree position you will set on the Part Setup screen. In incremental positioning mode (G91), rotary axis positions are in degrees, measured from the previous rotary axis position.

Example (drilling four holes around a cylinder):

  M6 T1                          ; Tool change, load tool 1
  M3 S1200                       ; Start spindle, 1200 RPM
  G0 X1 Y0 B0 Z0.1 G43 H1        ; Rapid down to clearance, 0°
  G81 X1 Y0 R0.1 Z-.5 F10        ; Drill first hole
  G80                            ; Cancel drilling cycle
  G0 B90                         ; Rotate fourth axis to 90°
  G81 X1 Y0 R0.1 Z-.5            ; Drill second hole
  G80
  G0 B180                        ; Rotate fourth axis to 180°
  G81 X1 Y0 R0.1 Z-.5            ; Drill third hole
  G80
  G0 B270                        ; Rotate fourth axis to 270°
  G81 X1 Y0 R0.1 Z-.5            ; Drill fourth hole
  G80
  M5                             ; Stop spindle
  M25                            ; Rapid Z to home

Single-axis feedrate moves in Intercon

You can also program feedrate (cutting feed) moves on the rotary axis, using Intercon's normal Linear Mill operation.

The feedrate for a rotary-axis cut is in degrees per minute. You can calculate the required degrees per minute if you know the inches per minute you want to cut at, and the diameter of the part you are cutting on. Simply multiply the feedrate in inches per minute by 114.6 (which is 360/π), then divide by the part diameter.

You can convert linear (inch) distances around the outside of a cylinder into angular (degree) distances on the rotary axis in the same way.

To Insert a Linear Mill operation on the rotary axis press F2/Linear. The same rotary angle fields that you saw in Rapid and Rotary moves will appear at the bottom of the page. Ignore the X, Y, and Z fields. Enter your calculated feedrate (degrees per minute) on the Feedrate line. Enter the rotary axis angle or distance in the Rotary Axis fields as before (degrees/minutes/seconds or decimal degrees).

Single-axis feedrate moves in G code

In G code, you can do feedrate moves on the rotary fourth axis with G1 (linear) moves. It is just like any other axis, except that distances are in degrees and feedrates are in degrees per minute.

For example, to cut a 1" square outline 0.1" deep in the surface of a 2" diameter cylinder, cutting at 12 inches per minute:

  Feedrate is 12.0 * 114.6/2.0 = 687.6 deg/min.

  A 1" distance around a 2" diameter cylinder is 1.0 * 114.6/2.0 = 57.3°

  M6 T2                          ; Tool change, load tool 2
  M3 S2000                       ; Start spindle, 2000 RPM
  G0 X1 Y0 Z.1 B0 G43 H2         ; Rapid to clearance, 0°
  G1 F6 Z-.1                     ; Plunge to cut depth
   F12 X2                        ; Move X across bottom of square
   F687.6 B57.3                  ; Move B up right side
   F12 X1                        ; Move X across top
   F687.6 B0                     ; Move B down left side
  G0 Z.1                         ; Rapid clear
  M5                             ; Stop spindle
  M25                            ; Rapid Z to home

Multi-axis interpolated moves in Intercon or in G code

You can also do feedrate moves which combine rotary axis movement with linear axis movement. These moves too are programmed like normal linear moves. However, the formula for calculating the combined inch/degree feedrate is a little more complicated.

If we define:

Fcomb = Combined inch/degree feedrate to use in our program
Finch = Desired cutting feed over the part in inches/minute
dX = Distance in inches we are moving along X (or X, Y and Z combined)
dB = Distance in degrees we are moving along the B (rotary) axis
D = Diameter of the part (use maximum diameter if Z is moving)

Then the feedrate can be calculated as follows:

Fcomb = Finch * sqrt((dX2+dB2)/(dX2+dB2*(D*π/360)2))
i.e.

For example, the G codes to cut a 2" wide, 2" high diamond on the surface of a 2" cylinder would be:

  Feedrate is 12.0 * sqrt((12+57.32)/(12+57.32*(2*π/360)2)) = 486.3

  M6 T2                          ; Tool change, load tool 2
  M3 S2000                       ; Start spindle, 2000 RPM
  G0 X2 Y0 Z.1 B0 G43 H2         ; Rapid to clearance, 0°
  G1 F6 Z-.1                     ; Plunge to cut depth
   F486.3 X3 B57.3               ; Move up and right
    X2 B114.6                    ; Move up and left
    X1 B57.3                     ; Move down and left
    X2 B0                        ; Move down and right
  G0 Z.1                         ; Rapid clear
  M5                             ; Stop spindle
  M25                            ; Rapid Z to home

Inverse Time

Alternately, you can use the G93 inverse-time feedrate mode.

In G93 mode, your programmed feedrate should be the number of moves (G code lines) to complete per minute. In other words, the feedrate is the reciprocal of the time required to complete each move segment.

If every segment (G1 move in the sequence) covers the same distance across the part, then a single feedrate value can remain in place over all of the lines.

More commonly, the post-processor still needs to calculate a unique feedrate value for every line. G93 mode just saves the extra step of accounting for the angular distance.

By default, G93 mode uses feedrates in lines per minute. However, if you set bit 3 of Machine Parameter 56 (adding 8 to the parameter value), then G93 inverse-time feedrates will be in lines per second. This results is smaller numbers, and therefore a shorter CNC program file.

G93 mode was added in CNC10 version 2.36, released in 2007.

Automatically Calculating Feedrates

If all that sounds like too much math, you can purchase my rotary axis conversion software which will automatically translate an XYZ program into a cylindrical program, substituting rotary movement for either Y or X, and calculating the correct feedrate for every line.

Unwinding the rotary axis

If you run jobs with continuous rotation, you will want a fast and simple way of resetting the rotary axis to zero turns.

Suppose your program starts at B0, and works its way around 100 turns to complete the part. If you leave the B axis sitting at B36000 and start the cycle over, it will probably want to "unwind" those 100 turns before it can start the first cut.

You could just go to the Part Setup screen (F1/Setup, F1/Part) and reset the rotary axis to a position of 0.0, but that is an extra step every time you run the program. It will also give you a surprise next time you cycle the power and home the machine: the control will remember that the B axis part zero has been reset several hundred turns away from its machine home position, so immediately after homing the DRO will display (minus) all those turns.

A better solution is to have your part program reset both machine home and part zero at the end of the cycle. Add two lines to the end of your program, similar to the following:

  M26/B
  G92 B0
If you are programming in Intercon you can do this with Intercon's Insert M&G Code option, on the F6/Other menu. If you generate your programs with a CAD/CAM system, you should see about adding the codes to your post processor so they are included automatically.

These commands will reset and re-zero the rotary axis wherever it may sit, without regard to its angle from the previous home position or part zero.

If it is important for you to maintain part zero (e.g. you are using a fixture that is level at B0.0), be sure to program it to move the remaining distance to a whole number of turns (to a whole multiple of 360.0) before issuing the reset commands above.

If it is important for you to maintain machine zero (homed position) on the rotary axis as well, and it is not the same as part zero, then you will either need some more advanced codes, or you can just repeat the rotary axis operations from your homing macro file (CNC7.HOM or cnc10m.hom). The most typical example would be:

  M91/B
  M26/B
In this case the G92 is not needed. The M91 move goes back to the home switch, just as it did on initial homing after power-up; and the M26 sets home there.

In rare cases, you may need to reset a rotary axis in the middle of a program cycle, rather than just at the end. This would occur if there was a chance of exceeding 231 (about 2.1 billion) encoder counts on the rotary axis servo during the job. To estimate whether you need to worry about this, divide 2.1 billion by your encoder counts per turn, motor turns per degree, and 360 degrees per revolution. For example, a rotary table with an 8000-count encoder and 90:1 gearbox (0.25 motor revs per degree) could go slightly less than 3000 turns before needing to be reset with an M26.

       231
   ----------------- = 2982.6
   8000 * 0.25 * 360

If you do put M26 and/or G92 in the middle of your program, or even just a G92 at the beginning, be aware that this will have side effects when you use the Centroid control's Search and Resume features.

How G92, G52 and M26 work, and how they don't work with Search and Resume

Engraving on a cylinder in the rotary axis using MillWrite

MillWrite can wrap your engraved text around a cylinder, converting X or Y movement into rotary fourth axis movement. MillWrite will automatically calculate the correct combined feedrate for each move.

To engrave text using the rotary axis:

  1. Program the text you want to engrave, just as if you were going to engrave it on a flat surface.
  2. Press ESC for the MillWrite menu
  3. Press G to Generate NC codes
  4. Press 4 for 4th axis engraving
  5. MillWrite will display the following dialog:
            +--+Specify 4th Axis Engraving+--+
            ¦                         OK!    ¦
            ¦      Axis to convert: X        ¦
            ¦    Radius at surface: 0.0000   ¦
            ¦    Reverse direction? No       ¦
            ¦     Controller model: Fanuc 10M¦
            ¦  Letter for 4th Axis: A        ¦
            ¦Segment size for arcs: 0.0100   ¦
            +--------------------------------+
       
  6. "Axis to convert" is the axis which will be replaced by fourth axis movement. If your rotary table axis is aligned left and right, choose Y (because rotation is equivalent to Y axis movement).
  7. "Radius at surface" is the radius (not diameter!) of the cylinder you are engraving on.
  8. "Reverse direction" selects whether positive Y axis movement corresponds to positive or negative rotary axis movement. If your engraving comes out mirrored, try changing this setting.
  9. "Controller model" should be Fanuc 10M. Any other choice (e.g. Fanuc 11 or Fadal) will result in incorrect feedrates.
  10. "Letter for 4th Axis" should be your fourth axis label (e.g. B or W).
  11. "Segment size for arcs" is the length of the short straight lines MillWrite will use to approximate curves. 0.010" is a good starting point.
  12. When you have set each of these values, arrow back up to the top line ("OK!") and press Enter.
  13. MillWrite will generate the engraving G codes. If the program is short enough, it will show you the codes in its text editor: press Ctrl-F10 to save the G codes to a CNC file on your control's hard drive, then press ESC, Q to quit the editor and return to the engraving screen. If the program is too long to fit in the text editor, MillWrite will immediately prompt you for a filename to save, and will automatically return to the engraving screen.
  14. Press ESC for the MillWrite menu
  15. Press X to exit back to the Centroid control.

MillWrite will place the zero coordinate of the replaced axis (e.g. Y0) at the zero degree position on the rotary axis.

MillWrite will not include any codes to move the replaced axis. You should jog that axis over the center line of the cylinder (center line of the rotary table) before you begin the job.

Optionally, you could edit the resulting G codes to include a rapid move over the centerline (e.g. Y0) at the beginning of the job. Be sure to then set your Y axis part zero over the rotary axis centerline.

Back to on-line tutorials page

CNC Services Northwest Home

Copyright © 2023 Marc Leonard
Last updated 27-Jan-2023 MBL