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 11-05-2006, 12:58 PM
 
Join Date: Apr 2005
Location: USA
Posts: 76
CharlieM is on a distinguished road
Smile OffSet?

I wrote a short program to go over .375 to a starting point, plunge down .125
with a .062 end mill, then go up, across, down, and back to start, retract the mill and go home leaving a .313 wide by .438 high window with .03 radius at the corners. Is there a way to make the window .323 wide by .448 high by setting a .005 offset? What would it look like in my program below?

Any help is much appreciated.

Charlie


G00 X.375 Y.000
G01 Z-.1250 F.75
G01 X.375 Y.375
G01 x.625 Y.375
G01 X.625 Y.000
G01 X.375 Y.000
G00 Z.0000
G00 X.0000 Y.0000
M30
Reply With Quote

  #2   Ban this user!
Old 11-05-2006, 02:11 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

Yes but first you have to put in the tool compensation command; G41 or G42 with the D address that has your 0.005 value. Actually depending whether your machine uses radius or diameter for tool size you may need 0.010.

Your rapid move to the start position will be: G00 G41 D? X.375 Y.000

At the end the rapid move will have G40 to cancel tool comp.
Reply With Quote

  #3   Ban this user!
Old 11-05-2006, 06:13 PM
 
Join Date: Apr 2005
Location: USA
Posts: 76
CharlieM is on a distinguished road

Can't make it work like that. When I try to load the G41 offset value the machine goes directly to the second address (G01 X.375 Y.375) and ignores the .005 offset, ruining the little window!

I never use tool radius, I program tool path and let the tool path account for the tool radius. In this case the tool is a 1/16 Dia. endmill and the tool path is 1/16 smaller than the window that I am cutting.

This is a home-built mill and the program that I am running is "Master 5".
Reply With Quote

  #4  
Old 11-05-2006, 07:48 PM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
HuFlungDung is on a distinguished road

Radius compensation is not quite that simple. You have to preplan what we call a lead-in and a lead-out to the profile. This means that you deliberately send the tool to a start position that is the comp radius away from the profile. Now, when you turn comp on with G41/G42, the controller can shift the tool from center to edge on the profile (without a visible movement) and thus prevent the spoiling of the profile.

Some old controllers did actually execute a movement when comp was turned on. But, most modern controllers combine the comp value with the first movement, creating a net vector that puts the tool edge tangent to the profile.

So what you could do, is break one side of your square in half, and add a lead-in line from there to the geometric center of the square. Also, add a lead-out line from the profile back to the center to get the tool clear of the profile when turning comp off.
__________________
First you get good, then you get fast. Then grouchiness sets in.

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #5   Ban this user!
Old 11-05-2006, 09:37 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

Originally Posted by HuFlungDung View Post
Radius compensation is not quite that simple......
On a Haas it is. Provided the first move is greater than the tool radius entry; in other words move from X0. Y0. to X.375 Y0. is plenty far enough. Similarly the move back to X0. Y0. at the end is enough to cancel.
Reply With Quote

Sponsored Links
  #6  
Old 11-05-2006, 10:01 PM
HuFlungDung's Avatar
Moderator
 
Join Date: Mar 2003
Location: Canada
Posts: 4,825
HuFlungDung is on a distinguished road

Yes, Geof, I suppose it is, but how often is it desirable to have the tool descend to cutting depth right on the finish profile?
__________________
First you get good, then you get fast. Then grouchiness sets in.

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Reply With Quote

  #7   Ban this user!
Old 11-05-2006, 10:46 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

Originally Posted by HuFlungDung View Post
Yes, Geof, I suppose it is, but how often is it desirable to have the tool descend to cutting depth right on the finish profile?
Given that the code without tool comp was doing this I figured doing it with would be no different.
Reply With Quote

  #8   Ban this user!
Old 11-05-2006, 10:47 PM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

I agree with Geof... It is simple. As long as the amount of lead in is longer than the amount of comp, it works fine. Although on some machines, it will try take up comp even though the comp is greater than the "lead in". Not many will try, but some.

Additionally, I also agree with Hu. Dropping in Z at the finish profile will often leave a mark on the profile. Now in this case, he's dropping into the corner of a small window with a small endmill, so the witness mark in this case is probably next to none. But often times, you could end up with a mark on the profile. I (as probably Hu) prefer to take up comp in this example with something like this:

G00 X.580 Y.100
G01 Z-.1250 F.75
G01 G42 D?? X.580 Y.05
G01 X.500 Y.000
G01 X.375 Y.000
G01 X.375 Y.375
G01 X.625 Y.375
G01 X.625 Y.000
G01 X.450 Y.000
G01 X.400 Y.050
G01 G40 X.400 Y.100
G00 Z.0000
G00 X.0000 Y.0000
M30

This way, you take up comp before entering the finish profile. Notice in this case I used G42. If you're cutting a window and your spindle rotation is normal direction, then according to your code you're conventional cutting. So in order for .005 comp to take effect, you need G42. In your D offset, you would have a -.005 to "overcut". Keep in mind, since you're not using a radius in the corner movement, your window will be larger but your corner radius will remain .03 .

Additionaly, for this case, you could use a G41 and still make this happen. Just use a positive comp at .005 and it will cut the same. But that is not the norm since you're "lying to the lie" to the machine if you get my drift.

Further note: I don't know anything about a "Master 5". This is based upon FANUC type or ISO code controls. I know there are a couple of home built mill type software that doesn't accept comp or has some additional movements needed in order to take up comp.
__________________
It's just a part..... cutter still goes round and round....

Last edited by psychomill; 11-05-2006 at 11:11 PM.
Reply With Quote

  #9   Ban this user!
Old 11-06-2006, 07:39 AM
 
Join Date: Apr 2005
Location: USA
Posts: 76
CharlieM is on a distinguished road

Thanks Psychomill, cutting that window has turned out to be more difficult than I expected. You are right, I should have been clinb milling instead of conventional milling. I will load this program and test it, but what do I put as the value for D??. My End Mill is 1/16 Dia.

Master5 is a simple program that is no longer available, (it has been upgraded several times) I have downloaded the newer versions but cant make sence out of them.

I have tried to use K-Cam but can't make the (F) command work for feeds.
Reply With Quote

  #10   Ban this user!
Old 11-07-2006, 12:29 AM
 
Join Date: Mar 2005
Location: Silicon Valley, CA
Posts: 982
psychomill is on a distinguished road

but what do I put as the value for D??.
That's the part I'm not sure about since I'm not familiar with your control software. On a commercial CNC though, the "D" represents the offset number to be used to control the amount. On CNC controls that I use, there is a numbered tool offset page. Since most machines have tool storage and tool changers, the offset page allows you to set the tool length and diameter offset. For example, the endmill is (in your case 1/16) Tool 1. So you store the tool length at offset "1" on the offset page. For cutter comp, you might designate offset number "21". In 21, you place a -.005 as the value. Then in the program, you use "G41 D21" to pick up the comp value.

Hope that helps. If the software you use can't accomodate the use of tool offsetting, then you'll have to reprogram your window, hard numbering the tool comp by programmed position.

Additional note: The program example I wrote is just an expanded program you wrote. That program is still conventional cutting...
__________________
It's just a part..... cutter still goes round and round....
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 11-07-2006, 01:38 PM
 
Join Date: Apr 2005
Location: USA
Posts: 76
CharlieM is on a distinguished road

If I want a .005 finish cut I will run this program first.

G00 X.380 Y.005
G01 Z-.1250 F.75
G01 X.380 Y.370
G01 x.620 Y.370
G01 X.620 Y.005
G01 X.380 Y.005
G00 Z.0000
G00 X.0000 Y.0000
M30

I was hoping there was an easier way.
Reply With Quote

  #12   Ban this user!
Old 11-08-2006, 09:56 AM
 
Join Date: Jun 2006
Location: USA
Age: 46
Posts: 478
ajl6549 is on a distinguished road

Try this:


G00 G41 D?? X.625 Y0
G01 X.375 Z-.1250 F.75 (ramp z down)
Y.375
X.625
Y0
X.375
(2nd, if ness.
Y.375
X.625
Y0
X.375)
G00 Z.0000
G40 X0 Y0
M30

This should leave a minimal entry/exit line. If you need to you can go around twice if ness. to relieve tool pressure
__________________
A.J.L.
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





All times are GMT -5. The time now is 08:14 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