585,927 active members*
3,189 visitors online*
Register for free
Login
Page 3 of 3 123
Results 41 to 44 of 44
  1. #41
    Join Date
    Jun 2010
    Posts
    4256

    Re: Dumb Thread mill question

    the way that "parameters are passed" between a program and a subroutine in Mach is to simply set global variables. This is Ok, I guess, but requires a tremendous amount of discipline on the part of the programmer,
    Yes. That is correct.

    At one stage in the programming world, quite some years ago, there was tremendous management enthusiasm for ego-less and programmer-free programming. The underlying reason for this was that management objected to paying for highly skilled programmers and wanted the whole thing dumbed down so they could employ cheap high school graduates - and still get reliable secure SW. It did not happen.

    But we still have this idea floating around that programining should not require skill. Tell that to the InfoSec industry, NASA or aerospace companies. Or to companies trying to create Autonomous Vehicles. Ha! Yes, skill is required to convert human ideas into machine language! If you don't have that skill, either learn it or resort to poking buttons on a Fanuc control panel. No apologies.

    I have already addressed your concerns about stomping on local variables. I DEFINE my variables at the start of the program, not just with a value (like 25.0 mm), but also in English, so I know what that variable is about. And I reserve some variables for local use within a subroutine. I assume that anything which had been stored in one of those variables in a different SR can be over-written in this SR. Yes, programing discipline is required. Without it you have machine crashes.

    I would never write something as obscure as G0 G54 G90 X0. Y0. That is an abuse of the programmer's mind. I would write, with the comments shown
    G90 % absolute distance mode
    G54 % workspace 1
    G0 X0 Y0 % go to ...
    That way, when I come back to this program 4 weeks later, I can see at a glance what the program is doing - by reading the comments.

    Which is how I imagine you passing data from you main program to your subroutine.
    I can see how you get here, but basically, No. I do not define dimensional parameters that way, just before calling a subroutine. Parts dimensions are defined at the start of the program.
    That said, I do often define some control parameters just before calling a subroutine:
    #1= ... % Z travel for milling downwards
    #2=fup[#1/#20] % N passes downwards, each no more than #20 in depth
    #3=[#1/#2] % actual dZ for each pass, less than #20
    m98 p100 L#2 % machine downwards for N cycles
    Note that parameter #3 will be used inside the SR o100 to decrement the current Z each time.

    Is it all a matter of personal programming style? Yep.

    My 2c
    Cheers
    Roger

  2. #42
    Join Date
    Jun 2010
    Posts
    4256

    Re: Dumb Thread mill question

    An interesting sidelight on circles. Suppose we are at X10 Y0. We can draw a circle around the origin, radius 10, in two ways: with an IJ centre or with a radius R.
    G2 X10 I-10 J0 works fine
    G2 X10 R10 just sits there, as Mach3 knows we are already at X10 Y0.

    Which is why I break circle into 2 halves when using the R format.

    Cheers
    Roger

  3. #43
    Join Date
    Jul 2007
    Posts
    1602

    Re: Dumb Thread mill question

    Quote Originally Posted by nitewatchman View Post
    I hate to confuse the issue but.

    When I need to threadmill a hole, especially if it is an odd size like 2"-16, I will modify a high speed tap to use as a threadmill cutter.

    For this I would start with a 3/8"-16 tap and first cut off the incomplete threads from the end. All but one of the flutes are then ground away leaving a single cutting edge. I then load the cutter in a Darex end mill grinder and relieve the cutting edge until there is a small land left on the OD of the tap maybe 0.010"-0.020 wide. This removes the helix and allows the cutter to produce the thread form when rotated.

    Cut a lot more threads using these than commerical cutters including things like 5/8"-32 male and female parts.

    Gary
    Hi Gary,

    I am having trouble visualizing how you relieve the cutting edge. Any chance you could post a pic or two?

    thanks,
    bob

  4. #44
    Join Date
    Oct 2011
    Posts
    477

    Re: Dumb Thread mill question

    Sure I will try to get a good picture.To describe the relief, it is similar to the primary relief on an end mill flute. The idea is to create a hook cutting edge, reduce the helical nature of the flute behind the cutting edge and provide relief so the heel of the flute is not dragging. The thread form will not be prefect but then few things in life actually are. gary

Page 3 of 3 123

Similar Threads

  1. Question on thread mill program
    By JRTurner in forum G-Code Programing
    Replies: 3
    Last Post: 04-04-2013, 10:27 PM
  2. Fanuc 21 lathe thread mill question.
    By bman356 in forum G-Code Programing
    Replies: 1
    Last Post: 01-18-2013, 10:34 AM
  3. Bspt thread mill subprogram question
    By DetMach-EDM in forum Fanuc
    Replies: 8
    Last Post: 03-23-2012, 05:32 PM
  4. Dumb question, but not so dumb??
    By gixxergary in forum Haas Mills
    Replies: 5
    Last Post: 01-10-2012, 01:30 AM
  5. Dumb Question...
    By grasshorse in forum Uncategorised MetalWorking Machines
    Replies: 3
    Last Post: 06-28-2007, 05:15 PM

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
  •