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 08-21-2007, 12:16 PM
 
Join Date: Jan 2005
Location: Canada
Posts: 11
Brian Queen is on a distinguished road
Needing method for creating duplicate parts

I would like to create duplicate parts without repeating programming each time. For example I produce the g-code in BobCAD-CAM and it takes me say 10 minutes to program the one part. Now I want to produce the very same part so many inches to the right. In fact I want to produce parts in both directions like when I do an array in AutoCAD. BobCAD-CAM suggested their nesting program, but I don’t have that. Surely there must be a way of doing this without buying another program?

Brian
Reply With Quote

  #2   Ban this user!
Old 08-21-2007, 01:47 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

Surely you can take your BobCad generated program and call it as a subprogram from another program that just selects the work zeroes for the different locations?

Call the BobCad program PROG2 and write a PROG1 something like this:

PROG1
G54 M98 O(PROG2)
G55 M98 O(PROG2)
etc
etc
M30
__________________
An open mind is a virtue...so long as all the common sense has not leaked out.
Reply With Quote

  #3   Ban this user!
Old 08-21-2007, 05:45 PM
 
Join Date: Aug 2005
Location: USA
Posts: 1,622
One of Many is on a distinguished road

You could also taylor the program to use incremental moves rather than absolute position. At the end of the previous part, rapid to the start of the new part and wait for the go button. Otherwise, you could nest the parts in a parametric program to position the start point, then call each part as a subroutine as Geof states. If you use variables to reposition the starting points, then you can change the variable values in the array of parts for rows and columns as you need them without rewriting the whole program.

The start here.
End there.
Respool.

DC
__________________
Learn cause and effect through experience. Mastering those relationships is the "Common Sense" ability within the art of any trade.
Reply With Quote

  #4  
Old 08-22-2007, 08:51 AM
DareBee's Avatar
Monkeywrench Technician
 
Join Date: Jan 2004
Location: Stratford, Ont. Canada
Posts: 2,783
DareBee is on a distinguished road

You can't get much simpler than what Geof suggested. That is the best way IMO
__________________
www.integratedmechanical.ca
Reply With Quote

  #5   Ban this user!
Old 08-22-2007, 01:24 PM
 
Join Date: Nov 2006
Location: UK
Posts: 121
ChattaMan is on a distinguished road
Use G52 (datum shift)

Use a G52 in a DO WHILE loop...

O001
#500=0
WHILE[#500LE10]DO1
G52X#500
(Your BobCad prog here)
Blah, blah
G52X0
#500=#500+1(1 here represents your shift amount eg 1inch)
END1
M30

This will pitch your prog over by 1 inch in X direction, 10 times.

OR

O002
#500=0
#501=0
WHILE[#501LE5]DO2
G52Y-#501
WHILE[#500LE10]DO1
G52X#500
(Your BobCad prog here)
Blah, blah
G52X0
#500=#500+1
END1
G52Y0
#501=#501+1
END2
M30

This will pitch your prog over by 1inch in X direction, 10 times. Then repeat that, pitching over by 1inch in Y- direction, 5 times.

Only one datum to set (G54), O002 would repeat the same part 50 times. That would be quite a few work datums to set, and no messy subs or incremental programming, all done in one short prog.

Just another way of doing the same thing ;-)

Last edited by ChattaMan; 08-22-2007 at 05:21 PM.
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 08-24-2007, 04:35 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

070824-1619 EST USA

Slight modification of ChattaMan's program.

Changed LE to LT so number equals the part count rather than one more.

Added variables at the beginning of program to easily see counts and increments between parts.

Within DO1 it is not necessary to do G52 X0 each loop. This is only needed as a new initial value when G52 Y is changed.


O002

G54

#510 = 1.25 (X increment between parts)
#511 = 0.75 (Y increment between parts)

#512 = 5 (number of parts in X direction)
#513 = 10 (number of parts in Y direction)

#500 = 0 (X location relative to G54, initialized to 0)
#501 = 0 (Y location relative to G54, initialized to 0)


WHILE [#501 LT #512] DO2
G52 Y-#501

WHILE [#500 LT #513] DO1
G52 X#500
(Subroutine call to your BobCad program to keep clutter out of these loops)
#500 = #500 + #510
END1

#500 = 0
#501 = #501 + #511
END2

(move to unload location)

M30

(Your BobCad prog here as a subroutine)

.
Reply With Quote

  #7   Ban this user!
Old 08-24-2007, 05:14 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,563
Geof will become famous soon enough

I still think mine is simpler .
__________________
An open mind is a virtue...so long as all the common sense has not leaked out.
Reply With Quote

  #8   Ban this user!
Old 08-24-2007, 07:15 PM
gar gar is offline
 
Join Date: Mar 2005
Location: USA
Posts: 1,498
gar is on a distinguished road

050824-1901 EST USA

Geof:

Yours is simpler for a few, but not for a 10 x 10 matrix, or some transition point less than 100. And it may not be less work especially if this basic concept is applied for different parts.

The transition point is probably a matrix around 2 x 2.

However, if the job is setup multiple times it is only necessary to set G54 instead of the number of different G5xs that are used. One could save all the G5xs, but that is another file to keep track of, and load. Or the settings of the G5xs could be done in the program. Then what happens if the base G54 is different. So one could load all the G5xs above G54 from within the program based on G54. But that is more complex than the G52 method.

And just looking in the G52 type program you have documented and can easilly read what the matrix incrementing is.

.
Reply With Quote

  #9   Ban this user!
Old 08-25-2007, 12:22 AM
CNCRim's Avatar  
Join Date: Feb 2006
Location: usa
Posts: 947
CNCRim is on a distinguished road

Goef method subroutine is more simpler, go with that. Macro is power but can get complicate and it's hard diagnosis if want to make change later.
__________________
The best way to learn is trial error.
Reply With Quote

  #10   Ban this user!
Old 08-25-2007, 05:08 AM
 
Join Date: Nov 2006
Location: UK
Posts: 121
ChattaMan is on a distinguished road
Subs

Geof....

Yep, your way is simlper. I just try and get the machine to do the work. I'm getting lazy. But like Gar says, any number of parts and that's going to be time consuming setting all those Work Datums . Unless you do it by Macro .

Gar....

Ah, yeah....LT not LE. I was trying to keep it simple and minimize the number of variables for someone who is not used to working with them.


...and back to work datums.

Brian needs to shift his work datum. So why not use G52 Work Shift? It does what it says on the can.

I hope Brian is reading all the posts. The best way to learn is to read and try other peoples ideas. I did.

Brian has not replied yet, I presume he's still punching the numbers into his work datums (oops, I'm getting boring now!)

Reply With Quote

Sponsored Links
  #11  
Old 08-25-2007, 05:26 AM
Switcher's Avatar
Moderator
 
Join Date: Apr 2005
Location: Vectorink.com
Posts: 3,660
Switcher is on a distinguished road

I use "G90 & G91" with subs, in my Main Program file.

Main Program:
G90
Some Code
Sub_01 (G91)
G90
Some Code
Sub_02 (G91)
etc.
etc.
M30

.
Reply With Quote

  #12  
Old 08-25-2007, 05:37 AM
dertsap's Avatar
Gold Member
 
Join Date: Oct 2005
Location: canada
Posts: 3,667
dertsap is on a distinguished road
Buy me a Beer?

with g52 shifts and subs a guy has more control , if you running twenty parts and an endmill breaks for example , you can change the endmill then you can skip over the other parts and carry on from where you left off , provided you cancel the g52 after each part
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
MOST precise method of maching SMALL parts? SRT Mike General Metalwork Discussion 2 12-02-2006 09:58 PM
need duplicate cylinder made blasterboy1980 Casting Metals 0 10-29-2006 08:21 PM




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