587,203 active members*
3,081 visitors online*
Register for free
Login
Results 1 to 10 of 10
  1. #1
    Join Date
    May 2007
    Posts
    1003

    Need some suggestions on developing feedrates.

    Will ask here first, but probably on the General Forum shortly because I know this forum doesn't get much traffic.

    A little background:

    I have master programs for 10-32 UNJF-3A, 1/4-28 UNJF-3A, 5/16-24 UNJF-3A, 3/8-24 UNJF-3A, 7/16-20 UNJF-3A and 1/2-20 UNJF-3A families of studs. Some get a cross drill thru the thread, some thru the bearing diameter and a few thru the shank behind the thread. And in different combination's . Some no cross holes. I have separate subprograms written for holes thru the threads and bearing area for each size, and a couple subprograms for holes in different size shanks. Not all sizes as very few get drilled in this area.

    These were written several years ago. The past couple of years I have been teaching myself Macro B programing. Although these cross drill subprograms use variables for RPM, drill locations, and feedrates, I don't consider them Macro programs. The master programs use quite a few variables. Before I changed my cut-off subprogram I was using variables #100 to #142 in my master programs. Now they start at #109. Naturally the set-up person only had to change a few of them. As few as 2 sometimes.

    What I am looking to do now is write one subprogram that will run cross holes in all 3 locations regardless of OD size, material, drill diameter, drill type (carbide or HSS), threads or not, etc. I will be using G65 to pass the variables. I want to keep the number being passed as low as possible. Right now there will be 7 or 8 passed depending on hole location.

    The problem:

    One of the things I want in the sub is the feedrate. Currently I can think of only 4 sizes we run. However assigning a feedrate to these 4 only isn't the best way as there is some tolerance, and there may be more than one size drill we can use for each hole. I feel confident that I can write a program that will assign the correct feedrate for a given size drill. However, it may not be pretty. Nor as short as I'd like. I like to keep my programs short as feasibly possible, and as clean as I can.

    The question:

    Does anyone have any suggestions on how I can assign the correct feedrates to various size drills? Neat and elegant? Please don't suggest using AND, OR as I've tried examples others said worked on their machines, but they didn't work on mine. Fanuc tells me that I can't use them the way I want to (comparing values). This is for an 18T control on a Hardinge 42 Conquest.

    This will necessitate rewriting the master programs, and I am going to take the opportunity to see if I can't make them less complex. Cut down on the number of variables being used. Switch those I can to the #1 to #33 range. Right now I think there is a whole page of variables and calculations before the actual program. There is enough going on so that you can see the time lost before the program starts machining. That is why I put a check in it to see if the variables were already loaded. If they are, then the control skips right to the part machining. No hesitation.

  2. #2
    Join Date
    Jun 2008
    Posts
    1511
    Dale,

    I don’t know if I am following what exactly you are looking for but I will give a few suggestions anyway.

    You say that you are writing a macro to drill holes regardless of drill diameter but you need the drill diameter to calculate the feedrate. I would use a variable in the macro call that dictates the diameter of the drill. Then in your macro have the calculation for the SF and chipload determine your feed.

    Ex.
    (A=drill size)
    G65PxxxxA.625

    Oxxxx
    #100=60(SF)
    #101=.005(chip)
    F[#100/#1*3.82]*#101
    S[#100/#1]*3.82

    Another option if you don’t want to but an extra variable in the macro call. I had put all the drill diameters in the radius of the offset page. Then you can call and set the diameter to a variable used in your macro. #1=#2605—(tool5). Obviously we would set this up to get the info from the current tool in the spindle rather than programming the hard number of the tool.

    Please correct me if I am way off base.

    Stevo

  3. #3
    Join Date
    May 2007
    Posts
    1003
    Hi Steve. The drill diameter is one of the variables being passed. I am hoping NOT to have to pass a feedrate. Drills used are normally .0625, .0781, .0934 and .1094, but I need to see what else might get used.

    I don't want to assign feedrates by this method

    IF[#7EQ.1094]THEN#9=.0016

    because a #35 drill (for example) could also be used. Then a feedrate wouldn't be assigned because I didn't have an IF statement for .1100.



    These are the thoughts I've come up with so far. The "Must use decimal" comments are for the operators.

    CROSS DRILL SUB

    EXAMPLE: 7/64 in. hole in 7/16-20 UNJF threads. Drilled thru in 52100 mat’l

    G65P21C1.Z1.562W1.432D.1094M5210S1T20X.4375

    EXAMPLE: 1/16 in. hole in bearing surface drilled ½-way thru in 8620 mat'l

    G65P21C.5Z1.562A.384B.188D.0625M8620S1X.468

    Use all positive numbers.

    Z = face to 1st shoulder. Must be decimal

    W = 1st shoulder to centerline in thread or shank hole. Must be decimal
    A = 1st shoulder to 2nd shoulder. Must be decimal
    B = 2nd shoulder to centerline of bearing hole. Must be decimal
    Will be W or A & B but not both. Check finish drawing for these dimensions.

    D = drill dia
    M = material type. Use 5210 for 52100 mat’l
    C = drill ½-way or thru. Must be decimal. Use .5 or 1.
    S = drill type 1= carbide 2=HSS
    X = OD size. For threads use the nominal dia. That is 3/8-24 UNJF will be .375
    T = threads per inch. Only used when drilling thru threads. 3/8-24 UNJF will be 24


    Inside subprogram figure

    Feedrate based on drill dia
    RPM based on drill dia, drill type and material
    Check for pitch and then drill past root based on OD size
    Drill half-way or thru?

  4. #4
    Join Date
    May 2007
    Posts
    1003
    DELETED

  5. #5
    Join Date
    Jun 2008
    Posts
    1511
    Dale,

    Is there a particular reason you don’t want to use the IF statements?
    You don’t need to have a IF statement for every drill size. If you are going to use the same chip and SF regardless of drill size but want to change it based on material and tool type you set up for it accordingly. First off I would combine the drill type and material into 1 number if it is feasible for you. M8620=(8620 material using HSS). M8621=(8620 material using carbide). M5210=(5210 material using HSS). M5211=(5210 material using carbide).

    IF[#13EQ8620]GOTO1
    IF[#13EQ8621]GOTO2
    IF[#13EQ5210]GOTO3
    IF[#13EQ5211]GOTO4
    N1
    …Calculate SF for 8620 HSS
    GOTO50
    N2
    …Calculate SF for 8620 carbide
    GOTO50
    N3
    …Calculate SF for 5210 HSS
    GOTO50
    N4
    …Calculate SF for 5210 carbide
    N50
    ….

    Now you can add to list if more material comes into play.
    ***

    Now if you really want to get creative and not use this way you can set it up as I do with all of my speeds and feeds. It is the same concept but a little different. You will probably like this as you get to play with setting up custom codes. This works really slick.

    In your situation I would create a list on paper that sets a number to all the material and drill styles. Then in your macro call set M to which number you want to use.
    1=8620 material with HSS
    2=8620 material with carbide
    3=5210 material with HSS
    4=5210 material with carbide.

    Now set up a speed and feed program say 7000 and put the S&F in there based on number. Then set up a custom G500 to call program 9014. Now in the beginning of your sub for drilling just do a M98P7000.

    Ok say you set M3 in your macro call. Now in the first line it makes a sub call to 9014 because of your G500 code but it also makes #9=1.3 and #19=600. In the 9014 if #13(=3) is equal to #4114 which is your modal N which the first one is N1. it will jump to N1 set your F&S then end the program returning to 7000 but going to N999 and ending that as well. However #13 is 3 so it is not equal to the modal N. so it will end 9014 and return to the N2 block and do the same thing. This will continue until you reach N3 of 7000 which is what you want based off M3. IOW these 2 programs will bounce back and forth until it reaches the S&F you designated with your M value in your macro call.

    O7000(S&F program)
    N1G500F1.3S600
    N2G500F1.1S400
    N3G500F2.2S800
    N4G500F1.8S700
    N999M99

    O9014(gather S&F)
    IF[#13EQ#4114]GOTO1
    M99
    N1F#9S#19
    M99P999

    Your drill sub will use M3S#19. G1F#9. Which you don’t really need to do. Since your F&S are already modal and set all you have to do is give a M3 and G1 anywhere you want in your program.

    Did I get way to deep (nuts)?

    Stevo

  6. #6
    Join Date
    May 2007
    Posts
    1003
    Thanks a bunch. I will have to wait until tomorrow to look at it, but it looks good from the quick read I just did.

    EDIT: Playing with macros can't be anything but fun.

  7. #7
    Join Date
    May 2007
    Posts
    1003
    Steve, I am using IF statements. The tolerance on one cross hole is .076/.086. I don't want to write an IF statement for every possible drill size that could be used in the range of just this one hole. Imagine if I have to do it for every hole! Normally a 5/64 in. carbide drill is used. HOWEVER...I want all the bases covered. I would think that the same feedrate for any drill in this range could be the same. I see no benefit in increasing the feedrate by .0001/.0002 when going from the smallest to the largest.

    You are getting a bit deep for me, but I enjoy learning! If you are like me, you get a lot of satisfaction from being able to help others.

    I see in the Fanuc manual that #4114 function is a "Sequence number." Unfortunately that tells me zilch. As you know, I am still a babe in the woods when it comes to macros. Undoubtedly I would be further along if I also programmed mills. Ain't going to happen where I work now.

    Let's take this one step at a time. Or two. I will understand it completely...eventually. Shall we start with how the #4114 works? Thanks.

  8. #8
    Join Date
    Jun 2008
    Posts
    1511
    Dale,
    I am not going to speak much on this topic because based on what you have said I don’t think that you want to do it this way but I do have 1 question. If the reason you don’t want to do it is because you think you have to have an IF statement for every drill size, why do you think you need the IF for every drill? You are passing the drill size over using the G65 so there is no need to compare the drill size to something. Just use the drill size along with the SF you specify based on material and tool type. Similar to what I said in post2 and the beginning of post5.

    1. A few steps at a time. I like this way better anyway. The #4114 is the modal N address value. This is the same as your #4120 for the modal “T” or any other of. These variables along with many others are the current condition of the machine. If you were to do a tool call M6T5 once the machine reads that line of code it sets #4120=5(modal T). The #4114 is the same thing except it is your N address value. If your machine reads N200 in the code then #4114=200.

    2. This is all used so when program 7000 is running it reads the first line N1G500F1.3S600. Now program 9014 is called because the custom G500 is set to call the program every time. Now when going to program 9014 parameter #4114 is equal to 1 this is your modal N. And because this is a custom macro call your variables are set “F” and “S” so #9=1.3, and #19=600.

    3. Now when reading the first line of 9014 it compares to see if it has the proper data for what you specified with your M in your macro call. If you said M3 then #13=3. Now if #13 is equal to #4114 which it is not because #4114=1 it ends the 9014 and returns to N2 of program 7000 which again calls the 9014 setting your #4114=2 along with the new S&F.

    Ok I will leave it at that for now. Does it make a bit more sense??

    If you don’t know this already to set up the custom G500 code or any G() you want is done with parameters.
    #6050-#6059 will call programs 9010-9019. So to use program 9014 you have to set parameter 6054=500. Now every time a G500 is programmed it will call program 9014. If you wanted to use program 9010 then you would have to set parameter 6050=500 etc.

    Stevo

  9. #9
    Join Date
    May 2007
    Posts
    1003
    Steve, I haven't been ignoring you. I read your last reply, but been a bit too busy to answer it.

    First let me say I do know about, and use, the M and G calls, but no harm in mentioning them in case I didn't. I usually am not one of those people who get insulted if you tell me something I already know. I prefer that you cover all the bases. Assume nothing.

    I think I understand the the use of #4114 now. Thanks. Pretty slick alright. Will have to see if I can't come up with a couple good uses for it.

    Off the top of my head I know that we have run 1/16, 5/64, 3/32, 7/64 and 5/32 diameter cross drills. You are using one feed for all sizes in a given material...if I am reading the example correctly. I don't want to run a 5/32 drill at the same feedrate I run a 1/16 drill.

    It may be simpler to pass a feedrate in the G65. I am not in a hurry to get this program written. What I already use works. Just trying to write one program that will replace the 14 or so I currently use. I'd rather take a little extra time, and write one that won't be modified 2 or 3 more times before reaching its final stage.

    Am trying to take into consideration the number of values being passed versus the increased length of the macro sub if not passed.

    I do appreciate your passing along some of the vast macro knowledge you have. I've considered taking the online parametric programming course, but don't know how well I would do since I don't program mills. I'd bet that most of the course deals with mills since there is a lot more use there than on a lathe. I don't want to take a course I can't do well in.

  10. #10
    Join Date
    Jun 2008
    Posts
    1511
    Dale,
    No worries I have been quite busy myself.

    I would take the class if you get a chance. What I have experienced is macros are macros. It does not matter if it is mill or lathe. Yes there are usually more applications for these in mills. We once set up macros in all of our vertical lathes for every part, about 2000 different models. It ended up being about 25 different macros but super easy to set up and run. The only difference I have encountered is the macros I write for the lathes are much more in depth then the mills.

    Ok 2 things.

    1.I think that you could really benefit from setting up a S&F program and using the #4114 as I described before. All you need is a sheet that tells the guys what number to use for the combination of the drill, drill type, and material.

    2.The example I gave earlier does not use just one feed for every drill. It calculates out the speed and feed based on the SF you specify and the chip load you specify. Lets run a 1/16 drill through the numbers.

    (A=drill size)
    G65PxxxxA.0625------#1=.0625 drill size.

    Oxxxx
    #100=60(SF)----set to what you want
    #101=.005(chip)----set to what you want
    F[[#100/#1]*3.82]*#101-----60/.0625*3.82*.005=18.336(feed rate)
    S[#100/#1]*3.82-----60/.0625*3.82=3667(spindle speed)

    Am I missing something??

    The more I look at this you are probably better off with the S&F program using #4114. The data above works. However this is not taking into account the drill type and the material. This would have to be specified in the macro call which means you would have to pass over more variables. Well really just one more other then the drill size if you use the example I gave on creating a number to match every drill and material then you could code that number to use aspecific SF and chipload.

    Stevo


    Stevo

Similar Threads

  1. Developing an Online Tutorial Site
    By charger19690 in forum Education - Teachers and Students Hangout
    Replies: 0
    Last Post: 02-28-2009, 09:09 PM
  2. Anyone got any X1 recommended feedrates...
    By digits in forum Benchtop Machines
    Replies: 6
    Last Post: 10-03-2006, 11:54 PM
  3. Developing 3D Art Work for a Newbie
    By gimmephone in forum Uncategorised CAM Discussion
    Replies: 7
    Last Post: 08-20-2006, 05:39 AM
  4. X1 Feedrates etc...
    By itsme in forum Benchtop Machines
    Replies: 2
    Last Post: 08-20-2006, 01:37 AM
  5. Cheap, small, stepper Pic Driver - Developing
    By Ragnarok in forum Stepper Motors / Drives
    Replies: 44
    Last Post: 06-02-2006, 08:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •