603,896 active members*
6,242 visitors online*
Register for free
Login
Results 1 to 12 of 12
  1. #1
    Join Date
    Nov 2008
    Posts
    46

    Short macro problem

    Hi all,
    Can anyone shed any light on why this macro won't work. I'm just trying something simple (or so I thought) but it still won't rotate, it is now carrying out the G01 cycles 5 times and then stopping.
    Very frustrating.
    Cheers,
    Scrap.


    %
    G71 G90 G40 G80
    T03 M06
    S1500 M03
    G00 X0 Y0 Z10

    #1=0
    WHILE[#1LE360]DO1
    G01 Z-10 F200
    G01 X40 Y0 F200
    G00 Z10
    G00 X0
    G68 X0 Y0 R#1
    #1=#1+1
    END1

    M05
    M30

  2. #2
    Join Date
    Mar 2008
    Posts
    638
    I'm no macro guy but could it be the look ahead feature? I had a similar problem on our Haas. I had to limit the number of blocks the controller would look ahead with G103 P0. Then cancel that with a G103 and no "P" at the end. The P0 is disabling look ahead. P1 would limit it to 1 block, etc...
    I guess it would depend on your controller.

  3. #3
    Join Date
    Feb 2008
    Posts
    586
    Could it be rotating at the smallest increment? Try 360.(with decimal point) and #1=#1+1.

  4. #4
    Join Date
    Apr 2006
    Posts
    133
    I modified your program and ran it on our Haas simulator and it runs OK for me
    I did put in a G43 Z1. H3 D3 to call the correct offset.
    I put in a movement from X0. Y0. to X4. Y0. and returned to X0. Y0. so I could see if your logic was working. You can change the adder to 10 and it makes 36 - 4 inch long spokes from center out. I also switched from metric to english for a quicker display. I also turned off rotation with G69.
    Edit--
    I also put the #1=#1+10 before your G68 line and changed WHILE[#1LE360]DO1 to WHILE[#1LT360]DO1 because it was cutting the first pass twice.



    %
    O1000 (TEST 123)
    G17 G40 G80 G90 G00
    G53 G00 X-20. Y0.
    G53 G00 Z0.
    T03 M06
    S1500 M03
    G54 G00 X0. Y0. (added G54)
    G43 Z1. H3 D3
    #1=0
    WHILE[#1LT360]DO1
    G01 Z-.4 F200
    G01 X4.0 Y0. F200.
    G00 Z1.
    X0. Y0.
    #1=#1+10
    G68 X0. Y0. R#1
    END1
    G69
    G53 G00 Z0.
    G53 G00 X-20. Y0.
    M30
    %

  5. #5
    Join Date
    Jun 2008
    Posts
    1511
    Ok your problem was annoying me so I dug through some of my old notes and I think that I found the problem. What’s going on is it does not know what to rotate around. When you program G68X0Y0R#1 it is rotating around the current X,Y value. There is a few ways you can program this. Are you using work coordinates G54-G59 for your part center? You have to rotate around your part center. If your home position G53 is your part center position then you have to send it to the center at each rotation. I use G54. So your program must look like this.


    G71G90G40G80
    T3M6
    S1500M3
    G0X0Y0Z10

    #1=0
    WHILE[#1LT360]DO1
    G1Z-10F200
    X10Y0
    G0Z10
    X0
    #1=#1+1----JWK42 is right this should be before the G68 line
    G54G68X0Y0R#1---this way it rotates around the center of your part
    END1
    M5
    M30

    If you are using G53 as your center then you have to program it right before the G68 line with G0G53X0Y0 to send it to the center of the rotation, then let it run the G68 line then program your X,Y position from center.

    Stevo

  6. #6
    Join Date
    Apr 2006
    Posts
    133
    Stevo1
    I think Haas comes up with G54 as Modal Coordinate system
    I did this one very quickly over lunch and left out the G54 line.
    I got a range error the first test run that is why I moved the #1=#1+10 and changed the LE to LT. I think Haas can only rotate +/- 360.0 degrees. I have ran into this before and when you get past 360 degrees you have to subtract 360 from your #1 value and than you start over at 0 degrees or 3 O:Clock.
    I think it would look like this
    If[ #1 GT 360 ] #1 = [ #1 - 360 ]

    Edit
    With Haas you don't have to return to the X-Y center of rotation as long as you include the X-Y rotate points in your G68 line. We use rotate on some really big parts and it would be a big pain to return to center for each new operation.

  7. #7
    Join Date
    Jun 2008
    Posts
    1511
    I think thats pretty standard. The Fanuc's are the same way were at reset your G54 is your default modal coordinate. I used the program above with G54-G59 and worked like a charm.

    The Fanuc is nice that you can rotate over 360. Most of the time not really much of a reason to do so.

    I know it would be a PITA to send it to center at every rotation on a big part or on many rotations. I am sure there is a trick when using G53 so that you don't have to send it home but if you have G54-G59 better off just using them. I try to stay away from the G53's,G50's ect. To many oops's . I only use them when using G28 when the part is done or at tool changes.

    Stevo

  8. #8
    Join Date
    Nov 2008
    Posts
    46
    Cheers for all your help guys.
    I'll try it this afternoon.

    Thanks again to all for your time.

    Scrap.

  9. #9
    Join Date
    Jun 2008
    Posts
    1511
    No problem. Let us know how it comes out.

    Stevo

  10. #10
    Join Date
    Apr 2006
    Posts
    133

    G53 ?

    Stevo
    I think there is a question about G53 use on a Haas.
    I only use G53 to send the tool home and position the table to load/unload.
    Ex. G53 G00 Z0. sends the tool all the way to the top or home.
    G53 G00 X-20. Y0. sends the table to the front in Y and center of door in X when I have a 40 inch travel in X.
    G53 is Non Modal and only uses Minus values. Our instructor on our first Haas machine trained us to use G53 instead of G28 to return home and tool change. I don't think you could ever machine a part using G53.

  11. #11
    Join Date
    Jun 2008
    Posts
    1511
    I agree with you I don't use G53 when programming or running a part. The reason I use the G53 and G28 together is because not all machines are set up with the "Machine 0" and the "Machine Orgin" in the same position. So if my machine 0 was the center of the table and programmed G53Y0 it would go to the center of the table and hit a part if it were there. But if program G53G28 it takes the machine to machine origin which is usually safe off all axis.

    In our Fanucs we don't have to use minus directions when using G53. G53 is common work coordinate this should act like any other workshift like G54-G59 except the common is applied to every move regardless of which workshift is modal.

    The only reason I suggested to scrapper is because some people don't use there G54-G59. They use the machine 0 which is G53. If they clock a part around this machine 0 and have to send it there before rotating with G68, the G53X0Y0 is the way you have to program it.

    I to have my machine set up to do pallet changes with the G53 to bring it to position.

    Fun Stuff

    Stevo

  12. #12
    Join Date
    May 2007
    Posts
    781
    Quote Originally Posted by JWK42 View Post
    G53 is Non Modal and only uses Minus values.
    Mostly but not always true (minus values), it all depends on where the home switch is located relative to the travel limits. There are machines that put the home position at the minus end of travel and there are a few with the home position in the middle of the travel.

    Our instructor on our first Haas machine trained us to use G53 instead of G28 to return home and tool change. I don't think you could ever machine a part using G53.
    In some very early NC machines you had no choice there were no G54, 55 etc. or even G92 work shift commands. If you wanted to move the zero point you physically moved the home switch.
    But yep it was such a PITA that they very quickly developed the concept of work offsets.

Similar Threads

  1. Drill Macro problem
    By toolmanwaz in forum CamSoft Products
    Replies: 5
    Last Post: 04-01-2008, 04:47 PM
  2. Convert Fanuc Macro to Fadal Macro
    By bfoster59 in forum Fadal
    Replies: 1
    Last Post: 11-09-2007, 06:41 AM
  3. VF0E Macro Problem
    By stang5197 in forum Haas Mills
    Replies: 1
    Last Post: 06-14-2007, 11:34 PM
  4. A short cut is not always the best way!
    By planescott in forum Mach Software (ArtSoft software)
    Replies: 4
    Last Post: 03-13-2006, 03:58 AM
  5. Short G1 ignored in ver 14.7 CNC Pro
    By HuFlungDung in forum CamSoft Products
    Replies: 6
    Last Post: 10-13-2005, 04:05 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
  •