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 05-16-2007, 05:31 PM
 
Join Date: May 2007
Location: USA
Posts: 36
Bohemund is on a distinguished road
G2 and G3 Commands

Being new to GCode, I need some help understanding of usage of the G2 and G3 commands.

How is G2 and G3 used with I, J, and R in controlling the size of arc generated? and... What's a good way to have my X-Y table generate a 0.500 R circle once, and one that goes infinitly in a circle?

FYI - My application of GCode will be for controlling an X-Y table inside an electron beam machine with a fixed gun. I also prefer to use incremental movements and presently begin my circles now from a 9:00 starting position.

Any help would be much appreciated.
Reply With Quote

  #2   Ban this user!
Old 05-17-2007, 06:17 AM
 
Join Date: Oct 2006
Location: US
Posts: 51
HIRAH is on a distinguished road

for milling, g02 is clockwise, g03 is counter-clockwise.
if this an inside circle, starting from 9:00 it would be
x-.500y0
g03 i.500.
this is climb milling

to conventional mill
x-.500y0
g02i.500

think of i as x, and j as y
x0 y.500
g02j-.500
Reply With Quote

  #3   Ban this user!
Old 05-17-2007, 11:54 AM
 
Join Date: Mar 2007
Location: USA
Posts: 123
springlakecnc is on a distinguished road

Hi, as Hira said on the g2 & g3. The I designates the center of the radi point on the x axis and j is for the y axis and k is for the z. If you need a r (radius) value, you are using software that is not real common, like that free stuff. I think its best you learn a fanuc post which is most common, like in Artsoft Mach3, cnc pro, Hass machines, Fadel machines, etc.. Also remember, in the LINE AFTER ANY CIRCLE (which includes a g2 or g3) make sure you put a g1 or g0 for feed or rapid, because on some machines, if that is not there, any axis will just go anywhere untill you hit a limit, even if it means crashing through things. Proof: Bridgeport boss 7.2 and i have seen this on other machines also. Good Luck.
Reply With Quote

  #4   Ban this user!
Old 05-18-2007, 03:41 PM
 
Join Date: May 2007
Location: USA
Posts: 36
Bohemund is on a distinguished road

Thanks you two for the explainations. I only have a bench setup to look at while making this, but I think I can go once around with this program I made...

N10 G20 G91 F20
N20 G03 X-0.25 Y0.0 I0.25 J0.0

As I said, I can't see the circle generated. That, I think, will produce me a CCW 0.500 circle starting and ending from 9:00 moving incrementally.

How can I get that circle to repeat 5 time without having to have repeat N20 5 times? And finally, how can I get that program looped infinitely? Is there a loop command thats commonly used? I tried M97, but that didn't seem to work.
Reply With Quote

  #5   Ban this user!
Old 05-18-2007, 03:46 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

For a complete circle you only need I and J.

G02 I0.0 J-0.25 will give a single circle of diameter 0.500 with the center located -0.25 away from the start point along the Y axis. At least that is how Haas machines work; some machines would put the center at 0.25 absolute.

Again on the Haas adding an L count gives you that many circles.

G02 I0.0 J-0.25 L10 gives ten complete circles.

Infinity is not allowed in the L count but then you would be a bit old by the time it finished wouldn't you?
__________________
An open mind is a virtue...so long as all the common sense has not leaked out.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 05-18-2007, 03:52 PM
jackson's Avatar  
Join Date: Oct 2006
Location: United States
Posts: 586
jackson is on a distinguished road

N3000
(.500 Endmill)
G0g20g54g90g17s3000m3
G0x0y0t4
G43z.1h3m8
G1z-.35f20.
G1y.03
G3x0y.03j-.03d03f3.
G1x0y0f10.
G0g40z1.
M21
G0g43h3z.1
G1z-.35f20.
G1y.03
G3x0y.03j-.03d03f3.
G1x0y0f10.
G0g40z1.m9
G91g28z0
M1
M6
__________________
individual who perceives a solution and is willing to take command. Very often, that individual is crazy.
Reply With Quote

  #7   Ban this user!
Old 05-18-2007, 04:07 PM
 
Join Date: May 2007
Location: USA
Posts: 36
Bohemund is on a distinguished road

Originally Posted by Geof View Post
Infinity is not allowed in the L count but then you would be a bit old by the time it finished wouldn't you?
LOL, my unit is Camsoft Pro and will be operating an X-Y table of our design. I tried what you suggested Geof but it didn't work, thanks tho.

I'm not sure what exactly that is Jackson, what is that?

Last edited by Bohemund; 05-18-2007 at 04:51 PM.
Reply With Quote

  #8   Ban this user!
Old 05-18-2007, 04:14 PM
jackson's Avatar  
Join Date: Oct 2006
Location: United States
Posts: 586
jackson is on a distinguished road

Originally Posted by Bohemund View Post
LOL, my unit is Camsoft Pro and will be operating an X-Y table of our design. I tried what you suggested Geof but it didn't work, thanks tho.

I'm not sure what exaclty that is Jackson, what is that?
you just need to read to the m21, the m21 is for my 4th axis to spin the part
but that is your g3 code
__________________
individual who perceives a solution and is willing to take command. Very often, that individual is crazy.
Reply With Quote

  #9   Ban this user!
Old 05-18-2007, 04:42 PM
 
Join Date: May 2007
Location: USA
Posts: 36
Bohemund is on a distinguished road

I fail to follow what your saying.

I'm looking for a way to loop my program without needing to repeat a program line. I'll do it if I have to, that's not a problem. Is there an alternative way that's commonly used?
Reply With Quote

  #10   Ban this user!
Old 05-18-2007, 06:41 PM
 
Join Date: Jun 2006
Location: Denton
Posts: 15
paulsmith632 is on a distinguished road

This code is used in mech soft, your welcome to try it in your program:
**to repeat gcode indefinitely:
****************************



%
N1 (first line of gcode)
G20 G00 etc.
...
.
..
.
.(more lines of code)
.
.
M1
M99 P1
%
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 05-18-2007, 09:40 PM
 
Join Date: Nov 2005
Location: USA
Age: 55
Posts: 52
Pressfit is on a distinguished road

To continuously loop your program it's just an M99 at the end. but to stop it you'd have to hit the reset button.
You might do this instead...
;
;
/M30;
M99;
%
This way you can keep the block delete switch on and it will ignore the M30.
When you're ready to stop the program just flip block delete to off to read the M30.
Reply With Quote

  #12   Ban this user!
Old 05-19-2007, 07:52 AM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

If you have the GOTO function, then

N100
program
GOTO 100

This is an infinite loop. You stop it by turning power off or a RESET, or put a conditional test inside the program that jumps (GOTO) outside of the loop.

.
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
Difference between BL and SV commands? Shizzlemah Fadal 3 03-23-2007 08:33 AM
Thread commands on 6T control Ricardo Guedes Fanuc 2 02-03-2006 12:21 AM
Simple G-code commands... WilliamD G-Code Programing 5 01-12-2006 12:27 PM
anyone ever have issues with waituntil commands? howling60 CamSoft Products 17 12-22-2005 09:07 AM
EMC & the G28/G30 Home commands Javelin276 LinuxCNC (formerly EMC2) 1 07-18-2005 03:13 PM




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