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-25-2007, 01:53 PM
 
Join Date: Mar 2007
Location: UK
Age: 60
Posts: 493
Robin Hewitt is on a distinguished road
This should be easy...

N20 G01 X94.625 Y125.000 F320.000
N21 G03 X85.000 Y134.625 R9.625 F320.000

So I get the start and end points on the arc, the radius and the direction.

Unless the separation happens to be 2r there are two possible solutions, two possible locations for the centre of the arc.

Find one center, mirror it across the two points and get another possible center.

Perhaps I missing something, not understanding

Terminally frustrating, have 3 axis mill, have g-codes, need to write an interface, not an Ixxx or Jxxx in sight, stuck, HELP
Reply With Quote

  #2  
Old 05-25-2007, 02:26 PM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,454
ger21 is on a distinguished road
Buy me a Beer?

G3 is CCW, G2 is CW. There's only one way to do the arc in your code. Where you may run into problems is arcs of greater than 180°. Then you should either split them up, or use IJ arcs instead of R arcs.
__________________
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   Ban this user!
Old 05-25-2007, 02:32 PM
 
Join Date: Mar 2007
Location: UK
Age: 60
Posts: 493
Robin Hewitt is on a distinguished road

Well done Gerry

I put in a >180 degree arc and it obligingly split it in to 2.

So I simply calculate both arcs and cut the shorter.

Many thanks

Robin
Reply With Quote

  #4   Ban this user!
Old 05-26-2007, 01:13 PM
dcoupar's Avatar  
Join Date: Mar 2003
Location: USA
Posts: 2,312
dcoupar is on a distinguished road

Robin,

Many CNC's (Fanuc, Yasnac, Haas, etc.) allow R for any arc up to 359.999 degrees. Only one stipulation: If arc is 180 degrees or less, program R, if arc is greater than 180 degrees, program R-(minus). Full circles require I & J.

Dave
Reply With Quote

  #5   Ban this user!
Old 05-27-2007, 03:22 PM
 
Join Date: Mar 2007
Location: UK
Age: 60
Posts: 493
Robin Hewitt is on a distinguished road

I've done that bit...

Other G codes he's using (G-Simple), is there a list somewhere? No sticky?

G28 Rapid move to origin.
Where the heck is origin? 0,0? 0,0,0 would be a disaster in the making First co-ordinate? Somewhere of my choosing? Can't see him setting it anywhere, he uses it before a tool change.

G54-59 Select co-ordinate system
Only found G54, presumed it is for absolute, but he also uses...

G90 Absolute distance mode.
Reply With Quote

Sponsored Links
  #6  
Old 05-27-2007, 04:05 PM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,454
ger21 is on a distinguished road
Buy me a Beer?

What control are you using? G codes can vary a bit between controls. With that in mind, here's a list.
http://www.teskolaser.com/gcode_list.html

As for G28, you usually need to "home" the machine or manually pick a reference point before calling G28. Yes, it should be 0,0,0.

G54-G59 = user defined coordinate offsets

G90 = move to absolute coordinates, vs G91= move incrementally from prevoius location.
__________________
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

  #7   Ban this user!
Old 05-27-2007, 05:36 PM
 
Join Date: Mar 2007
Location: UK
Age: 60
Posts: 493
Robin Hewitt is on a distinguished road

Hi Gerry

I'm using G-Simple on account of it's a freebie and can accept my dxf's.

I'm driving the steppers on my mill through the paralel port on a DOS machine using the timer interrupt. All the stepping command stuff happens in the background, so I can fool about doing fancy graphics on screen until the Active flag goes away. I kinda built the hardware and wrote the software before I discovered cnczone and realised I didn't have to

OTOH it does make it very easy to patch.

This program I'm writing converts the G codes to my own format which is a sort of compressed dxf.

best regards

Robin
Reply With Quote

  #8   Ban this user!
Old 05-30-2007, 02:56 PM
 
Join Date: Feb 2007
Location: Greece
Posts: 41
S.Kontogiannis is on a distinguished road
G28 and GSimple

(From Haas operators manual)
G28 Return To Reference Point

The G28 code is used to return to the machine zero position on all axes. If an X,Y,Z or A is specified on the same block (meaning the same line), only those axis will move and return to the machine's zero point. If X,Y,Z or A specifies a different location that the current location, the the movement to machine zero will be through the specified point...

GSimple programs (usually) contain following lines:

G28 G91 Z0 (near the beginning of the program)

G28 G91 Z0
G28 G91 Y0 (near the end of the program)

G28 G91 Z0 will move to the Z origin (that is move the tool up) through a point which is 0 mm (or inch) away from the current (G91 means relative position) -that is through the current point.

This part of the code is just for security. The machine will move up and then execute the rest of the code.

G28 G91 Y0 drives the table out, so you can easily reach your part.

By the way, these commands are nor "hardwired" into GSimple. Look in the configuration file, and you will find following lines:

# Program will start with a G28 G91 Z0 (move z axis to mashine origin)
PROGSTART G28 G91 Z0

# And will end with
# Semicolons are used as line separators
PROGEND G28 G91 Z0;G28 G91 Y0;G90


If you delete them (or make them comments by inserting a # at the start of the line) G28 will disappear from the code (with the execption of the Drill-Cleaning Option selecteable through the G-Code/make Options menu)
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
Easy Being Green...& Your Job fizzissist Environmental & Alternate Energy 16 05-22-2007 12:15 PM
How easy is it? SPD Employment Opportunity 26 03-03-2007 01:50 AM
Easy CNC and Easy Stepp'n kylecroft CNCzone Club House 5 02-18-2007 11:54 AM
Pro Nc And Easy Dnc SMACUSTOMS General CNC (Mill and Lathe) Control Software (NC) 0 05-07-2006 05:08 PM
Please be easy, I'm new sin-city-custom General Metal Working Machines 4 03-01-2005 10:20 AM




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