Quote:
Originally Posted by
AMG Guitars
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.
Quote:
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
Quote:
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.
Quote:
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.
Quote:
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.
Quote:
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. :)