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 07-28-2006, 11:47 AM
 
Join Date: Jul 2006
Location: canada
Posts: 7
cibressus is on a distinguished road
G03

Sagely minds of the CNC Zone.

I am working on a program to make holes around a center point. (you can check it out here)
like this (x is center point, 0s are holes):
0
0 x 0
0
At anyrate, whats the best way to make a round hole using the G03 or G02 command?

Also, i'm considering implementing a piece of code where you can enter in your own gcode at each location drill point arround the center hole. but i can't think of a real use for it. your thoughts?
Reply With Quote

  #2   Ban this user!
Old 07-29-2006, 12:40 AM
 
Join Date: Jul 2006
Location: USA
Posts: 14
wmyerscnc is on a distinguished road

I have a format I use frequently. I will assume the cutting path is at a 1.000 radius for simplicity. you can easily scale it appropriately:

G00X0Y0
Z.1
G01Z-1.
G41D1(CUTTER COMP LEFT)
G01X.5Y-.5
G03X1.Y0I0J.5
G03I-1.J0
G03X.5Y.5I-.5J0
G01X0Y0
G40
G00Z.1

Good luck.
Reply With Quote

  #3  
Old 07-29-2006, 02:06 AM
dertsap's Avatar
Gold Member
 
Join Date: Oct 2005
Location: canada
Posts: 3,667
dertsap is on a distinguished road
Buy me a Beer?

create a g3 sub program using g91 , and execute the sub at each abslute position
Reply With Quote

  #4   Ban this user!
Old 07-29-2006, 04:51 PM
 
Join Date: Jul 2006
Location: canada
Posts: 7
cibressus is on a distinguished road

Originally Posted by wmyerscnc
I have a format I use frequently. I will assume the cutting path is at a 1.000 radius for simplicity. you can easily scale it appropriately:

G00X0Y0
Z.1
G01Z-1.
G41D1(CUTTER COMP LEFT)
G01X.5Y-.5
G03X1.Y0I0J.5
G03I-1.J0
G03X.5Y.5I-.5J0
G01X0Y0
G40
G00Z.1

Good luck.
can you explain the g41 and g40 a bit? i tried playing arround with the numbers on my simulator, but the only thing that seems to make a difference is removing the line, which makes the hole a bit bigger.
Reply With Quote

  #5   Ban this user!
Old 07-29-2006, 09:59 PM
 
Join Date: Jul 2006
Location: USA
Posts: 14
wmyerscnc is on a distinguished road

G41 and G42 are for left and right cutter radius compensation. G40 cancels either. Most machines have this capability, but some do not. It allows you to compensate for variations in cutter size or deflection, and in this case make the hole larger or smaller by adjusting an offset in the machine control. The "D1" specifies that it will use the value stored in offset #1 for the compensation. This is common nomenclature. Most controls require that compensation does not start or end on an arc, and should be done on a linear move.

As Dertsap said, make the path incremental as such:

O0001
(POSITION AND MILL CIRCULAR HOLE)
G90 G00 X0 Y0 Z.1
M98 P0002
G90 G00 X1. Y0 Z.1
M98 P0002
G90 G00 X1. Y1. Z.1
M98 P0002
G90 G00 X0 Y1.Z.1
M98 P0002
M30

O0002
(CIRCULAR HOLE SUB)
G90Z.1
G01Z-1.
G41D1(CUTTER COMP LEFT)
G91G01X.5Y-.5
G03X.5Y.5I0J.5
G03X0Y0I-1.J0
G03X-.5Y.5I-.5J0
G01X-.5Y-.5
G40
G90G00Z.1
M99

If your machine supports the G65 command, you can use the same sub program for any size hole:

O0001
(POSITION AND MILL CIRCULAR HOLE)
G90 G00 X0 Y0 Z.1
G65 P0002 A1.0 (1.0 RADIUS)
G90 G00 X1. Y0 Z.1
G65 P0002 A2.0 (2.0 RADIUS)
G90 G00 X1. Y1. Z.1
G65 P0002 A1.5 (1.5 RADIUS)
G90 G00 X0 Y1.Z.1
G65 P0002 A1.0 (1.0 RADIUS)
M30

O0002
(VARIABLE RAD CIRCULAR HOLE MACRO)
G90Z.1
G01Z-1.
G41D1(CUTTER COMP LEFT)
G91G01X[#1/2]Y-[#1/2]
G03X[#1/2]Y[#1/2]I0J[#1/2]
G03X0Y0I-[#1]J0
G03X-[#1/2]Y[#1/2]I-[#1/2]J0
G01X-[#1/2]Y-[#1/2]
G40
G90G00Z.1
M99

Last edited by wmyerscnc; 07-29-2006 at 10:00 PM. Reason: typo
Reply With Quote

Sponsored Links
  #6  
Old 07-30-2006, 11:06 AM
*Registered User*
 
Join Date: Nov 2005
Location: USA
Posts: 274
Bluesman is on a distinguished road
Macro Sub

For hole machining

8000(PILLAR HOLES)
#100=1.0(CUTTER DIAMETER)
#101=30.0(X CENTRE)
#102=30.0(Y CENTRE)
#103=0.0
#104=30.0(DEPTH OF HOLE)
#105=50.0(DIA OF HOLE)
#106=3000(SPNDLE SPEED)
#107=500.0(FEED)
#108=10(TOOL POS)
#110=20.0(DEPTH OF CUT)
G00G91G28Z0.0
G91G28X0.0Y0.0
T#108M06
G00G90G54X#101Y#102S#106M03
G43Z10.0H#108M08
N1WHILE[-#104LE#103]DO1
#103=[#103-#110]
IF[-#104GT#103]GOTO20
G1Z#103F[#107/3]
G03X[#101+#105-#100/2]R[[#105-#100]/4]F#107 I-[#105/2-#100/2]J0.0
X#101R[[#105-#100]/4]
G00Z10.0
END1
N20#103=-#104
G01Z#103F[#107/3]
G03X[#101+#105-#100/2]R[[#105-#100]/4]F#107[[#10-#100]/4]
G00Z10.0 M09
G00G91G28Z0.0
G91G28X0.0Y0.0
M30
Reply With Quote

  #7  
Old 07-30-2006, 01:41 PM
tobyaxis's Avatar
Moderator
 
Join Date: Jan 2006
Location: USA
Posts: 4,396
tobyaxis is on a distinguished road
Arrow G3 and G13

This may not be on topic but has personal liking. A Yasnac MX2 Control has a G12/G13 which is a Spiral Interpolation. It starts in the middle and spirals out.

This removes a lot of material pretty fast with a lot less stress on the End Mill. Incorporated into a Sub-Program it is very useful. As for now it is a Canned Cycle. Maybe someone here can write a Macro for this? This had a pre-drilled hole first.

%
O9997
(G13 FORMAT)
G0G17G40G49G80G90M5
G91G28Z0M9
N1(REM .75D 3FLT C/C S/C M42 CBT)
G90G54G43G0H1X0Y0Z1.0S3500M3
G1Z.1F50.0
Z-.5F25.0
G13I.5D31K3.0Q.5F45.0
G1Z.1F75.0
G90G0Z1.0
G80M9
G91G28Z0M19
M30
%

G13 (CCW Interpolation)
I (Starting Arc Radius)
D (Tool Offset Designation Number)
K (Radius of the Finished Circle)
Q (Radius Increment or Step Over Distance)
F (Feed Rate "IPM")
**Note Parameter #6225 has to be set to use "D31" Radius Compensation G41/G42

Here is a basic Picture of what this Canned Cycle does
Attached Thumbnails
Click image for larger version

Name:	G13 EX.JPG‎
Views:	58
Size:	85.9 KB
ID:	20471  
__________________
Toby D.
"Imagination and Memory are but one thing, but for divers considerations have divers names"
Schwarzwald

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

www.refractotech.com

Last edited by tobyaxis; 07-30-2006 at 02:02 PM.
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:12 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