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 06-04-2005, 02:01 PM
 
Join Date: May 2005
Location: US
Age: 66
Posts: 173
Chunky is on a distinguished road
Another learning module

Like the last one, this learning module is to help me. It is not intended to verify whether anyone else knows what they are doing. It might not even be a good way for me to learn but at this point in my struggle I think it might. The module I posted before didn't have an arc. What I hope you vets will do is to write a gcode for it. Then I can study it to see why you did what you did. Thanks for your time. arc a and arc b
Reply With Quote

  #2  
Old 06-06-2005, 10:54 AM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,453
ger21 is on a distinguished road
Buy me a Beer?

First thing, is that the origin (0,0) is usually at the lower left, not the upper left. But here's the code with the origin the way you have it, upper left.

Looking at it again, with out knowing the location of the endpoint, and the radius of the arc, it's not possible for me to give you the exact g-code. I'll give you something close.

The top of the workpiece is usually Z= 0, so the firs tjing you do, is lift up the tool to clear the workpiece.

G0 Z0.125 (lift tool 1/8 above work)
G0 X6.25 Y4.25 (move tool to start of line)
G1 Z-.3125 F5 (plunge 5/16" @ 5" per minute)
G1 X12 F10 (move to the start of the arc at 10" perminute)
G2 X18 Y10.25 I0 J6 F10

The last move makes an arc with a 6" radius to position X18,Y8.25. The I and J specify the centerpoint of the arc relative to the start of the arc. I is the X, J is the Y. The center of the arc is 12,10.25. The start of the arc is 12,4.25, so the I =0 (12-12) and the J =6 (10.25-4.25).

This is not exactly the way you show it, but hopefully it will help.
__________________
Gerry

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

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

  #3  
Old 06-06-2005, 11:47 AM
Rekd's Avatar
Community Moderator
 
Join Date: Apr 2003
Location: teh Debug Window
Posts: 1,877
Rekd is on a distinguished road

Originally Posted by ger21
First thing, is that the origin (0,0) is usually at the lower left, not the upper left.
...
That's a matter of opinion.

I make my targets against the sold jaw in vise operations. That's the back on the kurts. Also, on fixtures, when using locating pins, I put them to the back when possible because it's easier (safer for operators) to push the part against the pins instead of pull them.


As for arcs, I wrote this up for one of my classes when teaching them arcs on a HAAS.


Arc Definition Using I & J

Two lines of code define arcs:

Line #1 = Start Point.
Line # 2 = Direction, End Point, and Arc Center.

Start Point:
- Can be any legal move to position the tool, example- G0, G1, G2, and G3.

Direction:
- Is defined by G2 for CW motion, G3 for CCW.

End Point:
- Can be X or Y or X, Y or neither X nor Y. Only use X or Y if the end point is different than the start point (start point and end point are the same on full circles). In G90 mode, X & Y are absolute distances from part 0 to the end point of the arc. In G91, it is an incremental distance from the start point to the end point of the arc.

Arc Center:

- Is the same for both G90 & G91. It is the direction (+ or -) and distance from the start point of the arc to the center point of the arc. The direction along the X-axis is defined by the signed value of I, & the axis is defined by the signed value of J.
HTH
__________________
Matt
San Diego, Ca

___ o o o_
[l_,[_____],
l---L - □lllllll□-
( )_) ( )_)--)_)

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

  #4   Ban this user!
Old 06-06-2005, 11:56 AM
 
Join Date: May 2005
Location: US
Age: 66
Posts: 173
Chunky is on a distinguished road

I think I was told before about the proper starting place. I won't make that mistake again (left lower corner). The steps you laid out help me to see how something other than a straight line is executed. The need for this may seem ridiculous for many observers but it will help me a lot. I will study it thoroughly. Thanks
Reply With Quote

  #5   Ban this user!
Old 06-06-2005, 12:00 PM
 
Join Date: May 2005
Location: US
Age: 66
Posts: 173
Chunky is on a distinguished road
Next step

The next step for me (working backwards) is to revise the diagram showing 0/0 where it belongs and then show what the g-code (by ger21) looked like when it existed as a graphical tool path (my term- probably wrong).
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 06-06-2005, 12:03 PM
 
Join Date: May 2005
Location: US
Age: 66
Posts: 173
Chunky is on a distinguished road

Whoa! I suspect there's some good info in there but I'll have to dissect that carefully.
Reply With Quote

  #7   Ban this user!
Old 06-07-2005, 06:05 AM
 
Join Date: May 2005
Location: canada
Posts: 1,149
cyclestart is on a distinguished road

Chunky
CNC convention places the machines xy origin at lower left. Rekd is talking about offsetting the origin
to a position a given distance from machine origin by using a code such as G54 or G92. In my
opinion no matter where you shift the origin, x0,y0 remains lower left. Any move from this new
offset origin towards the machine origin now becomes a movement in the negative direction.
Learn your movement codes first and the concept of offsets will be easier to understand.
For now I would stick with the concept of x0,y0 is lower left.

From the origin (overhead view)

X movement right +
X movement left -
Y movement up +
Y movement down -

The thing to keep in mind is that you can place x0,y0 at any position on your part.
For instance, if you place X0,Y0 at the top right corner of your part all points on this part
will be X- , Y- .

Last edited by cyclestart; 06-07-2005 at 07:39 AM.
Reply With Quote

  #8  
Old 06-07-2005, 08:15 AM
Rekd's Avatar
Community Moderator
 
Join Date: Apr 2003
Location: teh Debug Window
Posts: 1,877
Rekd is on a distinguished road

Originally Posted by cyclestart
Chunky
CNC convention places the machines xy origin at lower left...
??

I haven't done my CNC conversion yet, so haven't considered that, but every commercial CNC machine I've ran has the X0 Y0 in the back right.
__________________
Matt
San Diego, Ca

___ o o o_
[l_,[_____],
l---L - □lllllll□-
( )_) ( )_)--)_)

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

  #9  
Old 06-07-2005, 10:13 AM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,453
ger21 is on a distinguished road
Buy me a Beer?

Rek'd, I don't think any commercial routers are back right. Ours is actually upper left.

Chunky, disregard this and make it lower left. You'll find that virtually all CAD programs use lower left, which makes it easiest to set up your machine that way.
__________________
Gerry

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

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

  #10   Ban this user!
Old 06-07-2005, 10:07 PM
 
Join Date: May 2005
Location: US
Age: 66
Posts: 173
Chunky is on a distinguished road
One more please

I hope you guys will suffer through one more for me. This time I have written the code by looking at what you've done. The one thing I've not really addressed with my questions is what part of the tool is used for determining its position. I can't imagine it would be anything other than the center. But I'm about to see. Will you please look at this pic and see if the gcode is correct. Thanks. DIAGRAM
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 06-08-2005, 02:27 AM
 
Join Date: May 2005
Location: USA
Posts: 263
Dave's_Not_Here is on a distinguished road

Originally Posted by Rekd
??

I haven't done my CNC conversion yet, so haven't considered that, but every commercial CNC machine I've ran has the X0 Y0 in the back right.
... so where is X0,Y0 when you face the mill from behind...?
... and where would X0,Y0 be if you faced your monitor from behind...?

... the right hand doesn't know what the left hand is doing....

... go get'um Chunky....!

Dave leaves to get a popcicle....
Reply With Quote

  #12  
Old 06-10-2005, 10:26 PM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,453
ger21 is on a distinguished road
Buy me a Beer?

Originally Posted by Chunky
I can't imagine it would be anything other than the center. But I'm about to see. Will you please look at this pic and see if the gcode is correct. Thanks.
Use the center of the tool. Your code is perfect.
__________________
Gerry

Mach3 2010 Screenset
http://home.comcast.net/~cncwoodworker/2010.html

(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
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
Learning exercise (for me) Chunky G-Code Programing 12 06-01-2005 08:05 AM
learning to g-code bush666au G-Code Programing 3 04-06-2004 06:02 AM
Could use some advise on learning CNC? Beezer General CAM Discussion 8 03-06-2004 12:12 PM
Mastercam Home Learning motomitch1 Mastercam 12 11-21-2003 07:13 AM
learning to model HuFlungDung OneCNC 6 04-18-2003 01:01 PM




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