584,833 active members*
5,381 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2021
    Posts
    1

    Help with offset macro!

    Someone help, I am trying to write a macro for our CNC that will use the work offset that is already stated in the program and automatically load it into the controller, so that nobody can fat-finger it and mess it up as they are loading the offsets into the controller. If adjustments are needed, they can still be changed in the controller. But, I want to be able to use an if statement so that it cannot be changed by more than .02 or less than .02 without giving an error. Do not want to use a G10 command, want to change the system variables in the macro. Use something like this to call it, just need help writing the macro, im still learning.

    O9000
    G65 P9023 A24. T#3026 H0.01
    M99

    Any help will be greatly appreciated! Thank you!

  2. #2
    Join Date
    Feb 2011
    Posts
    353

    Re: Help with offset macro!

    Not sure if this would what you are looking for
    The n2222 will take machine co-ordinates and put them into g54
    if you are tramming a fixture point then adding multiple work offsets i use g54 as the base and add to get the work offset (#7001=#5221+3.000 x axis distance from g54 add3.00 to use g54.1p1 for the part work offset)


    G54=#5221X
    #5221Y
    #5223Z
    #5224A



    I run a subroutine to do my work offsets to keep them within the program

    M98Q2222 ( GOTO N2222 at the end of my programs run it once then bracket) or it could be done with the G65 command
    IF[ABS[#5221-15.00]GT.02]GOTO999

    blah,blah,blah

    N999#3000=1(X WORK OFFSET OFF)

    m30

    N2222

    #5221=15.000(x axis value for g54)
    #5222=7.000(y axis value for g54 )
    #5223=4.000(z axis value for g54)
    #5224=0.00(a axis value for g54)
    %

Similar Threads

  1. Macro b work offset
    By Cannon in forum Fanuc
    Replies: 18
    Last Post: 05-20-2012, 10:52 AM
  2. Macro and Z fixture offset
    By Techman in forum Fadal
    Replies: 0
    Last Post: 08-06-2009, 07:56 PM
  3. Sinumeric Offset Value macro
    By sanjeevlj in forum Mastercam
    Replies: 3
    Last Post: 05-06-2009, 11:05 AM
  4. tool offset macro
    By cnc-king in forum Fanuc
    Replies: 6
    Last Post: 09-22-2008, 04:43 AM
  5. Macro for positive offset
    By qmas99 in forum Uncategorised CAM Discussion
    Replies: 0
    Last Post: 02-12-2006, 04:37 AM

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
  •