Re: spiral circular coding
Quote:
Originally Posted by
cal44walker
I cannot get the tool to move inwards in an ever tightening circular pattern.
A move like that will consist of many segmented arcs each with a reducing radii and not a singularly described arc. I'd be hard pressed to program that manually without CAD/CAM. A simple helical arc of constant radii moving in -Z no problem, but not what you're after.
Dave
Re: spiral circular coding
I suggest your problem is that you are working in IJ mode. I use R mode and have no trouble at all. Um - I also use subroutine calls, which makes it even easier, and parameters - can Fanuc handle parameters?
But anyhow, for a major diameter of 2 (R1) and a minor diameter of 1 (R0.5), step 0.25, centred on 0,0, cutter diameter 0 (zero!, just to illustrate)
g0 z10 % way up in air
g0 x1 y0 % RHS of hole
g0 z0 % down to surface
g2 x-1 y0 r1 z-0.1 % 1st half of outer circle
g2 x1 y0 r1 % 2nd half
g2 x-0.875 y0 r0.825
g2 x0.75 y0 r0.75
g2 x-0.625 y0 r0.625
g2 x0.5 y0 r0.50
g2 x-0.5 y0 r0.50
g2 x0.5 y0 r0.50
m30
Cheers
Roger
Re: spiral circular coding
Quote:
Originally Posted by
RCaffin
I suggest your problem is that you are working in IJ mode. I use R mode and have no trouble at all. Um - I also use subroutine calls, which makes it even easier, and parameters - can Fanuc handle parameters?
But anyhow, for a major diameter of 2 (R1) and a minor diameter of 1 (R0.5), step 0.25, centred on 0,0, cutter diameter 0 (zero!, just to illustrate)
g0 z10 % way up in air
g0 x1 y0 % RHS of hole
g0 z0 % down to surface
g2 x-1 y0 r1 z-0.1 % 1st half of outer circle
g2 x1 y0 r1 % 2nd half
g2 x-0.875 y0 r0.825
g2 x0.75 y0 r0.75
g2 x-0.625 y0 r0.625
g2 x0.5 y0 r0.50
g2 x-0.5 y0 r0.50
g2 x0.5 y0 r0.50
m30
Cheers
Roger
Hello Roger,
I don't believe what you have there does what you think it does, nor does it correctly answer the OP's request. The closest thing I could come up with that works along the lines of your code is this. I'll use R as you did.
G0X0.Y0.Z0.1
X1.
G1Z-0.1F20.
G2X-1. Y0. R1.
X1.Y0.R1.
X-0.875 Y0. R-0.9375
X0.75 Y0. R-0.8125
X-0.625 Y0. R-0.6875
X0.5 Y0. R-0.5625
X-0.5 Y0. R0.5
X0.5 Y0. R0.5
G0Z0.1
M30
The following is what I described above and does as the OP wishes.
Sorry this is in inches whereas I believe the OP is metric. No Comp. Once around the major (1.0) and minor (0.5) diameters and four times around to get from major to minor. This is for a machine that needs two lines of code for a circle. Only affects the first and last couple lines.
With R.
T1M6 (END MILL OF CHOICE)
G17G20G40G49G54G80G90G98
G0X1.Y0.
G43Z0.1H1S2750M3T2
M8
G1Z-0.1F20.
G2X-1. Y0.R1.
X1.R1.
X0.1638 Y-0.9581 R0.9856
X-0.869 Y-0.3733 R0.9589
X-0.4496 Y0.7988 R0.9314
X0.7457 Y0.4791 R0.9012
X0.5578 Y-0.652 R0.872
X-0.5746 Y-0.5967 R0.8429
X-0.6832 Y0.4192 R0.8144
X0.244 Y0.7355 R0.7882
X0.7262 Y-0.1692 R0.7608
X-0.1854 Y-0.689 R0.7293
X-0.6532 Y0.195 R0.6976
X0.2355 Y0.6046 R0.6653
X0.5478 Y-0.281 R0.6321
X-0.3685 Y-0.4488 R0.5987
X-0.2366 Y0.4856 R0.5605
X0.5 Y0.R0.52
X-0.5 R0.5
X0.5 R0.5
G0Z1.
M9
M30
To be of further use, this code was generated in BobCAD V20 using it's Spiral Pipe Thread functionality. You enter a major and minor diameter, number of turns, and can even give it some Z height if you want, and it creates an ever shrinking tool path created of arc segments. You take your major minus your minor, divide that by your preferred width of cut per rotation, enter the into "turns," and generate miles of code in an instant. Couldn't be easier. You can also go small to big if you want.
Dave
Re: spiral circular coding
@Dave
Yes, this does require that the controller be able to handle g2/g3 commands, and yes, I know some older controllers can not.
All 3 programs work, and create a spiral cut. The point of my program was solely to demonstrate how to use the R mode with G2: whether it was exactly what the OP was looking for is another matter. It was written off the top of my head in a few minutes, without any CAD or CAM, and indeed was not optimal. No matter: it works as a demo.
Happy Cutting
Roger
Re: spiral circular coding
Fanuc has also a good macro language in which you can implement a spiral feature from R1 (external) to R2 (internal) with a desired step.
Here a simple example:
Code:
G17 G21 G40 G49 G80 G90 G91.1 G94 G98
G54
G0 Z20
X0 Y0
G65 P1000 X0 Y0 R10 Z-10 A30 B10 C5 F1000
G0 Z20
X80 Y0
G65 P1000 X80 Y0 R10 Z-10 A30 B10 C2 F1000
M2
; Spiral motion from R1 to R2 with increment
;
; X #24 X of spiral center
; Y #25 Y of spiral center
; R #18 Retract height
; Z #26 Z plane to reach
; A #1 External radius R1
; B #2 Internal radius R2
; C #3 Spiral increment for turn
; F #9 Feed to cut
O1000
; moves to R1 (external radius)
G0 Z#18
G0 X#24 Y#25
G91 G0 Y#1
G90 G1 Z#26 F#9
; first full circle
G2 J-#1
; spiral loop from R1 to R2
#<quantum>=1
#<turns>=[FUP[[#1-#2]/#3]]
#<iters>=[360*#<turns>/#<quantum>]
#<i>=0
#<v>=#1
WHILE [#<i> LE #<iters>] DO01
#<x>=[#24+#<v>*[SIN[#<i>]]]
#<y>=[#25+#<v>*[COS[#<i>]]]
G1 X#<x> Y#<y>
#<i>=[#<i>+#<quantum>]
#<v>=[#<v>-[[#1-#2]/#<iters>]]
IF [#<v> LT #2] THEN #<v>=#2
END01
;latest full circle
G2 J-#2
G0 Z#18
M99
The macro 1000 create a spiral from R1 to R2 with an increment step
The macro uses named parameters (#<v>) instead of #100, #101, etc
to be more simple to read.
In your fanuc if not supported the named parameters you have to change them
with normal parameters #n.
Final result:
https://www.cnczone.com/forums/attac...d=429564&stc=1
1 Attachment(s)
Re: spiral circular coding
A Fanuc compatibile macro version:
Code:
G17 G21 G40 G49 G80 G90 G91.1 G94 G98
G58
T1 M6
s2000 M3
G0 Z20
X0 Y0
G65 P1000 X0 Y0 R10 Z-10 A50 B20 C5 F1000
G0 Z20
M2
; Spiral motion from R1 to R2 with increment
; X #24 X of spiral center
; Y #25 Y of spiral center
; R #18 Retract height
; Z #26 Z plane to reach
; A #1 External radius R1
; B #2 Internal radius R2
; C #3 Spiral increment for turn
; F #9 Feed to cut
O1000
; moves to R1 (external radius)
G0 Z#18
G0 X#24 Y#25
G91 G0 Y#1
G90 G1 Z#26 F#9
; first full circle
G3 J-#1
; spiral loop from R1 to R2
#80=1
#81=[FUP[[#1-#2]/#3]]
#82=[360*#81/#80]
#83=0
#84=#1
WHILE [#83 LE #82] DO01
#85=[#24+#84*[SIN[#83]]]
#86=[#25+#84*[COS[#83]]]
G1 X-#85 Y#86
#83=[#83+#80]
#84=[#84-[[#1-#2]/#82]]
IF [#84 LT #2] THEN #84=#2
END01
;latest full circle
G3 J-#2
G0 Z#18
M99
https://www.cnczone.com/forums/attac...d=429750&stc=1