John,
Here us a subroutine I wrote to cut a scroll.
#<_xorigin>, and #<_yorigin> are the center of the scroll. Basically it changes
the radius of the circle every ¼ turn.
(Subroutine to cut spiral in)
(o<SpiralIn> call [X] [Y] [Depth] [Stepover] [Radius])
o<SpiralIn> sub
(#1 is X center)
(#2 is Y center)
(#3 is Z plunge depth)
(#4 is the stepover amount )
(#5 is the ending radius )
(#<curstep> is the amount to increment start of the next loop)
#<XOrg> = #1
#<YOrg> = #2
#<Depth> = [0-#3] ( Depth of cut )
#<stepover> = #4 ( Size of stepover )
#<Rad> = #5 ( Starting Radius )
#<stepover4>=[#<stepover>/4] ( 1/4 of stepover )
#<curstep> = #<Rad>
G10 L2 P3 X[#<_xorigin>+#<XOrg>] Y[#<_yorigin>+#<YOrg>] Z#<_zorigin> ( Set the
Current Coordinate for G56 )
#<Zcut> = #<_close_Z> ( set Zcut to top of material )
G56 ( Select Coordinate system 3 )
G00 X0 Y[0-#<Rad>] Z#<_close_Z>
G01 Z#<Depth> F#<_xyfeed>
o<L1> WHILE [#<curstep> GT 0]
o<Cnd1> IF [[#<curstep> - #<stepover4>] GE #<stepover>]
G03 X0 Y[[#<curstep>-#<stepover4>]*[-1]] R[#<curstep>-#<stepover4>]
o<Cnd1> ENDIF
o<Cnd2> IF [[#<curstep> - [2*#<stepover4>]] GE #<stepover>]
G03 X[#<curstep>-[2*#<stepover4>]] Y0 R[#<curstep>-[2*#<stepover4>]]
o<Cnd2> ENDIF
o<Cnd3> IF [[#<curstep> - [3*#<stepover4>]] GE #<stepover>]
G03 X0 Y[#<curstep>-[3*#<stepover4>]] R[#<curstep>-[3*#<stepover4>]]
o<Cnd3> ENDIF
o<Cnd4> IF [[#<curstep> - #<stepover>] GE #<stepover>]
G03 X[[#<curstep>-#<stepover>]*[-1]] Y0 R[#<curstep>-#<stepover>]
o<Cnd4> ENDIF
#<curstep> = [#<curstep>-#<stepover>]
o<L1> ENDWHILE
G0 Z#<_close_Z>
G55
o<SpiralIn> endsub
Alan
> From: "John Dammeyer" <[email protected] <mailto:[email protected]>>
> Subject: [Emc-users] Carving a spiral
> Date: April 10, 2024 at 12:55:36 AM CDT
> To: "Enhanced Machine Controller \(EMC\)" <[email protected]
> <mailto:[email protected]>>
>
>
> A friend and I have been discussing exactly how to write the G-Code to
> create a spiral scroll.
>
> His rotary table 90:1 reduction with a 1600 micro-step motor could be set up
> to move N steps for each step of the X axis to create the spiral. But that
> approach seems clumsy.
>
> Say I wanted to cut a scroll with a 6mm pitch using a 3mm cutter.
>
>
>
> Without using G2 or G3 it's really just a triangle isn't it? Move rotary
> table distance A and move X axis distance A'. Do it in small enough
> increments and you get a spiral. But I feel like I'm missing something
> really simple.
>
>
>
> Suggestions?
>
> Thanks
>
> John
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users