![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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
| ||||
| ||||
| 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. |
|
#4
| |||
| |||
| 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 % Last edited by JWK42; 12-04-2008 at 03:34 PM. Reason: Added G54 |
|
#5
| |||
| |||
| 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 |
| Sponsored Links |
|
#6
| |||
| |||
| 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. Last edited by JWK42; 12-04-2008 at 03:43 PM. Reason: Haas G68 rotate |
|
#7
| |||
| |||
| 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 |
|
#10
| |||
| |||
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. |
| Sponsored Links |
|
#11
| |||
| |||
| 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
| |||
| |||
|
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.
But yep it was such a PITA that they very quickly developed the concept of work offsets. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Drill Macro problem | toolmanwaz | CamSoft Products | 5 | 04-01-2008 10:47 AM |
| Convert Fanuc Macro to Fadal Macro | bfoster59 | Fadal | 1 | 11-08-2007 11:41 PM |
| VF0E Macro Problem | stang5197 | Haas Mills | 1 | 06-14-2007 05:34 PM |
| A short cut is not always the best way! | planescott | Mach Software (ArtSoft software) | 4 | 03-12-2006 08:58 PM |
| Short G1 ignored in ver 14.7 CNC Pro | HuFlungDung | CamSoft Products | 6 | 10-13-2005 10:05 AM |