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

Thread: Zero setting from program.

  1. #1
    Registered
    Join Date
    Jan 2010
    Location
    Norway
    Posts
    72
    Downloads
    0
    Uploads
    0

    Zero setting from program.

    Hi

    Is it possible to measure zero on an axis from program?
    For example.

    G00G54Z50.X1000.T0101
    M00
    (TOUCH PART Z)
    "some code here for measure Z0."
    (PUSH NC START)
    G00Z50.
    X1200.
    Z0.
    G1X800.

    Controller Fanuc 18iTB


  2. #2
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1,667
    Downloads
    0
    Uploads
    0
    it can't be done fully automatically but almost.....

    G0 T0202
    G0 X100.0 Z3.0 (brings setting tool near part)
    T0200
    M0
    (SWITCH TO MANUAL, TOUCH PART FACE AND SET WORKSHIFT Z0)
    (SWITCH BACK TO AUTO, PRESS START)
    G0 T0202
    G0 X300.0 Z150.0
    T0200
    M1
    (the rest of the program here)

    I do this nearly every day. It takes less than 5 seconds to re-set the w/shift this way.


  3. #3
    Registered
    Join Date
    Jan 2010
    Location
    Norway
    Posts
    72
    Downloads
    0
    Uploads
    0
    That's how i do it now, problem is that every 1000th time or so i forget to measure zero
    Problem is mostly on C axis where i need to use an indicator in a hole, finding zero is usually done but pressing measure C0


  4. #4
    Registered
    Join Date
    May 2004
    Location
    United States
    Posts
    4,519
    Downloads
    0
    Uploads
    0
    #2601 - G54 workpiece zero point offset value 2nd axis
    #5022 - Machine coordinate 2nd axis position

    Position machine at Z work zero point.

    Press cycle start.

    %
    Oxxxx
    #2601=#5022
    G0 W1.
    .
    .
    .
    M30
    %
    http://www.kirkcon.com/


  • #5
    Registered
    Join Date
    Jan 2010
    Location
    Norway
    Posts
    72
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by txcncman View Post
    #2601 - G54 workpiece zero point offset value 2nd axis
    #5022 - Machine coordinate 2nd axis position

    Position machine at Z work zero point.

    Press cycle start.

    %
    Oxxxx
    #2601=#5022
    G0 W1.
    .
    .
    .
    M30
    %
    Can't find 2601 or 5022 in parameter or book.


  • #6
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1,667
    Downloads
    0
    Uploads
    0
    ProT0ZyKo, those are Macro Variables.

    And very nice too I must say
    although I think 2601 is wrong?
    Code:
                      Z (lathe)
                      or
              X axis  Y axis  Z axis       
    External  #5201   #5202   #5203       
    G54       #5221   #5222   #5223       
    G55       #5241   #5242   #5243       
    G56       #5261   #5262   #5263
    G57       #5281   #5282   #5283
    G58       #5301   #5302   #5303
    G59       #5321   #5322   #5323
    Should be 5222 or 5202 (I personally use 5202 when hard-coding a Z workshift in my programs)

    Bear in mind with that method the tool still has to be manually moved to the Z0 position.

    Not sure how you can forget. The tool is near the part and stopped in M00 for a reason..... to MEASURE the workshift. I think if someone were there to kick your ass every time you forgot and scrapped a part or made some kind of machining error you would remember pretty quickly to press 'measure'
    but yes put those macro variables in the program (#5222=#5022.... assuming you have Macro B option) and your problems are almost solved (you still need to manually move the tool).

    In my case it's common to have to touch the face and take off 0.002". If you need to touch on and take something off do this.....
    #5222=#5022 + 0.002

    I'm going to try this at work tomorrow.... can you tell I'm excited?
    Last edited by fordav11; 03-07-2012 at 04:09 AM.


  • #7
    Registered
    Join Date
    Jan 2010
    Location
    Norway
    Posts
    72
    Downloads
    0
    Uploads
    0
    Ops my bad. Didn't catch the macro part right away.
    Still 2601 is not right, this is "Work Shift (Shift Value)" Not touching this one.
    #5222=#5022 will work
    But doesn't look like i have Macro B option. i get "009 ILLEGAL ADRESS INPUT"
    This is an option i will get.

    fordav11: like i said it happens like every 1000th time, not that often, easy to get distracted while climbing in and out of machine
    But this is a way to make my programs bulletproof.


  • #8
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1,667
    Downloads
    0
    Uploads
    0
    the #2601 comes from this list......
    Fanuc system macro variables and macro programming
    Seems to be correct but it's for a mill only according to the info. whereas #5201 - #5323 is more commonly used for both lathe and mill.


  • #9
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1,667
    Downloads
    0
    Uploads
    0
    It works great with one small change.
    On a lathe the Z workshift number must be a positive number (at least on all Fanuc controls I've ever seen). If you touch on the face at Z0 and set current machine coordinate system Z position into your G54 Z workshift using the above macro commands it puts a negative number into G54 Z because the turret has moved in negative direction to touch the face.
    The positional error is doubled when you try to move after that.
    I.E. if offset in G54 Z is -200.123 the Z position at the face will be -400.246

    The solution is very simple....

    #5222 = ABS[#5022]

    This works I just tested it.

    So now all you need to do is get the Macro B Option and your problem is solved


  • #10
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    One may not always be working in G54.
    The program O8009 given in the attachment would identify the current WCS and would do the needful.

    Fordav11,
    I am still trying to understand the need for ABS function.
    What I know is you cannot be wrong. Fanuc does have illogical things.
    Attached Files Attached Files


  • #11
    Registered fordav11's Avatar
    Join Date
    Aug 2011
    Location
    Fordaville
    Posts
    1,667
    Downloads
    0
    Uploads
    0
    ABS simply removes the minus sign from the number that is auto-inputted into the G54 Z workshift. I was at work with limited info available on macro commands (I didn't have a Fanuc manual handy) and this came to me from my computer programming days in the 80's on my trusty C64. It works as I want it to work but there may be better ways. It works so I have no reason to look into it deeper.
    This is kind of an advanced topic/usage for macro. If someone is using this to shift workshifts it is understood they know what it is for and why/when to use it.


  • #12
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    Sometime back I tried these things on 0i Mate TC. It worked without ABS function.


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Setting Wear Offset via NC Program
      By itstom in forum Fanuc
      Replies: 6
      Last Post: 02-22-2012, 01:53 PM
    2. Need Help!- Setting up for Fluid Management program
      By juanvaldez in forum General Metalwork Discussion
      Replies: 1
      Last Post: 11-20-2010, 04:21 PM
    3. Need Help!- Setting tool data for using EIA/ISO program
      By apylus444 in forum Mazak, Mitsubishi, Mazatrol
      Replies: 4
      Last Post: 01-09-2009, 06:15 AM
    4. vf2 setting for 8x program names?
      By PaintItBlue in forum Haas Mills
      Replies: 3
      Last Post: 06-27-2008, 01:45 AM
    5. Setting or Program fault?
      By Kiwi in forum BobCad-Cam
      Replies: 20
      Last Post: 04-28-2006, 07:42 AM

    Visitors found this page by searching for:

    Nobody landed on this page from a search engine, yet!
    SEO Blog

    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.