Page 2 of 2 FirstFirst 12
Results 13 to 22 of 22

Thread: H#107 ???

  1. #13
    Registered
    Join Date
    Jan 2011
    Location
    USA
    Posts
    14
    Downloads
    0
    Uploads
    0
    The reasoning behind it Stevo is simple. Less for the operator to have to change. I wanted them only to have to change 2 numbers. One for the post size and one for the inside dia. Less to change,,, less to go wrong,, or human error. In the future i will remember not to set the "H" to the tool length offset variable. Thanks for all your help!!!


  2. #14
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    Springer,
    I completely understand what you are trying to do and I agree with you on why you want to do it. I do it for the same reasoning that you do. You CAN do it. You are just not understanding how it works. Or do you understand now?

    I do not know how else to explain it. G43 needs a value with the H(). This value with H() MUST be the tool number not the offset value. G43 knows what to do with the offset value. You are using a variable in the H() and that variable has the offset value in it. It does not have the tool number in it. IOW completly forget the offset value of -13.5286 and #10003 you do not need to do anything with them. G43 already knows what to do with them so get them out of your head.

    Here is the first part of your program.
    (TOOL LENGTH FOR DRILLS)
    N5IF[#101NE1.]GOTO6
    #107=#10003-----------variable #10003 has the offset value in it not the tool number. So when you program G43H#107 it is trying to do this G43H-0013.5286, I will state it again H() needs to be a tool number not a tool offset value. So with that said you are using tool 3 in this example because #10003 is the offset value of T3. Change your #10003 to just 3.

    (TOOL LENGTH FOR DRILLS)
    N5IF[#101NE1.]GOTO6
    #107=3
    Now when the program reads G43H#107 it equates to G43H3 and “looks” at tool offset 3.

    I hope this helps clarify things. If not let me know I will give it another go.

    Look at the program I posted in post #11. Use those changes in red and it will do EXACTLY what you are trying to accomplish.

    Stevo


  3. #15
    Registered
    Join Date
    Mar 2005
    Location
    Silicon Valley, CA
    Posts
    988
    Downloads
    0
    Uploads
    0
    Seems that the program and macro is more complicated than it needs to be. If you're simply trying to control the "post" size and hole size, then why bother getting the tool lengths involved? Looking at your program sample, the variable sets you're using tells me you at least have the magazine to support to tools and carry the offsets individually. So, why not just set all them in the mag, set all of the tool lengths on the offset page? Then, you only need to control the variables to ID the post size and hole size in the program..... The "H" just simply needs to grab the correct offset number and not the offset length itself (as Steve mentioned).

    So then..... something like this and assuming #101 is also equal to the tool number in magazine:

    (#100=27 FOR SMALL POSTS)
    (#100=28 FOR LARGE POSTS)

    (#101=1 FOR .0952 I/D)
    (#101=2 FOR .1157 I/D)
    (#101=3 FOR .1383 I/D)
    (#101=4 FOR .1540 I/D)
    (#101=5 FOR .1792 I/D)


    #100=28 (POST SIZE)
    #101=5 (I/D SIZE)

    ( OPERATION 3 HOLES )
    ( RGH DRILL FOR REAMER)
    N300
    G0G17G40G49G98G90G80
    S1800M3
    G90G54G0X-1.55Y-.19
    T#101M106
    G43Z.35H#101M8
    Z.1


    You don't show the code for using #100 so I can't elaborate on that....
    Also, you're using "M106" commands.... Is this on a Router? Do you have an ATC? Or is M106 simply a custom M code for tool change? or is this a multi-function m code?
    It's just a part..... cutter still goes round and round....


  4. #16
    Registered
    Join Date
    Jan 2011
    Location
    USA
    Posts
    14
    Downloads
    0
    Uploads
    0
    Psychomill I do have all the tools in the mag. That would be 5 drills and 5 reamers to go along with all the other ones. OH,,, I have a 30 tool drum. The M106 is a pre-call for the next tool up. If I had the drill in the spindle then I would do a M106 reamer. As far as my program being more complicated than it needs to be. FUNNY!!! It's my first one. Why do you think I am having so many problems!! I could just scream sometimes. All in time. Thanks for your help. Have a great evening!!!


  • #17
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    Springer,
    You are welcome for the help.

    Out of curiosity do you understand what we are saying about the G43 needing the tool number and not the tool offset?

    Stevo


  • #18
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    We generally use the same number for tool number and offset number, just to avoid any confusion. For the same tool, we can use different offset numbers for different workpieces. For example, if desired, we can use G43 H1, G43 H2, G43 H3 ... for tool number 1.
    Thus, the H-value (or D-value) is actually offset number, not necessarily tool number.
    More simply, it is row number of the offset table. It simply tells the control to use the value stored in the specified row.

    H03 refers to third row under H-column (wear + geometry).
    D03 refers to third row under D-column (wear + geometry).

    03 is just a location, not the value stored at that location.


  • #19
    Registered
    Join Date
    Jan 2011
    Location
    USA
    Posts
    14
    Downloads
    0
    Uploads
    0
    Yes Stevo I understand about the G43. I will say that I did hope that with the macro programming I could get by some of that. I wanted to run (1) variable to set all drills and reammers. Oh well,,, can't win them all. I should not say that. I am just not the way I wanted to. ""If at first""

    Sinha I use that in standard G code programming.

    You guys are great!!! It is not my first G code program,,, not by a long shot,,, just my first macro program. I took a online class because I knew there was a better way then running 8 programs for just about the same part. It will save us time on 1st articles too. QA is not going to make us do all the checks on all 8 parts because I am running the same program. That works for me. I will say that I think it drives some of them nuts at work. They take one look at some of it and shake there heads. I re-did my program so I will not do a call on the H. I wanted too!!! Once again,,, Oh well!! ;-) Maybe tomorrow I can give it a test run. Been very busy. Again thank you for all your time and help!!!!!!


  • #20
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by springer82 View Post
    I wanted to run (1) variable to set all drills and reammers. Oh well,,, can't win them all. I should not say that. I am just not the way I wanted to.
    You absolutely 100% without a doubt can do it the way that you want to with only 1 variable and do it with the code you have written.

    Psycho’s example in post #15 is the easiest way to do it. You don’t need all the extra code that you are using. If you don’t quite understand what he is doing and you want to use the original code that you posted then use your code expect edit what I changed in post #11 in red text.

    This being your first macro I am impressed.

    Now if you want to avoid all confusion at all and never have to worry about G43 again then put it in a tool change macro. I do this on ALL of my machines. You will never have to code G43 in a main program again. That being said there are a few criteria’s that you have to meet. Your tool offset value is always going to be the same as your tool number in the spindle. IOW if you have T3 in the spindle then you have to use H3. Well there are ways around this that I won’t bother with but it is easier that way.

    Stevo


  • #21
    Registered christinandavid's Avatar
    Join Date
    Aug 2009
    Location
    New Zealand
    Posts
    654
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by stevo1 View Post
    Now if you want to avoid all confusion at all and never have to worry about G43 again then put it in a tool change macro. I do this on ALL of my machines. You will never have to code G43 in a main program again.
    Stevo
    Hmmm. Thought about automating this bit also, but refrained. Apart from the issues you mention, my fear is that too many shortcuts may have a detrimental effect in terms of forgetting how the machine behaves at the most basic level. Keeping the codes in the programs serves as a constant reminder.

    Saying that - we do reset the modal G-codes back to their initial state in the background between sequences. The codes in question are the annoying and (usually) unnecessary ones I have never gotten into the habit of typing in...but when they're necessary they are really, really necessary!

    Of course, if you have the ideal situation of a fleet of like-for-like controls, automate away!

    DP

    ps springer82 - I always use variables in my program, not actual tool numbers. I just can't be arsed to keep moving tools around in the magazine and resetting them!


  • #22
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    I also feel that a program should have all the set-up information. I find that many new-comers get confused by tool-change macros. And, if the macro gets deleted accidently, they need to seek others' help.
    If the idea is to avoid repetitive typing, one can always save a basic program template, and start a new program with it.
    If use of macro/sub can be easily avoided, one should go for it. Why frighten less-experienced people. Even the original programmer may forget what exactly the macro does.
    People talk about the KISS principle: Keep It Simple Stupid.
    Or is it Keep It Secret Stupid!


  • Page 2 of 2 FirstFirst 12

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.