Page 1 of 2 12 LastLast
Results 1 to 12 of 16

Thread: Parametric Programming

  1. #1
    Registered gene rhodes's Avatar
    Join Date
    Nov 2008
    Location
    U.S.A.
    Posts
    34
    Downloads
    0
    Uploads
    0

    Parametric Programming

    Morning Gents,
    I am currently trying to learn (on my own, I might add) how to use parametric programming on an Okuma lathe with an OSP 5020L control. This is turning out to be quite a task! I have read and am familiar with the general idea of it all but am hesitant on where to begin. My company recently purchased some info from universalclass.com in hopes of being able to further this approach but my impatience is getting the better of me. I don't think it will benefit me at all for someone to do this for me so just something to get me started in the right direction should be sufficient. Thanks.
    Attached Files Attached Files


  2. #2
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    Ok I am not going to be a lot of help here because of the syntax that Okuma uses vs. what I am use to. The concept is the same except instead of using say #100 as a variable I belive Okuma uses something like VC100 or something.

    This is the way I would set it up as 1 pass but using variables. Now a few questions to you are if “C” on your drawing changes does it change the radius or the length on diameter “A” change or “B” change or both? What is the angle at the top of diameter “B”. You will have to fill some of this information into the program below.

    (main program)
    #100=7.----------“A” DIAMETER
    #101=6.5---------“B” DIAMETER
    #102=1.----------“C” THICKNESS
    G0G90X()Z1.------FILL IN X FOR THE START OF YOUR ANGLE
    Z.1
    G1Z0F.01
    X#101Z-()--------FILL IN THE Z LEG OF THE ANGLE
    Z-()--------------FILL IN THE LENGTH OF “B” DIAMETER
    X()---------------FILL IN X FOR THE DIAMETER AT THE START OF THE RADIUS
    G3X#100Z()R()----FILL IN Z FOR THE RADIUS AND R FOR THE RADIUS
    G1Z-#102+.1

    This will do 1 pass at the shape you provided. Now there are ways of looping this based on the amount of raw stock and pick size you want to use. This would require the proper syntax that Okuma requires. In the example above you would set up a few more variables asking what the extra stock is and the pick size and build a loop using a “IF[#103GE#104]GOTON100 or use a WHILE[#103GE#104]DO1. #103 and #104 being your extra stock and pick size. If this was inserted the code above would keep running until it reached the proper size.

    I hope this helps.
    Stevo


  3. #3
    Registered gene rhodes's Avatar
    Join Date
    Nov 2008
    Location
    U.S.A.
    Posts
    34
    Downloads
    0
    Uploads
    0

    Question

    This is the way I would set it up as 1 pass but using variables. Now a few questions to you are if “C” on your drawing changes does it change the radius or the length on diameter “A” change or “B” change or both? ans: no. the distance/radius for this purpose do not change. What is the angle at the top of diameter “B”. ans: it is a 118 degree radius with a 12 degree angle off the tangent. There is actually a .035" step (in X) at the beginning of the 118 radial move. This design never changes. The part is received by the operator as a disc so multiple passes will be used to achieve the correct dimension.
    That is a great start. Although it still kinda hard for me to see. Sorry, I tend to be a little thick sometimes


  4. #4
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    That’s no problem. I hate to show you too much as the syntax does not apply fully with your machine but you may be able to use it down the road.

    There are also good books out there on parametric programming and macroB programming. Here are a few that should be of good use to you.

    http://www.mhprofessional.com/produc...sbn=0071713328
    Google-Peter Schmidt
    Google-Mike Lynch

    Ok so lets do something simple like turn a straight diameter with a bevel on top. The diameter is 8” with a .06x45 deg bevel at the top. The part is 1” thick. For confusion purposes we are going to say that the angle is always 45deg but the Z-leg may change. I do want the angle to change because then I would have to use more calculations with tangents and stuff. This saves confusion.

    In the example below after setting all the variables to your part specifications look at the first move line
    G0X[#100-[#102*2]]. Plug in the values into the variables. To see the X movement like so G0X[8-[.06*2]] So the calculation is .06*2=.12-->G0X[8.[-.12]]-->G0X7.88. This is the start position of the bevel.

    O0001(main program)
    #100=8.(part diameter)
    #101=1.(part thickness)
    #102=.06(z-leg of bevel)
    G0G90X[#100-[#102*2]]Z1.
    Z.1
    G1Z0
    X#100Z-#102------remember #100=8 and #102=.06 so the move would be X8.Z-.06
    Z-#101+.1-----#101=1. So the move is Z-1.1
    G0U.1
    G28U0W0
    M30

    Ok now below we are going to add a twist and make the program loop a bit to keep removing stock.

    O0001(main program)
    #100=8.(part diameter)
    #101=1.(part thickness)
    #102=.06(z-leg of bevel)
    #103=.25(x-stock on od)
    #104=.05(pick size)
    #105=0(counter for loop)
    N100
    G0G90X[#100-[#102*2]]+[#103]Z1.
    Z.1
    G1Z0
    X[#100+#103]Z-#102
    Z-#101+.1
    G0U.1
    Z1.
    #103=#103-#104
    IF[#103GT0]GOTO100
    G28U0W0
    M30

    Above your X position is going to be the same except it will be larger by .25” (#103). Now after it goes back up to 1” after the cut you see #103=#103-#104 this is saying .25=.25-.05 so now #103=.2 . now the IF statement is say “if #103(.2) is greater then 0 go to N100. Because it is still equal to .2 it will jump to N100 and run the profile again except only .2 larger then diameter instead of .25. It will continue to do so until #103 reaches 0 and at that point it will ignore going to N100 and read the next block G28U0W0.

    There are other technacalitis to take into account like your first pass will cut air or that if you change your pick size to something that is not divisable into the x-stock you will undersize the diameter. I just wanted to keep it simple.

    Hope this helps,
    Stevo
    Last edited by stevo1; 07-01-2010 at 12:40 PM. Reason: forgot books


  • #5
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    It is Peter Smid.


  • #6
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by sinha_nsit View Post
    It is Peter Smid.
    Thank you for the correction. I snuck you in there first

    I just got your book yesterday and have not had a chance to crack it open yet but I am looking forward to it. Thank you.

    Stevo


  • #7
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    Since you know nearly everything about macro programming, you may not find any new thing in the book. Basically, the book is for a beginner who wants to learn on his own.


  • #8
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by sinha_nsit View Post
    Since you know nearly everything about macro programming, you may not find any new thing in the book. Basically, the book is for a beginner who wants to learn on his own.
    Thanks Sinha,

    Can I get you to tell my wife that except stop the sentence right after the “everything” ? I tell that to my 2 girls and they never listen, they just roll their eyes and go about their business .

    I am still looking forward to reading it. You will be surprised what you can learn even at the basic level. When you have been doing it for so many years you get set in your ways and sometimes realize tricks you never knew.

    Plus as sick as it sounds I would prefer to read this stuff even though I do it every day. We all know here that it takes a particular breed to enjoy this kind of stuff that most people look at us crazy.

    Stevo


  • #9
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    The same story everywhere!
    My wife and my two kids consider me some sort of a fool. Now, after publishing this book, which is an international edition of McGraw-Hill, they have some confidence in me. What more could I have expected from this book!!!


  • #10
    Registered
    Join Date
    Jun 2008
    Location
    USA
    Posts
    66
    Downloads
    0
    Uploads
    0

    Just wondering

    Did you figure out your problem or still waiting for help?


  • #11
    Registered
    Join Date
    Jun 2008
    Location
    USA
    Posts
    66
    Downloads
    0
    Uploads
    0
    did you figure this out or still waiting?


  • #12
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    Since he already has working programs for several of such pieces, he may simply replace the values for A, B and C with, say, #1, #2 and #3, respectively, in one such program, and, in the beginning of the program he would insert
    #1=...;
    #2=...;
    #3=...;
    If a calculation is required for some dimension (I have not analyzed the geometry), it can be done in terms of #1, #2 and #3, as needed.
    This approach does not require a thorough knowledge of macro programming.


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Parametric Programming
      By gene rhodes in forum General CNC (Mill and Lathe) Control Software (NC)
      Replies: 1
      Last Post: 06-29-2010, 07:34 PM
    2. Parametric Programming
      By Tuz in forum Parametric Programing
      Replies: 7
      Last Post: 02-09-2009, 09:27 AM
    3. Parametric programming.
      By chrisryn in forum Parametric Programing
      Replies: 32
      Last Post: 01-26-2009, 06:14 AM
    4. Parametric Programming
      By weaston in forum General CAM Discussion
      Replies: 4
      Last Post: 02-20-2007, 08:25 AM
    5. Parametric Programming
      By widgitmaster in forum BobCad-Cam
      Replies: 7
      Last Post: 05-04-2006, 02:04 PM

    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.