509,680 active members
3,859 visitors online
Register for free
Login
Results 1 to 9 of 9
  1. #1

    4th axis tapping

    This has to be the right spot to talk about gcode programming. Planning a 4th axis build with servo.

    I'd like to program the 4th as if it were a spindle to rigid tap. I'll probably be laying it out along the Y with the spindle+ and tailstock-. Of course there won't be a tailstock because I'll be rigid tapping up that direction positively towards the spindle or 4th axis, if you will.

    I can program to tap in this orientation but the code gives spindle commands, not rotary commands. What I want is to mount a tap on my Z in a holder and run it axially into the 4th.

    Everything is servo closed loop. So I don't see why this shouldn't be possible.

    So how do I convert this drill/tap cycle to switch the spindle with the 4th axis?

    (Tool diameter 0.25)
    G00 G40 G49 G80 G90
    X0. Y0. Z0.
    T1 M06
    G00 G90 Z.25
    G0 X0. Y0. S0060 M3
    Z.1
    G1 Z-.5 F3
    G0 Z.1
    Z.25
    M05
    M30

    G80 seems to refer to a cancelled canned drill cycle.
    No tp for Mr Cornholio? Tool Plane missing in action?
    The spindle speed of 60 rpm matches the feed rate of 3 ipm. That's cool but rotary commands are usually given in degrees.
    60rpm/20threads per "=3"per minute.
    Wow what a formula! Maybe it's just me, but that's about all I could find on this subject of rigid tapping using a fourth axis instead of a spindle.

    And then there's the Diameter 0.25x pi = 0.7854 Circumference thing. I just don't know the proper way to can this.

    There's no reason I shouldn't be able to rigid tap using a fourth axis instead of a spindle to do so.

    Doesn't everybody? Especially those without servo encoders on their spindles?

    So that's my dilemma and I'm pretty surprised that there's not a lot of information about this. Card here to John Saunders.
    Still waiting on that ground breaking video man!

    But seriously thanks,
    Alex
    I'm pretty sure there's a simple solution to this that a lot of people could benefit from.

  2. #2
    Member
    Join Date
    Jun 2015
    Posts
    2874

    Re: 4th axis tapping

    hy i dont think i really understood what you are after ...

    ... you are builinding a cnc ?
    ... or you have one that does not perform as you wish ?
    ... or it can perform, but you need help to program it ?

    the simple solution for cnc's without servos, or with lagging servos ( good for turning, but not reliable for threading ) is to use a holder with floating length

    sometimes it may be needed to stop the machine before the tap reaches the end; for example, if there is a blind hole, then manually rotate the spindle so to help stopping the tap at a nice position, without breaking it

    if you wish to thread like a boss, without stopping the spindle, then you will need a special holder, that will protect the tap when the rotation continues after it has reached the bottom



    that was a random kind of answer; i dont understand exactly what you wish for / kindly !
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  3. #3

    Re: 4th axis tapping

    I want to use a fourth axis for rigid tapping. To be more specific, rigid tapping defined as synchronized turning of the fourth axis and linear motion of the Y axis, which will have a tool holder with a tap fixed in it. The tap doesn't turn. The 4th axis does. The y axis pushes the tap into the stock which is being rotated by the 4th axis.
    So there's the 4th axis which only rotates, and the Y axis which only moves in a straight line.

    What would the code be to run the tap in and out 1/4" deep using a #1/4-20 right hand thread tap?

    The motors for the 4th axis and the Y axis are both servos and the controller is closed loop.

    People define rigid tapping a multitude of different ways. For this scenario there is only one definition. Rotary axis servo control and linear Y axis servo control. This is a 2axis interpolated (simultaneous) move, in with the tap and back out again with the tap. The Y axis moves the tap in and out of the stock, and the 4th axis rotates the stock while the tap goes in, and then rotates the other way as the tap goes back out.
    So in this specific case, what's the code look like?

    There are also numerous ways to tap. In this instance there is only one. I'll be using a tap fixed securely to the Y axis using a tool holder. The tap doesn't move. The tool holder doesn't move. It is not a floating tap head. It simply holds the tap. The only way the tap moves is if the Y axis moves, and it only goes in a straight line.
    The 4th axis acts very much as if you screwed a nut on the tap as the tap is advanced along the Y axis toward the center of the rotary axis.

    Now what don't you get about that?

    Just picture tapping with a lathe. It's pretty much the same thing. Driving a stationary tap in and out of the stock being held by the chuck and the chuck has a synchronized rotary motion rotating one way as the tap goes in, and the other as the tap goes out.

    The only difference is instead of using a spindle on a lathe, I'll be using a fourth axis to hold my stock. Because of this difference the code is different.

    I won't be programming spindle speed. I'll be programming a rotary axis in degrees of rotation.

    These are servo motors. They start when I tell them to and they stop when I tell them to. They follow a predetermined flight path and they accelerate and decelerate on a predetermined curve determined me

    I can make 2axes start, accelerate, decelerate, and stop simultaneously. One of those axes is rotary, the other is linear.

    So what's the code look like to tap like this?

  4. #4

    Re: 4th axis tapping

    You are going to have to get a little deep into the math weeds here. You need to tell the A axis to rotate 360° for every lead increment. So in the case of a 1/4-20, you need to move the Y axis 0.05 (1/20) for every 360° of A axis rotation. This will work if you can get coordination motion between the Y and A axis.

    Let's take the case of the 1/4 -20 x 0.25 deep

    0.25 = 5 (0.25/0.05) rotations of the A axis (1800°) and a Y move of 0.250

    The G-code would look like this

    G1 Y0.25 A1800 F0.5 (TAP MOVE)
    G1 Y0.0 A0.0 F1.0 (RETRACT)

    Now can you actually make this work? I dunno.
    Jim Dawson
    Sandy, Oregon, USA

  5. #5
    Member
    Join Date
    Jun 2015
    Posts
    2874

    Re: 4th axis tapping

    hy guitar if i get it right, you are building a cnc ( or something ), and you wish for a code sample, that delivers syncro rotary+linear ?

    if i may, why do you need that sample ? you wish to know about how this motion is implemented, so to use it as a reference ? try to make it better ? or you may think that if you dont receive such a sample, you may develop a programing way that is not common ?

    i just try to understand what you are after

    ooookeeeey / good

    now i will write a code that syncs "degrees" & "mm" on okuma lathes; this code will allow a stationary tap to cut half a pitch by editing the code even futher, it can deliver whatever depth is desired

    code is tricky, thus i have to fool the control, to make it believe that there is a rotating tool, because tapping by using the degress on the rotary axis is not default

    also, in this mode, is not possible to go over 200 rpm, or to issue an absolute rotation >=360, so threshold limit is 360-1/1000; even if such limitations do not allow smooth & continuous tapping, this code will tap

    Code:
    
        NOEX V1 = 350 ( o/min )
        NOEX V2 = 0.2 ( mm/o ; so far there is a linear speed of 350 * 0.2 = 70 mm/min )
    
      ( * )
    
        M110      ( degrees mode enabled )
        SB=V1 M13 ( spindle behind tap starts to rotate; however, the tap is inside a stationary holder )
    ..( next line takes as input the desired feed of 70mm/min, and converts it to a value compatible with the rota&linear sync code )
    ..( in the end, the linear axis will move with 70mm/min, but the feed value will not be 70 )
        CALL OFFCZ LV01=10 LV02=pitch/2 LV03=360/2 LV04 = V2 (  LV01=10 is there to fool the machine )
        G65.......( accuracy control enabled; it controls the tolerance of the start & end point positions, but not he smoothness of the movement between them )
        G01 G91 linear_axis=pitch/2 rotary_axis=360/2 feed=LVCZ
        // more lines : futher tapping + retreat move
        G64.......( accuracy control disabled )
        M12       ( stoping the spindle behind the tap )
        M109      ( degrees mode disabled )
    M02
    
    OFFCZ ( feed 4 CZ )
          ( X ** dz ** dc ** f_G95 )
    
      NOEX LV01 = LV01 * LV01
      NOEX LV03 = LV03 * LV03
      NOEX LV05 = LV02 * LV02 * 129600
      NOEX LVCZ = SQRT [ [ LV05 + 250000 * LV03 ] / [ LV05 + LV01 * LV03 * 9.8696044 ] ] * LV04
    
    RTS
    so far, is it ok ? kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  6. #6

    Re: 4th axis tapping

    Thanks Jim,
    I kinda thought it would look something like that.
    I usually don't program code longhand, so I'm just learning at this. I'm trying to understand the code. So assuming that the tap is in position at the mouth of the hole;

    G1 Y0.25 A1800 F0.5 (TAP MOVE)
    This line orders the tap 0.25" in at a feed of 0.5 ipm while simultaneously ordering 5 rotations of the stock. Therefore theoretically any feed rate can be used (if the machine is capable) so long as the Y distance exactly matches the number of rotations. I think I get it!

    So for a 1" deep 1/4-20 (which has 20 tpi) the code looks like;
    G1 Y1 A7200 F(can be set in program or control)
    It's just that simple!
    Now you put your F command after the A command. Is that so that both moves become synced, start and end that is?

    I wonder how acceleration will play into this. I can adjust accel at the controller but don't know of a specific g code to stipulate.

    This is like getting inside a barrel for me. I'm guessing that since feed rate can be arbitrary, acceleration doesn't matter so much either. Both axes will be up to speed simultaneously and therefore slow down and stop simultaneously as well.
    G1 Y0.0 A0.0 F(set to whatever)
    This second line would be the same for virtually any scenario. It appears to me that the first line is the important one as it lays out threads per inch.

    I think this method can be used to run a die to cut outside threads as well. All you really have to program is the tpi which you simply multiply by 360 and the length of your thread (which is your linear Y move) to program your A.

    So the formula looks like this:
    tpi x 360 x depth of thread = A

    OK I get it.
    Now what would the code look like if A were to be programmed as a linear move?

    Now the OD (or major diameter) of a 1/4-20 tap is 0.25". So times pi gives a circumference of 0.78539816.

    The controller must be set for axis substitution, I think, for this to work.

    G1 Y1 X15.7079632 F(set at control)
    G1 Y0 X0

    The formula would be:
    Major diameter x pi x tpi = rotary axis linear move

    I'm not sure how to set the rotary up on my controller. I can tick anything, and everything like this:
    Rotary Axis [ ]X [ ]Y [ ]Z [ ]R [ ]None
    There's no documentation for this!
    I'm guessing I'll mostly leave this at R. But for axis substitution if I was to post a linear rotary move I would check X, (and R?)

    There must be a reason for the A axis scale factor. I'm guessing it's for linear rotary moves. Otherwise if degrees are given, I'm assuming degrees is the normal default when only R is checked.

    I'm guessing that linear moves are required for wrapped up code around a specific diameter cylinder. In that case X or Y would be checked and the scale factor would then spring into effect.

    Perhaps it doesn't matter and the options are only when there is a physical connection or substitution with the wiring.

    Otherwise if there are 4 amps and 4 motors then the only thing ticked should be R?

    I'm just trying to sort this all out before I have the hardware. That way I'll be a step ahead of the game when I try and make this thing work.

    Thanks,
    Alex

  7. #7

    Re: 4th axis tapping

    Deadly kitten,
    My machine has a Porter Cable router on it. There's no reverse. So to do threads on my machine I have to:
    1) Use a thread mill
    2) Use a fourth axis

    My project is to fabricate a 4th axis and put it on my machine. There's complications with that. I don't really want to gut my machine to add this capacity.

    I'm asking about programming to get a head start in this endeavor because there are specific things I'd like to be able to do with this accessory.

    I've never driven a 4th axis yet. I'm just asking about it to minimise surprises. That way when I do have it all together, it will function as expected.

    So I'm blazing a trail into unknown territory and if I have it all planned out ok hopefully, the thing will work.
    Thanks for your interest. When it all comes together I'll probably post a video or something. This is quite a challenge for me.
    Alex

  8. #8

    Re: 4th axis tapping

    Quote Originally Posted by AMG Guitars View Post
    Thanks Jim,
    I kinda thought it would look something like that.
    I usually don't program code longhand, so I'm just learning at this. I'm trying to understand the code. So assuming that the tap is in position at the mouth of the hole;

    G1 Y0.25 A1800 F0.5 (TAP MOVE)
    This line orders the tap 0.25" in at a feed of 0.5 ipm while simultaneously ordering 5 rotations of the stock. Therefore theoretically any feed rate can be used (if the machine is capable) so long as the Y distance exactly matches the number of rotations. I think I get it!
    I just picked the feed rate out of the air. As you say, the feed rate could be anything a machine was capable of. It's the ratio of the A axis to the Y axis that is important. Normally you would electronically ''gear'' the rotary axis and the linear axis together at the correct ratio for the TPI, with the rotary axis acting as the master axis.

    So for a 1" deep 1/4-20 (which has 20 tpi) the code looks like;
    G1 Y1 A7200 F(can be set in program or control)
    It's just that simple!
    Now you put your F command after the A command. Is that so that both moves become synced, start and end that is?

    I wonder how acceleration will play into this. I can adjust accel at the controller but don't know of a specific g code to stipulate.
    The location of the F command on the line has no bearing on anything. Most controllers read the line in pieces and just look for the required values without regard to the specific position. Now having said that if you use a G84 (tapping cycle) then the feed is the axis movement per rotation. This is normally used for rigid tapping on a milling machine using the Z axis and the spindle rotation, would work on a lathe also. So in the case 20 TPI the feed would be 0.05 or 0.05/spindle rotation. Rigid Tapping G84 Canned Cycle - CNC Training Centre

    This is like getting inside a barrel for me. I'm guessing that since feed rate can be arbitrary, acceleration doesn't matter so much either. Both axes will be up to speed simultaneously and therefore slow down and stop simultaneously as well.
    G1 Y0.0 A0.0 F(set to whatever)
    This second line would be the same for virtually any scenario. It appears to me that the first line is the important one as it lays out threads per inch.
    I may have made an error here, the line should read G1 Y0.0 A-1800 F1.0, this would properly unwind the A axis. Acceleration would not be a factor as long as it's within the range that the machine can handle.

    I think this method can be used to run a die to cut outside threads as well. All you really have to program is the tpi which you simply multiply by 360 and the length of your thread (which is your linear Y move) to program your A.

    So the formula looks like this:
    tpi x 360 x depth of thread = A

    OK I get it.
    OD threads with a die would be handled the same as ID threads with a tap.

    Now what would the code look like if A were to be programmed as a linear move?

    Now the OD (or major diameter) of a 1/4-20 tap is 0.25". So times pi gives a circumference of 0.78539816.

    The controller must be set for axis substitution, I think, for this to work.

    G1 Y1 X15.7079632 F(set at control)
    G1 Y0 X0

    The formula would be:
    Major diameter x pi x tpi = rotary axis linear move
    I'd have to think about this for awhile. I'm not sure.

    I'm not sure how to set the rotary up on my controller. I can tick anything, and everything like this:
    Rotary Axis [ ]X [ ]Y [ ]Z [ ]R [ ]None
    There's no documentation for this!
    I'm guessing I'll mostly leave this at R. But for axis substitution if I was to post a linear rotary move I would check X, (and R?)

    There must be a reason for the A axis scale factor. I'm guessing it's for linear rotary moves. Otherwise if degrees are given, I'm assuming degrees is the normal default when only R is checked.

    I'm guessing that linear moves are required for wrapped up code around a specific diameter cylinder. In that case X or Y would be checked and the scale factor would then spring into effect.

    Perhaps it doesn't matter and the options are only when there is a physical connection or substitution with the wiring.

    Otherwise if there are 4 amps and 4 motors then the only thing ticked should be R?

    I'm just trying to sort this all out before I have the hardware. That way I'll be a step ahead of the game when I try and make this thing work.

    Thanks,
    Alex
    Unfortunately I have no idea how your control is set up. I have been working on implementing rigid tapping into my software so some of this stuff is fresh in my mind, at least as fresh as can be expected for an old guy.
    Jim Dawson
    Sandy, Oregon, USA

  9. #9
    Member
    Join Date
    Jun 2015
    Posts
    2874

    Re: 4th axis tapping

    Quote Originally Posted by Jim Dawson View Post
    I have been working on implementing rigid tapping into my software so some of this stuff is fresh in my mind, at least as fresh as can be expected for an old guy.
    hello Jim, so you also implement rigid tap, and build things ? it is nice

    i just wanna say that on an okuma mill, it is possible to choose between rigid and floating tapping : this targets different syncros qualities, for same specs, so if someone wanna input this functionality, than please consider, if possible, to edit the "frequency" for monitoring "diff", and maybe also the "threshold" value for "diff"

    i dont have exp with building stuff, so ... nice job guys kindly !
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

Similar Threads

  1. Tapping with Torus Pro and Reversable Tapping Head
    By MRM RCModels in forum Novakon
    Replies: 26
    Last Post: 02-01-2014, 01:47 PM
  2. Replies: 11
    Last Post: 11-27-2013, 11:00 AM
  3. Tapping w/90 Deg Head in X & Y-axis...
    By pwilson101 in forum General Metalwork Discussion
    Replies: 4
    Last Post: 01-22-2013, 09:22 PM
  4. Replies: 13
    Last Post: 07-04-2009, 12:43 AM
  5. tapping head vs hand/cordless tapping machine....
    By InspirationTool in forum Uncategorised MetalWorking Machines
    Replies: 6
    Last Post: 09-13-2005, 02:10 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •