Basic programming question - Page 2

Page 2 of 2 FirstFirst 12
Results 21 to 36 of 36

Thread: Basic programming question

  1. #21
    Member dharmic's Avatar
    Join Date
    May 2015
    Location
    Australia
    Posts
    1422
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    *like*

    My old skool mentor came up through one of the pommy aerospace companies too. What he could do with loops, variables and subroutines on his old bridgy interact’s MDI was nothing short of godlike.

    And your original question would have earned from him that quiet, sneaky smile and “just try this...” before he dropped some life changing script voodoo on you.

    I’m relatively new to all this but the deeper I delve the more I appreciate understanding the raw Goode. And any day I can learn a bit more wisdom about the basic g code is a grand day.



  2. #22
    *Registered User* Peteuk's Avatar
    Join Date
    Jan 2019
    Posts
    13
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Goodness, that's bought back memories. I think those old Bridgeports used a basic Heidenhein with LBLS and stuff. Actually easier to use than Fanuc. These days it's even easier with all graphics. I prefer it.

    No doubt I'll be posting more "Fanuc for dummies" questions now I know where to come.



  3. #23
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Quote Originally Posted by Superman View Post
    so I'm a fool also ??? ....
    and I would be using a CAM system to output the code
    .... many would progam their 2nd op this way. It is so much simpler, not having to move an origin away from a fixed or fixture location point.

    your comments are so bullish because they won't do it "your way".... get off your high horse, ppl come here for help & to pass on experiences.... not to be insulted.

    wish I could deduct rep points
    You have missed the point as most posters here have, there is no hiding the fact of what he was doing, Manually adding a Z axes move after each pass is a crash waiting to happen it does not matter where he was programing from it was what he was doing that you so called experts have missed

    Mactec54


  4. #24
    Flies Fast Superman's Avatar
    Join Date
    Dec 2008
    Location
    Antarctica
    Posts
    3109
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by mactec54 View Post
    You have missed the point as most posters here have, there is no hiding the fact of what he was doing, Manually adding a Z axes move after each pass is a crash waiting to happen it does not matter where he was programing from it was what he was doing that you so called experts have missed
    It is YOU that said he was adding Z moves after each pass
    It was YOU that suggested a plunge after each zig and zag

    ... actually, he was setting Z then calling a sub.... this is a standard method when manually programming.... especially if you have limited memory on the control... probably the safest method he had available.
    The OP wanted a different method of setting the Z plane before calling his sub(whatever the facing pattern they have chosen)

    It is incorrect to call anyone a fool that may have done it differently to yourself.... yes, there may be better/faster/easier methods, but never wrong if it proves to actually make a correct part.



  5. #25
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Quote Originally Posted by Superman View Post
    It is YOU that said he was adding Z moves after each pass
    It was YOU that suggested a plunge after each zig and zag

    ... actually, he was setting Z then calling a sub.... this is a standard method when manually programming.... especially if you have limited memory on the control... probably the safest method he had available.
    The OP wanted a different method of setting the Z plane before calling his sub(whatever the facing pattern they have chosen)

    It is incorrect to call anyone a fool that may have done it differently to yourself.... yes, there may be better/faster/easier methods, but never wrong if it proves to actually make a correct part.
    I think your eyes must be failing you superman this is a copy of what he posted in the very first post

    We do a lot of high speed face milling, removing a lot of material in small Z increments. Currently I programmed a sub program with the X and Y movements, but manually input each drop in Z, so it looks like

    Note the words, MANUALLY INPUT EACH DROP IN Z He was running the program then adding Z moves at the end of each pass

    The words only a fool is not referring to anyone or do you need an English lesson as well

    Mactec54


  6. #26
    Member
    Join Date
    May 2005
    Location
    canada
    Posts
    1662
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Quote Originally Posted by Peteuk View Post
    The interesting part is that there is no Cad-Cam. Everything is done by manual input, by us 3.
    Interesting ? I'd find that frustrating.
    I ran mills for a company that employed 3 people in a CAD (Solidworks). These guys worked with in-house parts and also did reverse engineering (knock-offs) with Coordinate-Measuring Machine etc.
    That department handed printed dimensioned drawings to the floor where we had machines with conversational controls, mostly Mazatrol and some Milltronics.
    The guy running the machining department eventually convinced management to invest in cam and networking after much butting of heads.

    Prior to that I worked for a company where operators wrote g-code at the machine and punched everything in at the control. It was interesting work but it was inefficient and no 2 operators seemed to program in the same style.

    Anyone who says "It only goes together one way" has no imagination.


  7. #27
    Member dharmic's Avatar
    Join Date
    May 2015
    Location
    Australia
    Posts
    1422
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Even more frustrating? The place with the bridgeports had CAD and CAM but the operator/owner of the machines didn't trust the CAD/CAM boys to create toolpaths that wouldn't wreck his machines. So instead of hooking up a data cable for trickle feed, he made the CAD guys create fully datumed and dimensioned drawings which he then used to manually program toolpaths on his MDI. Wow.

    Speaking of wow,



  8. #28
    *Registered User* Peteuk's Avatar
    Join Date
    Jan 2019
    Posts
    13
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Quote Originally Posted by Peteuk View Post
    Thanks so much. That makes far more sense now. shall be experimenting first thing Monday, ,, just one dumb question:

    This line:

    while[#100LT#103]DO1

    Is the actual word "while" typed in? Does it matter if upper or lower case? Hope that didn't make you laugh to much ... Thanks for the pointers on the books, off to search for those.
    Well I'm stumped. It doesn't want to work. I've typed it all in as quoted as seen in pic. What happens is:
    Face mill comes in, to one inch above.
    It then skips forward all the way to the line G01 Z#103 F50
    That puts Z straight at 0.9
    P4000 then comes in, runs that, followed by the P8999 (which is a simple machine home ref return)

    It even misses the first P4000.

    Any ideas? Help!!! ;-)

    Attached Thumbnails Attached Thumbnails Basic programming question-trial-jpg  
    Last edited by Peteuk; 01-28-2019 at 04:07 PM.


  9. #29
    *Registered User* Peteuk's Avatar
    Join Date
    Jan 2019
    Posts
    13
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Quote Originally Posted by rcs60 View Post
    this is based off of fanuc programming if you have a different control this might be different

    to find if your control has parametric ability
    mdi the following
    #100=1
    if no alarm then you have parametric programming

    The # numbers can be located at the beginning of the program or just prior to the while statement
    #100=1.000(STARTING Z)
    #101=.05(CUT INCREMENT)
    #103=.900(FINAL DEPTH if this were 0 then 20 passes would be made doing the while statement)


    while[#100LT#103]DO1(while #100 is less than #103 do this again when it is equal or more than stop the cycle go to end1)
    G0XxxxxYxxxx(start of cut this can be in you o4000 program but i like it here to make sure that it is in the right place before the z comes down)
    G1Z#100F50.(each pass will be .05 less than the previous on)
    M98P4000
    #100=#100-#101(this makes #100 smaller by the amount in #103)
    end1

    this is to be sure that your finish pass is always the correct depth

    G0XxxxxYxxxx(finish pass)
    G1Z#103F50.(in this case the last pass would be .05 same as the rest of them)
    M98P4000

    I am with skywalker4 sometimes using plus dimension is very applicable for machining something
    castings might be one of those time were the datum is the mounting surface and the variable is the casting where you can start high to make sure the casting variation are accounted for

    two good books to read for parametric programming are from "shinha and peter smid"
    see above post please...



  10. #30
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Quote Originally Posted by Peteuk View Post
    Well I'm stumped. It doesn't want to work. I've typed it all in as quoted as seen in pic. What happens is:
    Face mill comes in, to one inch above.
    It then skips forward all the way to the line G01 Z#103 F50
    That puts Z straight at 0.9
    P4000 then comes in, runs that, followed by the P8999 (which is a simple machine home ref return)

    It even misses the first P4000.

    Any ideas? Help!!! ;-)
    I new you would be back and that it was not going to work, because it has been written incorrect, but what do I know, see if they will rewrite it for you, I certainly won't be correcting it for you

    Mactec54


  11. #31
    Member he1957's Avatar
    Join Date
    Jun 2018
    Location
    Tasmania
    Posts
    362
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Study the values for the parameters given then check the logic in the "WHILE" statement.



  12. #32
    Member
    Join Date
    Feb 2011
    Location
    usa
    Posts
    353
    Downloads
    2
    Uploads
    0

    Default Re: Basic programming question

    sorry

    try this
    WHILE[#100GT#101]DO1(your starting point is 1.000 and you would be making the cuts to a smaller dim.)



  13. #33
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Quote Originally Posted by Peteuk View Post
    see above post please...
    What do you have in the sub program, most likely don't need a sub

    Mactec54


  14. #34
    *Registered User* Peteuk's Avatar
    Join Date
    Jan 2019
    Posts
    13
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Quote Originally Posted by rcs60 View Post
    sorry

    try this
    WHILE[#100GT#101]DO1(your starting point is 1.000 and you would be making the cuts to a smaller dim.)
    Thanks, that worked. As it's all new to me, I would never have known of "GT" anyway. Time to start reading up.



  15. #35
    Member
    Join Date
    Oct 2017
    Location
    United States
    Posts
    11
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Just a thought. If a person sets Z zero on the Top of the part and makes a couple of cuts and then the tool breaks how do you reset the new tool when there is no original Top setting point since it has been cut off? If a person set Z zero on the bottom of the part then if the tool happens to break when cutting the part all you have to do is reset the tool on the bottom of the part where it never changes. Sometimes setting Z zero on the bottom of the part is better and sometimes setting the Z zero on the Top of the part is better. I mostly set the Z zero on the bottom of the part that way it doesn't matter if the raw stock is alittle different in size than the one you are cutting. Both ways work fine. If I want to have a final thickness of .500" then I know the finished cut is at a positive Z .500". If I had set Z zero on the TOP of the part then I would have to calculate from the original size of the part thickness and subtract the difference to get the final thickness of .500". Both ways are fine to use but seems easier just to set zero on the bottom of the part in my opinion. Ive done it both ways thou. Depends on the situation.



  16. #36
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Basic programming question

    Quote Originally Posted by Rivethead View Post
    Just a thought. If a person sets Z zero on the Top of the part and makes a couple of cuts and then the tool breaks how do you reset the new tool when there is no original Top setting point since it has been cut off? If a person set Z zero on the bottom of the part then if the tool happens to break when cutting the part all you have to do is reset the tool on the bottom of the part where it never changes. Sometimes setting Z zero on the bottom of the part is better and sometimes setting the Z zero on the Top of the part is better. I mostly set the Z zero on the bottom of the part that way it doesn't matter if the raw stock is alittle different in size than the one you are cutting. Both ways work fine. If I want to have a final thickness of .500" then I know the finished cut is at a positive Z .500". If I had set Z zero on the TOP of the part then I would have to calculate from the original size of the part thickness and subtract the difference to get the final thickness of .500". Both ways are fine to use but seems easier just to set zero on the bottom of the part in my opinion. Ive done it both ways thou. Depends on the situation.
    You completely missed what the OP was doing, what you posted is Correct, and can be done either way it makes not difference how you setup your tool, and if you use a probe and tool setter, there is no difference with either tool setting replacement if you had to this, is the part you got wrong, it's just one way is safer than the other, if someone is adding Z moves manually, the main point is you are not manually inputting each Z move, which the OP was doing, your program is already done and the machine is under auto control

    Mactec54


Page 2 of 2 FirstFirst 12

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Basic programming question

Basic programming question