CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > G-Code Programing


G-Code Programing Discuss G-code programing and problems here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 03-17-2008, 09:26 PM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road
G12.1 Polar cordinate interpolation

I run a lathe with live tools with an 18-i controller
I have this new part to make and the enginners said it was up to me to decide if we could make this part on my machine or out source it.
It is a fairly simple part except for one issue.

It is turned and then bored. No problem right. Wrong.
The center of I.D. hole is .063 off center to the O.D. of the part that we turn down. My idea is to bore the center on center and make the rest of the part off center.
I was testing some of my theorys with using G12.1 to create an off center round part on the O.D.

It works, but I have to incrementally step Z over to take another cut. I was wondering if I could helical intrepulate in the G12.1 mode? The prg is below and works with no errors but wondering if there is a better way.

#100=2.4 (pin diameter)
#101=.063 (off center amount)
#120=-.75 (Z DEPTH)
#121=.025(STEP AMOUNT)
(ROUGHING END MILL)
G54G98
T0505
M43
G0C0.
G97S1500M13
G0Z.3
X#502
WHILE[#5042GT#120]DO1
G54G0C0.
G1W-#121F30.
G12.1
G03X[#101/2]C[#100/2]R[#100/2]F100.
G03X-[#100+#101]C0.R[#100/2]
G03X-[#101/2]C-[#100/2]R[#100/2]
G03X[#100-#101]C0.R[#100/2]
G13.1
END1
G0X#502
M40
G28U0.
M30
Reply With Quote

  #2   Ban this user!
Old 03-18-2008, 09:14 PM
 
Join Date: May 2007
Location: USA
Posts: 913
g-codeguy is on a distinguished road
I have several questions, and a comment or two.

What kind of material is the part? I assume the O.D. is turned leaving no more than a skim cut on one side for the endmill, yes? I would think your cycle time is pretty bad, no? Must be some pretty tough material to only be taking .025 DOC in Z-axis. What size endmill are you using?

We machine eccentric bushings of various sizes. Parts are run on barfeed machines for the first operation. O.D. is finish turned and the I.D. drilled or bored leaving enough material to clean up on the finish bore eccentric operation.

Most are small enough to run in a 16C collet that has been bored the offset requirement in the tool room using a fixture made specifically for holding the 16C collets. We do have one larger part that is run in a chuck for the 2nd operation. A slug of aluminum was turned to clean up, then mounted in a 4-jaw chuck with the correct offset, and bored to the O.D. size of the part. Cut thru one side.

Works well, and definitely faster than trying to finish the O.D. with live tooling. I like using live tooling, but they sure slow cycle times down.

BTW, don't you just love programming that way? I use to make a new program every time the stock size was changed for a part. Now whenever they start changing stock sizes on me, I change the program to use variables and a While statement to figure DOCs for a G71 roughing cycle that I also add.

Same thing with drills. One program will run an insert drill, a carbide drill, a spade drill, or an HSS drill. Nice! Glad I finally taught myself to use these functions.
Reply With Quote

  #3   Ban this user!
Old 03-18-2008, 10:02 PM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road

Originally Posted by g-codeguy View Post
What kind of material is the part? I assume the O.D. is turned leaving no more than a skim cut on one side for the endmill, yes? I would think your cycle time is pretty bad, no? Must be some pretty tough material to only be taking .025 DOC in Z-axis. What size endmill are you using?

We machine eccentric bushings of various sizes. Parts are run on barfeed machines for the first operation. O.D. is finish turned and the I.D. drilled or bored leaving enough material to clean up on the finish bore eccentric operation.

Most are small enough to run in a 16C collet that has been bored the offset requirement in the tool room using a fixture made specifically for holding the 16C collets. We do have one larger part that is run in a chuck for the 2nd operation. A slug of aluminum was turned to clean up, then mounted in a 4-jaw chuck with the correct offset, and bored to the O.D. size of the part. Cut thru one side.

Works well, and definitely faster than trying to finish the O.D. with live tooling. I like using live tooling, but they sure slow cycle times down.

BTW, don't you just love programming that way? I use to make a new program every time the stock size was changed for a part. Now whenever they start changing stock sizes on me, I change the program to use variables and a While statement to figure DOCs for a G71 roughing cycle that I also add.

Same thing with drills. One program will run an insert drill, a carbide drill, a spade drill, or an HSS drill. Nice! Glad I finally taught myself to use these functions.
The material is nothing special, around 60,000 yield. Yes I turned it to just skim the one side. I was going after a good surface finish, that was the reason for .025 DOC in Z axis. I was using .625 solid carbide endmill with a weldon flat. The endmill I was using was tappered on the bottom. Low on the corners, high in the center. My lathe does not have a Y axis and I think it may be neccesary to get a good flat surface in a timely manner. Maybe a heavier cut would help the surface finish.

Eccentric bushing is exactly what we are making. O.D. is 4.75 and I.D. is 3.00 with a .063 offset.

Yea I really like program using variables. It makes things so flexable and you can really make things idiot proof or mistake proof. I have wrote several safety macros that have saved my night guys several times..( or should I say it saved me from coming in to a pilled up machine in the morning HA HA)
Reply With Quote

  #4   Ban this user!
Old 03-19-2008, 07:43 PM
 
Join Date: May 2007
Location: USA
Posts: 913
g-codeguy is on a distinguished road

Mind telling me what you are talking about when you say "safety macros"? I use a counter on insert drills that stops the machine after a set number of parts, and tells the operator to check the drill inserts. Would be interested in knowing what macros could stop a machine from crashing. Thanks.
Reply With Quote

  #5   Ban this user!
Old 03-19-2008, 08:05 PM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road

This is one that I wrote to run at the first of every prg. It is called by a G code, G11 to be exact since every prg. has work offsets it runs this within the first couple of lines of the program.

This one compares the tool geometry in the X and Z axis to an amount that I have set to be a safe length. If a tool is tool long in the z axis it will hit the back wall when doing certain operations on the main spindle. If a tool is too long in the X axis it will collide with the way covers as the turret rotates.

This prg. stops both of these things from happening.


O9015(TOOL LENGTH CHECKER MACRO)
M118
M161
(TOOL LENGTH CHECKER ON Z)
#5204=0.
#2715=#2705(SETTING T0515=T0505)
#2725=#2705(SETTING T0525=T0505)
IF[#530EQ7407]GOTO1000
IF[#530EQ7507]GOTO1000
IF[#530EQ7047]GOTO1000
IF[#530EQ1999]GOTO1000
IF[#530EQ85]GOTO1000
#1=2801
WHILE[#1LE2849]DO1
#100=#[#1]
IF[#100GT6.7]THEN#3000=110(TOOL LENGTH IN #100 TO LONG)
#1=[#1+1.]
END1

N1000
(TOOL LENGTH CHECKER ON X)
#1=2701
WHILE[#1LE2749]DO1
#100=#[#1]
IF[#100GT8.77]THEN#3000=110(TOOL LENGTH IN #100 TO LONG)
#1=[#1+1.]
END1
M99



This is a macro that I wrote to drill and tap holes in the z axis. After positiong in the Z axis it compares the machine position to a value that I determinded that was a safe distance away from the sub spindle to complete a drill or tap cycle witout running into the collet nose. I only have this problem when drilling or tapping holes in the center of the collet with less than 1.5" of material hanging out of the collet. We drill alot of bolt patterens in the end of pins so it will skip the "safety check line" if there is more than 2 holes programmed (X wont be on center) to drill on the G65 line of the main calling prg

(5/16 DRILL)
T0299
G54
M43
G0C0.
G97M13S4000
G65P9004A0.B2.C83.D-1.F20.X1.25Z.1

](A= starting degree position,B= # of holes to be drilled, C= G cycle 83 for drilling 84 for tapping. D= drill depth or tapped depth, F= feed rate ipm. X= bolt patteren diameter, Z= starting position in the Z axis.)



(3/8 TAP)
G54
T0606
M43
G0C0.
G65P9004A0.B2.C84.D-.75F.0625S1400.X1.25Z.1





O9004(DRILL&TAP MACRO)
IF[#4120EQ0606.]THEN#130=14
IF[#4120EQ0616.]THEN#130=13

#103=[360./#2]
#104=#103(TEST)
G28U0.
G0Z#26
M08
#530=0
G98

IF[#2GT1.]GOTO5022
IF[#5022GT-8.5259]THEN#3000=1(TURRET WILL HIT CHUCK)
N5022


WHILE[#530LT#2]DO1
IF[#7GT0.]GOTO50
G0H#103
IF[#7LT0.]GOTO52
N50IF[#530EQ0.]GOTO51
#103=[#5025+#104](1/28/08 TEST)
G0A#103
N51
N52G0X#24
IF[#3NE84.]GOTO100
G97M#130S#19
G99
M126
M129
N100
G[#3]X#24R[#26-#26]Q#17F#9Z#7
IF[#3NE84.]GOTO150
G80
M127
M128
N150#530=[#530+1]
IF[#7LT0.]GOTO200
IF[#530EQ1.]GOTO200
#103=[#103+#104](TEST)
N200END1
#530=#0
G28U0.M9
G80
M15
M40
M140
M9

N9000G99
M99

Last edited by theemudracer; 03-19-2008 at 08:30 PM.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 03-19-2008, 08:33 PM
 
Join Date: Feb 2008
Location: usa
Posts: 10
Pecker is on a distinguished road

Do you have simultaneous machining? Do you have a full c-axis sub? Maybe turn od on main spindle and mill offcenter in sub?
Reply With Quote

  #7   Ban this user!
Old 03-19-2008, 08:44 PM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road

Originally Posted by Pecker View Post
Do you have simultaneous machining? Do you have a full c-axis sub? Maybe turn od on main spindle and mill offcenter in sub?
Im not sure what you mean by simultaneous machining. Although the sub is indexable in .001 of a degree I am told it is not a full c-axis untill I tell the control to switch the contouring control to the 2nd spindle with a parameter change. I have not had the need to contour anything on the sub yet.


I think I can do both features in the main spindle.

I guess I could turn the od on the main and try to bore the I.D. off center with a live tool on the main also. Then pass off and face the back side off.
Reply With Quote

  #8   Ban this user!
Old 03-20-2008, 03:27 PM
 
Join Date: May 2007
Location: USA
Posts: 913
g-codeguy is on a distinguished road

Thanks, theemudracer. You are definitely doing more with variables than I am. Appreciate the examples. Was some work on your part just to post them. Thanks. I had used the 500 series to make master programs for some families of parts years ago. The last year of two I've gotten serious about using them for lots of other things. Changed my masters to use the 500 series only for controlling such things as diameters or critical groove widths, etc.

I have seen posts using the #5000 series to pick off geometry values, but wouldn't know where to find which variable correlates to which tool. Really don't think I have a need for them at this time. Our parts are relatively simple.

I've hit the way covers before with the cut-off tool. It has to extend as far as possible to always clear the subspindle chuck. Once was enough. I now know what the maximum value can be for the X-geometry. Setting it in a program to stop the machine wouldn't help much. Tool would hit before the program was ever run while indexing the turret around to touch off the tools.

I've never used the local variables. Where are the values coming from for such calls as Z#26 or S#19? Or do I need to study your examples closer to find out for myself? Same thing for [#3]. I see you are using it to for your drill/tap call, but don't see where it gets its value from.

There is a parametric course offered on line. I have every intention of taking it even though I only program for lathes. Because I don't program mills, I will probably have to struggle a lot more than most to understand using them.
Reply With Quote

  #9   Ban this user!
Old 03-21-2008, 12:02 AM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road

Yea the X tool length checker is only good if you touch some tools off and do not make a complete revolution of the turret and then start the prg. But it will work.

Local variables are passed from the main prg. to a macro prg. in the G65 line. For instance in the G65 line of the drill and tap macro call, The Z value sets #26, S value sets #19. C value sets #3 variable. PM me your email address and I will send you some excellent material for learning macros.
This is how I learned it.
Reply With Quote

  #10   Ban this user!
Old 03-21-2008, 12:05 AM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road

I also have a macro for cutting a snap ring groove or any type of groove for that matter. It will even chamfer the corners of the groove if you want.

If you want it just email me.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 03-26-2008, 09:21 PM
 
Join Date: May 2007
Location: USA
Posts: 913
g-codeguy is on a distinguished road

Thanks mudracer for the sample programs. It was much easier to see how to use local variables with a G65 call from a working program. On my programs that used common variables for both the barstop (when loading a new bar), and variables for the cut-off tool, I was able to delete 23 lines of program. Plus any changes to the variables will automatically be loaded when a particular operation is called up. My old way the operator had to remember to run the first part of the program in order to load the changed variable(s) before proceeding to the desired operation. Didn't always happen, and then I was called because the program wasn't working correctly. HAHa.

I also saw the correct way to use another logic operator (too embarrassed to say which one) so that I could further simplify some parts of existing programs.

Also want to thank you for the pdf files. Had a chance to look at them tonight, and they show more examples than the manuals we have at work. Plan on printing out some of them for further study.

Thanks a ton, friend.
Reply With Quote

  #12   Ban this user!
Old 03-26-2008, 09:27 PM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road

No probem. Glad I could finally help someone. We are all still learning.
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cnc lathe Cartesian-to-polar interpolation knightlord General Metalwork Discussion 6 01-31-2007 12:24 AM
How do you use polar interpolation positiverake G-Code Programing 5 12-07-2006 08:59 PM
Uni-Polar or Bi-Polar, or does it matter? imagineer Stepper Motors and Drives 1 12-05-2006 10:53 AM
0,0,0 cordinate help dneisler Mastercam 8 07-12-2006 11:18 PM
Electronic Utopia Bi-Polar Board (or other Bi-Polar boards) ranman Stepper Motors and Drives 51 05-29-2005 08:25 AM




All times are GMT -5. The time now is 10:09 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361