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 > General CNC (Mill and Lathe) Control Software (NC)


General CNC (Mill and Lathe) Control Software (NC) General Discussion of CNC (Mill and Lathe) control software here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 10-06-2006, 03:45 PM
 
Join Date: Oct 2006
Location: israel
Posts: 28
slow_rider is on a distinguished road
learning g code

hey all,

my partner and i are building audio devices and until now we always sent work with cnc to contractors but this might change as i am getting a small emco f1 mill from a friend as a gift. this could be perfect to dill our small boxes for potentiometrs and switches. the machine is old and you have to program it using it's keyboard in gcode. i have no idea where to start learning this. any suggestions? thanks!
Reply With Quote

  #2   Ban this user!
Old 10-08-2006, 02:42 PM
 
Join Date: Aug 2006
Location: USA
Posts: 3
Nightsdawn is on a distinguished road

A couple of places on the web list G and M codes as a reference; one can be found here: http://www.machinetoolhelp.com/Appli...G-M-codes.html

Learning how to use these codes isn't very difficult in itself. Machines can be different though, so I strongly suggest patience and plenty of scrap material. Basically, you begin with the code "command" and follow with coordinates.

The code "G20" should set you to inch units, and "G21" to metric. Assuming you're set up for inch units on the machine and to absolute coordinates:


----------------------
Example:
G00 Z1.000

The G00 indicates a rapid move to the absolute position where Z = 1.000inches.


----------------------
Example: a rapid move (not doing any cutting, but just getting from point A to point B quickly) can be entered as:

G00 X0.500 Y0.800

The G00 indicates a rapid move to the absolute position where X = 0.5 and Y = 0.800 inches.

----------------
Example:
G01 X0.500 Y1.606 F2.5

The G01 specifies a linear feed from your current position to the absolute coordinates of X = 0.500 and Y = 1.606, with a feed rate of 2.5 units/minute.

--------------
Example:
G04 #12

The G04 indicates a pause is needed for 12 ("#12") seconds. For safety concerns, never use this pause to change out tools or otherwise stick your fingers near the machine. It's only human to get your fingers in the wrong place at the wrong time, and it's only machine-like for the mill to not care and maul them anyway.

For a definite hold in the cycle, use M00 (hold until key is pressed) or M06 (the wait-for-tool-change) codes instead.

--------------
Example:
G81 X1.000 Y2.000 Z-1.500 F2.25 R0.500

(Assumes absolute coordinates and inch units used for this example)

G81 indicates a drill cycle, which is what I think you're looking for in your project as well. The X and Y indicate where the hole will be drilled. But, if the tool is currently positioned below the release plane (R0.500) at absolute 0.5 inches, the Z axis will be moved to 0.5 first. Safety consideration.

The hole will be drilled down to the absolute position of -1.5 inches (Z-1.500); note the negative sign.

It's a good idea as habit to put G80 on the next line, which clears the drill cycle from the memory.

---------------
Example:
G28
Return to "home" coordinates (0, 0, 0).

---------------
Example:
M02

End of program... this is the last line in your code.


So, a quick program using some of the examples above:

G20
G90
M00
G00 Z0.500
G00 X0.626 Y1.125
M08
G04 #2
G01 Z-0.250 F1.2
G01 X2.000 Y1.125 F2.2
G01 Z0.005
M09
G00 Z0.500
M02

This isn't the most efficient way of doing it, but just wanted to illustrate an easy-to-see example. At first, inch units and absolute coordinates are specified using the G20 and G90 codes. The, the machine waits for you to press a key to begin from the M00 code, and when received, it rapidly moves the Z axis to absolute 0.5 inches. It moves quickly to coordinates (0.626, 1.125 inches), then turns on the flood coolant. The machine pauses for 2 seconds. The operation is then set for a feed rate of 1.2 ipm, drilling to an absolute depth of -0.25 inches. Since the Z is not raised in the next line of code, you are milling a slot from your current position and depth to coodinates (2.000, 1.125) at a new feed rate of 2.2 ipm. The tool is raised to just above the part (in this case, the top of the part was Z=0.000) and the coolant turned off. The tool was then quickly raised to 0.500 inches (absolute) to clear the part a good amount more.

Everyone's machine is different though, and the code listed above is not necessarily the most efficent way to do things nor encompasses all the setting to be made. Just illustrative.

Hope it helps answer your questions a bit.
Reply With Quote

  #3   Ban this user!
Old 10-08-2006, 03:38 PM
 
Join Date: Oct 2006
Location: israel
Posts: 28
slow_rider is on a distinguished road

thanks you very much for your comments and Nightsdawn for taking the time to explain!!! i am sure this will become very handy!
Reply With Quote

  #4   Ban this user!
Old 10-16-2006, 10:11 PM
 
Join Date: May 2006
Location: usa
Posts: 27
Jeff Roark is on a distinguished road

Why learn to write g-code by hand?
There are some inexspensive CNC programs that do all the g-code stuff for you. Check out this site. www.simplecnc.com
Reply With Quote

  #5   Ban this user!
Old 10-17-2006, 08:01 AM
 
Join Date: Aug 2006
Location: USA
Posts: 3
Nightsdawn is on a distinguished road

True, there are programs out there that make life so much easier. There's also buggy programs out there as well.

I have not tried the simplecnc you are selling, so please don't consider the above as my opinion of it. But, I've just tried some other demos that have kicked out *strange things* before, lol!

Having at least a basic understanding of G and M codes is important, IMHO. If a program spits out a code that is off, you can at least go in there and fix it if needed. You're not trusting your machine and your tools to a "black box", per se.

Just my opinion.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 10-17-2006, 08:32 AM
 
Join Date: May 2006
Location: usa
Posts: 27
Jeff Roark is on a distinguished road
Verification of Tool Path

I know software can have bugs. After all it is writen by people. I always use a backplot tool to validate tool path before running it on the machine. Even if you are programming by hand it is possible to make costly mistakes.
Thanks
Jeff
Reply With Quote

  #7   Ban this user!
Old 04-21-2007, 03:12 AM
 
Join Date: Feb 2007
Location: Brunei
Posts: 632
alexccmeister is on a distinguished road

I just learn a bunch of stuff from Nightdawn regarding G and M codes. Thanks even if i am six month late looking at this thread.
Reply With Quote

  #8   Ban this user!
Old 05-06-2007, 07:47 PM
 
Join Date: May 2007
Location: USA
Posts: 8
VaRMiT is on a distinguished road
G-code

I understand that there is alot of programs that can DO IT for you. But why not use 000.1 percent of your brain to learn somthing new.


I am a beginner, Learning from G-CODE, rather a piece of software, I then would understand what the g-code does.

Just my two cents.....
Reply With Quote

  #9   Ban this user!
Old 05-06-2007, 09:39 PM
 
Join Date: Feb 2007
Location: Brunei
Posts: 632
alexccmeister is on a distinguished road

Originally Posted by VaRMiT View Post
I understand that there is alot of programs that can DO IT for you. But why not use 000.1 percent of your brain to learn somthing new.
uh??
Reply With Quote

  #10   Ban this user!
Old 05-06-2007, 09:40 PM
 
Join Date: May 2007
Location: USA
Posts: 8
VaRMiT is on a distinguished road
??

Uhh...what...im saying its a good idea to learn to do G-CODE, rather than haveing the thing do it for you.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 05-07-2007, 01:49 AM
 
Join Date: Feb 2007
Location: Brunei
Posts: 632
alexccmeister is on a distinguished road

Hi varmint,

I am just curious who you are addressing the remark to. Since I just posted here I assume you are directing it to me. But I really don't get why you said what you said. To me it sounded a bit personal. But I could be wrong. Peace!
Reply With Quote

  #12   Ban this user!
Old 05-07-2007, 07:09 AM
 
Join Date: May 2007
Location: USA
Posts: 8
VaRMiT is on a distinguished road
Code

NOOOOO!!! Nothing personal. Im a newbie. Just another view Excited about learning. I have a CNC on its way. I dont even know how to spell my name in g-code let alone tell someone else what to do. But I apologize for coming accross aggressive.
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 03:10 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