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 > Parametric Programing


Parametric Programing (custom macro b, fadal macro, okuma user task)


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 07-26-2005, 07:27 AM
Imagineering's Avatar  
Join Date: May 2005
Location: New Zealand
Posts: 85
Imagineering is on a distinguished road
G-Code table surfacing program?

My Sacrificial Table needs surfacing to get it perfectly flat.

Is there any way of writing a Program in G-Code to do the number of passes without
hand coding every pass?
I had in mind an automatic routine that will make a full pass in the
Y-Axis direction, stepping the X-Axis one tool width and then returning to Y00,
stepping one tool width; ad infinitum, etc etc, untill done.
or, a rectangular spiraling pattern that increments/decrements by one tool width each pass.

Is this possible or is hand coding the only way to do it?
__________________
Skype me on imagineeringnz
----------------------------
Intuitor: (noun)
A person with a passion for learning and innovating that is so strong it is often more powerful than the desire to eat, sleep or seek personal wealth.
Ummm . . . Guilty as charged.
Tweet this Post!Share on Facebook
Reply With Quote

  #2  
Old 07-26-2005, 07:48 AM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 19,570
ger21 is on a distinguished road
Buy me a Beer?

Should only take a few minutes using ACE converter and any CAD program.
__________________
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)
Tweet this Post!Share on Facebook
Reply With Quote

  #3   Ban this user!
Old 07-26-2005, 07:56 AM
Imagineering's Avatar  
Join Date: May 2005
Location: New Zealand
Posts: 85
Imagineering is on a distinguished road

Originally Posted by ger21
Should only take a few minutes using ACE converter and any CAD program.
I'm now using TurboCAD - Ace - TurboCNC, and I'm sure that I can draw the path needed but I thought that there might be a way to actually 'program' with G-Code like you can with BASIC. ie;

05 'something' = 1
10 Do 'something'
15 'something' = 'something' + 1
20 GOTO 10

That sort of thing.
__________________
Skype me on imagineeringnz
----------------------------
Intuitor: (noun)
A person with a passion for learning and innovating that is so strong it is often more powerful than the desire to eat, sleep or seek personal wealth.
Ummm . . . Guilty as charged.
Tweet this Post!Share on Facebook
Reply With Quote

  #4  
Old 07-26-2005, 08:33 AM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 19,570
ger21 is on a distinguished road
Buy me a Beer?

You can, but for me it would be faster to do it in CAD. Read the TurboCNC docs, it should be in there.
__________________
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)
Tweet this Post!Share on Facebook
Reply With Quote

  #5   Ban this user!
Old 07-26-2005, 09:02 AM
Karl_T's Avatar  
Join Date: Mar 2004
Location: Dassel,MN,USA
Posts: 1,308
Karl_T is on a distinguished road

This is called parametric programing. I prefer it to CAM written programs for repetitive tasks like this. The program syntax is slightly different for every control, unfortunately. Here a program to cut the teeth in a lathe softjaw. It has two loops like you need:


;TEETH,ADJUST TRUE SOFT JAWS
;set second jaw back 0.100", third back 0.200"

(*BLEC'*',CMST';',CNDL3,CNDR4,ZRSP0,PDOF0.05,FDOV0*)

%LAPPER = 0
%ZDEPTH = 0.5000

%START:
%COUNTER = 0
%ZDEPTH = %ZDEPTH + 0.025 *;DEPTH OF CUT FOR EACH PASS
%LAPPER = %LAPPER + 1

G92 X 0.00 Y 0.00 Z %ZDEPTH
G90
G00 X 0.000 Y -0.250 Z 0.00


%LOOP:
%COUNTER = %COUNTER + 1

G42 T 02
G01 X 0.008 Y 0.000 F 3.0
G01 X 0.122 Y 0.000
G03 X 0.096 Y 0.750 I -1.304 J 0.330
G01 X 0.000 Y 0.750
G02 X 0.008 Y 0.000 I -3.986 J -0.420
G01 X 0.008 Y -0.125
G01 G 40 X 0.2857 Y -0.25
G92 X 0.000 Y -0.25 Z 0.00

IF (%COUNTER LE 9) GOTO %LOOP

G54
G00 X 0.00 Y 0.00 Z 0.00

IF (%LAPPER LE 5) GOTO %START *;DO ALL TEETH 5 TIMES
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 07-26-2005, 12:39 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,419
Geof will become famous soon enough
Geof

This is the style of program I use for facing various size one offs on a vertical cnc. I have omitted all the stuff about tool selection, rpm, etc., this is just the tool path for a 3/4" dia. tool facing 18 inches by 14 inches.

N100 G54 X0. Y0.
N101 Z0.
N102 G91 G01 Y-0.74 F100. M97 P1000 L10
N103 G28 M30
N1000 G90 X-19.5
N1001 G91 Y-0.74
N1002 G90 X0. M99

Comments:

Line N100; Put the work zero slightly more than one tool diameter positive from the corner of the workpiece nearest machine zero.
N101 Set tool offset at the finished surface.
N102 This increments the Y slightly less than one tool diameter and calls the subroutine starting at N1000 ten times.
N1000 The uses absolute positioning to face across the X distance.
N1001 This increments the Y again.
N1002 This returns in absolute back to X 0. and returns from the subroutine.

The Y travel for each call of the subroutine is 1.48" and the total Y travel is 14.8". For different size cutters and different size parts it is only necessary to change the Y increment, the X travel and the L count.
Tweet this Post!Share on Facebook
Reply With Quote

  #7   Ban this user!
Old 07-26-2005, 09:03 PM
Imagineering's Avatar  
Join Date: May 2005
Location: New Zealand
Posts: 85
Imagineering is on a distinguished road

Thanks Gerry, Karl T and Geof,
My spindle at the moment is a Dremel which will only take a 1/8 shaft as a tool. This limits me to a 3mm dia end mill. Geof, I'll have a crack at your program and substitute your tool dia to utilise my 3mm tool. It'll take a few loops of the subroutine, but I think that this is a better way than drawing it up in CAD.

Thanks guys.
__________________
Skype me on imagineeringnz
----------------------------
Intuitor: (noun)
A person with a passion for learning and innovating that is so strong it is often more powerful than the desire to eat, sleep or seek personal wealth.
Ummm . . . Guilty as charged.
Tweet this Post!Share on Facebook
Reply With Quote

  #8   Ban this user!
Old 07-26-2005, 10:11 PM
Imagineering's Avatar  
Join Date: May 2005
Location: New Zealand
Posts: 85
Imagineering is on a distinguished road

Geof,
I thought that I could manage this program OK, but it seems not.

I've rewritten it to achieve my aims of surfacing X=500 Y=380 with a 3mm dia Tool but when 'Dry Verifying' under TurboCNC it gives me an error message of "A target line (0 Word) is required". This appears to be in line N102 and I cannot figure it out. Where have I gone wrong??

Attached File.
Attached Files
File Type: txt Surfacer.txt‎ (1.3 KB, 99 views)
__________________
Skype me on imagineeringnz
----------------------------
Intuitor: (noun)
A person with a passion for learning and innovating that is so strong it is often more powerful than the desire to eat, sleep or seek personal wealth.
Ummm . . . Guilty as charged.
Tweet this Post!Share on Facebook
Reply With Quote

  #9  
Old 07-26-2005, 10:21 PM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 19,570
ger21 is on a distinguished road
Buy me a Beer?

Change P1000 to O1000. It's in the manual under M97.
__________________
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)
Tweet this Post!Share on Facebook
Reply With Quote

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

Not sure if TurboCNC supports the L126 in the M97, btw. It doesn't list it in the manual, anyway.

Also, you can change TurboCNC to possibly use the P instead of O by going to configure>dialect
__________________
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)
Tweet this Post!Share on Facebook
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 07-26-2005, 11:03 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,419
Geof will become famous soon enough
Geof

Originally Posted by Imagineering
Geof,
I thought that I could manage this program OK, but it seems not.

I've rewritten it to achieve my aims of surfacing X=500 Y=380 with a 3mm dia Tool but when 'Dry Verifying' under TurboCNC it gives me an error message of "A target line (0 Word) is required". This appears to be in line N102 and I cannot figure it out. Where have I gone wrong??

Attached File.
You haven't really gone wrong; just your machine talks wood dialect I talk metal. As Gerry said O not P.
Tweet this Post!Share on Facebook
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:14 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