Results 1 to 8 of 8

Thread: Macro Work Coordinate

  1. #1
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    12
    Downloads
    0
    Uploads
    0

    Macro Work Coordinate

    I am experimenting with shifting my work coordinates for a fixture that has multiple parts on it. This is on a Haas control. I would like to set one when the macine is set up, WC (G54), and use a macro or variable shift to set my other work coordinates. I am using sub programs for all of the machining commands to shorten up the program length. Any suggestions??

    Thanks for the help!!


  2. #2
    Registered
    Join Date
    Mar 2005
    Location
    Silicon Valley, CA
    Posts
    988
    Downloads
    0
    Uploads
    0
    I'm not sure of the variable numbers on a Haas (a programming book should tell you) but on a Fanuc related control, you can do something like this:

    Let's say you have 4 parts, 2 in 'X' and 2 in 'Y', at 4" apart.

    O500
    G90
    #5241=-[#5221+4.0] (G55 X = G54 + 4.0)
    #5242=#5222 (G55 Y = G54 Y)
    #5243=#5223 (G55 Z = G54 Z)
    #5261=#5221 (G56 X = G54 X)
    #5262=-[ABS#5222+4.0] (G56 Y = G54 Y + 4.0)
    #5263=#5223 (G56 Z = G54 Z)
    #5281=-[#5221+4.0] (G57 X = G54 X + 4.0)
    #5282=-[ABS#5222+4.0] (G57 Y = G54 Y + 4.0)
    #5283=#5223 (G57 Z = G54 Z)
    M30

    This is provided you've already picked up G54 XYZ.

    HTH


  3. #3
    Registered
    Join Date
    May 2004
    Location
    Denmark
    Posts
    81
    Downloads
    0
    Uploads
    0
    You could also temporary shift the WC if you know the distance betwen the parts. Something like this

    O0010(TEST)
    G90 G40
    ( T01 DIAM D10.0 ENDMILL)
    N1 T01 M06 (ENDMILL USER DEFINED)
    T01 G90 M01
    (PART NR 1)
    M98 P0011
    G52 X100.0 Y0.0
    (PART NR 2)
    M98 P0011
    G52 X100.0 Y100.0
    (PART NR 3)
    M98 P0011
    G52 X0.0 Y100.0
    (PART NR 4)
    M98 P0011
    G52 X0 Y0 Z0 (REMEMBER TO SHIFT BACK)
    G00 Z100.0 M09
    G53 Z0 M5
    G53 X-1000. Y0
    M30

    This program is for a FANUC and in metric( if it matters)

    Bent


  4. #4
    S.N.A.F.U. miljnor's Avatar
    Join Date
    Jan 2005
    Location
    usa
    Posts
    1,863
    Downloads
    0
    Uploads
    0
    seems like alot of work if you already know the distance... why not just type it in???

    of course if your making ALOT of parts then i can see it...
    thanks
    Michael T.
    "If you don't stand for something, chances are, you'll fall for anything!"


  • #5
    Registered
    Join Date
    Mar 2005
    Location
    Silicon Valley, CA
    Posts
    988
    Downloads
    0
    Uploads
    0
    seems like alot of work if you already know the distance... why not just type it in???
    My thoughts too.....

    Although, with the macro in the program, for repeat set up you'd only have to pick up one offset without someone "fat fingering" the keys.

    And I did think of G52, G92,.....



  • #6
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    12
    Downloads
    0
    Uploads
    0
    The reason for going this route is for future set-ups. Additionally, we are doing some circular interp moves, so if an adjustment was needed for location, programming the distance wouldn't be the best.
    Using a G52 of G92 would add a lot of shift moves to the program, while using a variable means only having to call the appropriate work coordinate.
    On the next set-up, the operator will only have to pick up one location, and the rest will fall into place.

    Thanks for all the help!!


  • #7
    S.N.A.F.U. miljnor's Avatar
    Join Date
    Jan 2005
    Location
    usa
    Posts
    1,863
    Downloads
    0
    Uploads
    0
    I didn't mean to not use the offsets. I meerly ment for 4 offsets i would have just typed them into the offset registers. Although using a macro for future set ups does remove the fumble finger F#$K up. just seamed like alot of code for the amount of fixtured offsets your using.

    I ran a job off of a fixture plate with just under 30 fixtures and something like this would have been a huge timesaver..
    thanks
    Michael T.
    "If you don't stand for something, chances are, you'll fall for anything!"


  • #8
    Registered deanrach's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    77
    Downloads
    0
    Uploads
    0
    Similar to Bent, you can also do as follows (since you already know the locations).

    O0010(TEST)
    G90 G40
    ( T01 DIAM D10.0 ENDMILL)
    N1 T01 M06 (ENDMILL USER DEFINED)
    T01 G90 M01
    G54 (PART NR 1)
    M98 P0011

    G55 (PART NR 2)
    M98 P0011

    G56 (PART NR 3)
    M98 P0011

    G57 (PART NR 4)
    M98 P0011

    G00 Z100.0 M09
    M30

    G10 is extremely powerful as well ................


  • Similar Threads

    1. Help teach G-code for rookie
      By HighOctane in forum G-Code Programing
      Replies: 16
      Last Post: 03-16-2006, 10:18 AM
    2. Work coordinate in canned cycle line
      By acseatsri in forum G-Code Programing
      Replies: 1
      Last Post: 02-14-2005, 10:11 PM
    3. coverting from Right-hand to left-hand coordinate system
      By eltonr in forum General CAM Discussion
      Replies: 6
      Last Post: 10-14-2004, 09:40 PM
    4. Work Holding Methods
      By InventIt in forum DIY CNC Router Table Machines
      Replies: 13
      Last Post: 09-14-2004, 04:13 AM
    5. What is 2.5 d work
      By Patrick2by4 in forum DIY CNC Router Table Machines
      Replies: 9
      Last Post: 07-05-2004, 12:04 PM

    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.