Results 1 to 5 of 5

Thread: work offset change alarm

  1. #1
    Registered chucker's Avatar
    Join Date
    Nov 2007
    Location
    USA
    Posts
    173
    Downloads
    0
    Uploads
    0

    work offset change alarm

    I wrote this program to prevent operators from changing the work offset by mor than + or - .50 but for some reason it will not work quite right lets assume that my G55X was -21.1 I would put -21.05 in #609 and -21.15 in #609 it should alarm out if the operator changes the X G55 more than
    .05 in in the plus or minus or is my logic flawed
    %
    O9025(M205 CHECK G55 WORK OFFSET)
    (#609=ORIGNAL WPC X PLUS .05)
    (#610=ORIGNAL WPC X MINUS .05)
    (#611=ORIGNAL WPC Y PLUS .05)
    (#612=ORIGNAL WPC Y MINUS .05)
    (#613=ORIGNAL WPC Z PLUS .05)
    (#614=ORIGNAL WPC Z MINUS .05)
    (#5241=G55 X OFFSET)
    (#5242=G55 Y OFFSET)
    (#5243=G55 Z OFFSET)
    (#100,#101,#102,#103,#104,#105 ARE USED FOR MATH ONLY)
    #100=#5241+.05
    #101=#5241-.05
    #102=#5242+.05
    #103=#5242-.05
    #104=#5243+.05
    #105=#5243-.05
    IF[#100GT#609]GOTO1000
    IF[#101LT#610]GOTO1001
    IF[#102GT#611]GOTO2000
    IF[#103LT#612]GOTO2001
    IF[#104GT#613]GOTO3000
    IF[#105LT#614]GOTO3001
    GOTO4003
    N1000
    #3000=1(G55 X WPC TO SMALL)
    N1001
    #3000=2(G55 X WPC TO BIG)
    N2000
    #3000=1(G55 Y WPC TO SMALL)
    N2001
    #3000=2(G55 Y WPC TO BIG)
    N3000
    #3000=1(G55 Z WPC TO SMALL)
    N3001
    #3000=2(G55 Z WPC TO BIG)
    N4003(G55 X,Y,Z ALL ARE WITH IN + OR - .05)
    M99
    %
    Thanks for the help have a good turkey day


  2. #2
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    #5241 is the current value after change.
    #609 is the maximum permitted value.
    So, you have to check if #5241 is greater than #609.
    Hence, do not use #100 etc. Replace #100 by #5241 in the conditional statement. Make similar changes elsewhere.


  3. #3
    Registered
    Join Date
    Mar 2005
    Location
    Silicon Valley, CA
    Posts
    988
    Downloads
    0
    Uploads
    0
    Logic isn't flawed... all statements are working ... just not the way you want...

    I don't see where you've set #609-#614. Are you doing this in the main program? or by hand? However, assuming that you have "hard number" into them...

    Flip your "LT" and "GT" in the #100 sets.... you're looking in the wrong direction...


    But, you +/- another .050 of the set value to check against a +/- .050 by your 'default'. Kind of convoluted....

    This might be easier to follow eh?....
    Make 609-614 the actual nominal value ... no range. so you'd only need 609, 610, 611.
    Then, just check the operator condition like this:

    #100=ABS[#609]-ABS[#5241]
    IF[ABS[#100]GT.05]GOTO1000
    #101=ABS[#610]-ABS[#5242]
    IF[ABS[#101]GT.05]GOTO2000
    #102=ABS[#611]-ABS[#5243]
    IF[ABS[#102]GT.05]GOTO3000
    GOTO4003

    OR just back to back checking of each direction...

    IF[#5241GT#609]GOTO1000
    IF[#5241LT#610]GOTO1001

    ETC, ETC..
    It's just a part..... cutter still goes round and round....


  4. #4
    Registered
    Join Date
    Feb 2006
    Location
    india
    Posts
    1,273
    Downloads
    0
    Uploads
    0
    And, make sure that you insert G65/M98 P9025 in the beginning of each program.


  • #5
    Registered chucker's Avatar
    Join Date
    Nov 2007
    Location
    USA
    Posts
    173
    Downloads
    0
    Uploads
    0

    Thumbs up Work Offsets Change Alarm

    Thank You for your help I used what Psychomill posted and it work just as I wanted

    Sinha I am using a M code to call the 9025 program from the main program
    Last edited by chucker; 11-30-2009 at 10:22 AM. Reason: added info


  • Similar Threads

    1. Newbie- Tool change and H offset?
      By Rob_N in forum Fadal
      Replies: 4
      Last Post: 10-23-2008, 11:25 PM
    2. Need Help!- How too Offset on tool change?
      By SpeedsCustom in forum LinuxCNC (formerly EMC2)
      Replies: 11
      Last Post: 06-03-2008, 05:38 PM
    3. threading offset change
      By theatrewizard in forum General Metalwork Discussion
      Replies: 0
      Last Post: 04-01-2008, 07:52 AM
    4. Why do my offset automatically change?!?
      By vossman in forum Fanuc
      Replies: 8
      Last Post: 02-17-2008, 07:23 PM
    5. change offset in program
      By jianjianca in forum G-Code Programing
      Replies: 11
      Last Post: 12-22-2005, 11:48 AM

    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.