584,849 active members*
4,466 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Posts
    296

    Macro program help

    I am using this macro program for a touch probe to set work coordinates for a bore hole and it works great except one quirk that i cant figure out. Macro programming is new to me so i need a little help on what im missing here.
    Here is the program. Most of this i copied from a post i found on here somewhere.

    What happens is it runs the program and probes perfectly and sets the work coordinate great, but if i run the program a second time it will set my work coordinate to a tiny number say X.0036 and Y .0021 or something like that. If i then run it again it will set the work coordinate right again. Next time is wrong and so on so forth.
    If i write in #5221=0 and #5222=0 on the first lines of the program it will run the program but will move in the wrong direction after the first touch on Y.

    (SET G54)
    (POSITION PROBE IN APROXIMATE CENTER OF HOLE)
    G91
    G31 Y10. F10.
    G0 Y-.5
    G31 X-10. (X- PROBE)
    #501=#5061
    G0 X.25
    G31 X10. (X+ PROBE)
    #502=#5061
    G0 X-.5
    G31 Y10. (Y+ PROBE)
    #503=#5062
    G0 Y-.25
    G31 Y-10. (Y- PROBE)
    #504=#5062
    G0 Y.25
    Z10.
    G90
    #5221=[#501+#502]/2
    #5222=[#503+#504]/2
    #501=0
    #502=0
    #503=0
    #504=0
    M30

    Anybody want to take a stab at this?

  2. #2
    Join Date
    Sep 2006
    Posts
    296

    Re: Macro program help

    Ok, i changed the #5061's to #5021 and the #5062's to #5022. It works fine now and seems no less accurate. Problem solved.

Similar Threads

  1. help with sub-program in macro-A
    By landslide1 in forum Fanuc
    Replies: 2
    Last Post: 05-16-2013, 05:50 AM
  2. Please help with this macro program
    By Behnod in forum Parametric Programing
    Replies: 7
    Last Post: 03-05-2013, 05:09 PM
  3. macro program
    By curly3456 in forum Fanuc
    Replies: 1
    Last Post: 02-04-2012, 11:26 PM
  4. Replies: 2
    Last Post: 03-27-2009, 09:15 PM
  5. Macro program
    By pioneerproducts in forum News Announcements
    Replies: 4
    Last Post: 10-08-2007, 09:44 PM

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
  •