547,633 active members*
2,953 visitors online*
Register for free
IndustryArena Forum > General Manufacturing Processes > Milling > Wizard for milling a knurl using A-axis
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009

    Wizard for milling a knurl using A-axis

    Having finally added an A axis to my little CNC mill I've been looking for things it can do and got interested in knurling. Here's an example I did with a program I developed.
    Attachment 469790
    Attachment 469792

    I started off thinking of writing a Mach3 wizard, but it isn't obvious how to do that and anyway I didn't want to write something that wasn't portable between machines. So eventually wrote it in Python which runs on many computers such as PCs, Macs, Linux machines including R-Pi, etc. I've attached a copy of the Python code - note that to use it you need to change the .txt extension to .py to open in an editor/debugger (I use Thonny which is free). Also I've attached a copy of a g-code file it generates. I wrote this to run on Mach3 but it should be portable - any incompatibilities people find please let me know and I'll try to fix. It could be made much shorter using a subroutine but the in-line g code will run on controllers such as GRBL that don't support them.

    A couple of restrictions. It is best to make the number of circumferential "teeth" prime - in the example it's 37 around a 12.7mm diameter. This gives a "diamond pitch" of ~1mm. Also the length of the knurl should be given as an integer number of diamonds - in this case it's 10 so the length is ~10.8mm. If you don't choose a prime then at least the length and number of teeth should be co-prime, i.e. have no common factors greater than 1.

    Program X zero should be the start of the knurl, Y zero the A axis, Z zero the machine table.

    The tool I used is a 90 degree engraving cutter run at 6000 rpm, the maximum the machine will do. This limits the feedrate but it could probably be cut faster with a high speed spindle. This is on brass.

    At the moment the auto-calculated cutting depth is possibly slightly too deep, I need to understand the geometry of the diamond-shaped pyramids better I think.

  2. #2
    Join Date
    May 2009

    Re: Wizard for milling a knurl using A-axis

    Following a few useful comments on another website I attach a revised version and an example output. The main differences here are -

    - the space the previous version inserted between the g-code word and the value - e.g. "G00 X 5" is suppressed in case any controllers expect to see no space.
    - the comment on each line of the "zigzag" portion of the file is more user friendly, going from 1 to N rather than 0 to N-1 and appears in both lines of a given zigzag.
    - the method used to write to the output file is 'w' rather than 'a' which means that if a file is re-used it is overwritten rather than the new g-code being appended at the end. Mind you re-using a file is not recommended!

  3. #3
    Join Date
    May 2009

    Re: Wizard for milling a knurl using A-axis

    Yet another update, this time to correct the formula for the cut depth which was slightly too deep.

Similar Threads

  1. help with pocket milling wizard
    By rccars4sal in forum Mach Wizards, Macros, & Addons
    Replies: 0
    Last Post: 01-09-2019, 05:12 PM
  2. Question on Thread Milling Wizard
    By pickled in forum Tormach PathPilot™
    Replies: 5
    Last Post: 09-26-2015, 10:03 AM
  3. is there a thread milling wizard in the tomrach mach?
    By 300sniper in forum Tormach Personal CNC Mill
    Replies: 13
    Last Post: 03-11-2010, 08:31 PM
  4. knurl on a solid?
    By elmi in forum BobCad-Cam
    Replies: 9
    Last Post: 04-06-2008, 02:17 AM
  5. knurl
    By larry53 in forum General MetalWork Discussion
    Replies: 5
    Last Post: 11-14-2005, 04:08 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