Need Help! Help with offset macro!


Results 1 to 2 of 2

Thread: Help with offset macro!

  1. #1
    Smee1001's Avatar
    Join Date
    Jul 2021
    Location
    Columbus, Ohio
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default 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!

    Similar Threads:


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

    Default 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)
    %



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

Help with offset macro!

Help with offset macro!