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 09-01-2009, 09:38 PM
 
Join Date: Oct 2008
Location: USA
Posts: 68
Ranscon is on a distinguished road
I need a very very simple g-code file please.

I have no idea how to write g-code. I would like a file to make keyholes. I just need something that starts at X0, Y0, Z0.2, lowers Z to Z-0.35, then moves to Y0.6, then returns to Y0, then returns Z to Z0.2. I will just put the bit where I need it and zero X and Y before running it. I will post a file that I think is close to what I need. If someone can tell me what to add, I would really appreciate it.

Thanks, Jeff

(BEGIN PREDATOR NC HEADER)
(MACH_FILE=3AXVMILL.MCH)
(MTOOL T1 S1 D.125 H2.125 DIAM_OFFSET 1 = .0625) (don't believe this will matter(wrong bit)
(SBOX X0. Y0. Z-1. L0. W.5 H1.)
(END PREDATOR NC HEADER)

%
O100
(PROGRAM NUMBER)
(PROGRAM NAME - KEYHOLE UP.TAP)
(POST - MACH 3 MILL NO ATC)
(DATE - MON. 08/31/2009)
(TIME - 07:07PM)

N01 G20 G40 G49 G54 G80 G90 G91.1
N02 G53 Z0.2


N03 T1 M06
N04 S10000 M03
N05 G00 G43 H1 Z.2 M08
N06 G90 G54 X0. Y0.
N07 G01 Z-.350 F20.
N08 Y.5 need something added here please to return Y to 0
N09 G00 Z.2
N10 M09
N11 M05
N12 G53 Z0.2
N13 G53 Y0.
N14 M02

(END OF PROGRAM)

N15 M30
%
Reply With Quote

  #2   Ban this user!
Old 09-02-2009, 12:16 AM
 
Join Date: Oct 2008
Location: USA
Posts: 68
Ranscon is on a distinguished road

Between lines N08 and N09 can't I just add an N08.5. Does it need to be just a Y0 or do I need to make it a G53 Y0 to make it move? Thanks, Jeff
Reply With Quote

  #3   Ban this user!
Old 09-02-2009, 05:55 AM
Superman's Avatar  
Join Date: Dec 2008
Location: Krypton
Age: 51
Posts: 1,555
Superman is on a distinguished road
Buy me a Beer?

Originally Posted by Ranscon View Post
lowers Z to Z-0.35, then moves to Y0.6, then returns to Y0, then returns Z to Z0.2. I will just put the bit where I need it and zero X and Y before running it. I will post a file that I think is close to what I need. If someone can tell me what to add, I would really appreciate it.

%
O100
(PROGRAM NUMBER)
(PROGRAM NAME - KEYHOLE UP.TAP)
(POST - MACH 3 MILL NO ATC)
(DATE - MON. 08/31/2009)
(TIME - 07:07PM)

N1 G20 G40 G49 G54 G80 G90 G91.1
N2 G53 Z0.2
N3 T1 M06
N4 S10000 M03
N5 G00 G43 H1 Z.2 M08
N6 G90 G54 X0. Y0.
N7 G01 Z-.350 F20.
N8 Y0.6 ( G1 is already active -so not needed )
N8 Y0. ( this is to go back to the 'descend in' point )

N9 G00 Z.2
N10 M09
N11 M05
N12 G53 Z0.2
N13 G53 Y0.
N14 M30
%
Reply With Quote

  #4   Ban this user!
Old 09-02-2009, 05:34 PM
 
Join Date: Apr 2008
Location: USA
Posts: 502
SBC Cycle is on a distinguished road

Originally Posted by Ranscon View Post
Between lines N08 and N09 can't I just add an N08.5. Does it need to be just a Y0 or do I need to make it a G53 Y0 to make it move? Thanks, Jeff
You can just repeat N08 or N09 like Superman did if hand editing. If Mach doesn't like the duplicate line, just use Predator to resequence the file.

And just to verify, feed rates are usually modal (meaning the control will keep using it unless you give it something else). You would need to add an F on the same line as your first Y move if you want it to feed at a rate different than F20.
Reply With Quote

  #5   Ban this user!
Old 09-02-2009, 05:56 PM
 
Join Date: Apr 2008
Location: USA
Posts: 502
SBC Cycle is on a distinguished road

It looks like you are using BobCAD. If you are, try this little trick.

Make a copy of the line on a different Z level, I made one at Z-0.5, then connect one of the ends. Make a contour. Then use a Profiling function and select this little contour. BobCAD will completely ignore the Z level and the toolpath will reverse itself. It might not seem worth it for a single line, but if you want to reverse direction without lifting Z on a long profile without hand editing, this is the easiest way I've found. See the code output in the pic.
Attached Thumbnails
Click image for larger version

Name:	Tricky Contour.jpg‎
Views:	72
Size:	39.2 KB
ID:	87853  
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 09-02-2009, 06:13 PM
 
Join Date: Oct 2008
Location: USA
Posts: 68
Ranscon is on a distinguished road
Thumbs up

Thanks all, I started out with Superman's mod and it works just fine.
Jeff
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
Need help with simple G code Step by Step Coding 2 10-24-2008 08:49 PM
Simple G-Code program? N4NV G-Code Programing 10 03-24-2006 06:35 PM
Need help with simple .DXF file Idle hands DeskCNC Controller Board 0 05-29-2005 03:40 PM
Mill file for SS simple 5804 PCB driver pminmo General Electronics Discussion 4 06-17-2004 07:06 AM
Perhaps a bug in simple one line code?? thuffner3 TurboCNC 3 02-02-2004 08:21 PM




All times are GMT -5. The time now is 12:21 AM.





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