585,729 active members*
4,862 visitors online*
Register for free
Login
Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2005
    Posts
    12

    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
    Join Date
    Mar 2005
    Posts
    988
    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 :cheers:

  3. #3
    Join Date
    May 2004
    Posts
    82
    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
    Join Date
    Jan 2005
    Posts
    1880
    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. #5
    Join Date
    Mar 2005
    Posts
    988
    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,.....

    :cheers:

  6. #6
    Join Date
    Jun 2005
    Posts
    12
    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. #7
    Join Date
    Jan 2005
    Posts
    1880
    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. #8
    Join Date
    Jun 2005
    Posts
    95
    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, 04:18 PM
  2. Work coordinate in canned cycle line
    By acseatsri in forum G-Code Programing
    Replies: 1
    Last Post: 02-15-2005, 04:11 AM
  3. coverting from Right-hand to left-hand coordinate system
    By eltonr in forum Uncategorised CAM Discussion
    Replies: 6
    Last Post: 10-15-2004, 02:40 AM
  4. Work Holding Methods
    By InventIt in forum DIY CNC Router Table Machines
    Replies: 13
    Last Post: 09-14-2004, 09: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, 05:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •