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 07-11-2009, 08:01 PM
bigz1's Avatar  
Join Date: Apr 2006
Location: NZ
Posts: 485
bigz1 is on a distinguished road
Repeating circles?

Hi I am very new to actual G code prograning but how do you repeat a circle the same radius in different locations?
Reply With Quote

  #2   Ban this user!
Old 07-11-2009, 09:06 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,565
Geof will become famous soon enough

Write a program for the circle using the center of the ciorcle as your work zero location.

Make this a sub program.

Write a program to call this program after using a G52 command to place a local work coordinate at the circle center.

For instance if your main work zero is G54 and your circles are at X4. Y0., X2 Y0., X0. Y0., X-2. Y0., X-4. Y0. your program structure would be something like this.

O00001 (circle main program)
stuff
G52 X4. Y0.
M98 O00002
G52 X2. Y0.
M98 O00002
G52 X0. Y0.
M98 O00002
G52 X-2. Y0.
M98 O00002
G52 X-4. Y0.
M98 O00002
stuff
M30


O00002 (Circle cutting program)
All the commands to cut the circle using X0. Y0. as the center of the circle
M99
__________________
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 07-13-2009, 06:29 PM
bigz1's Avatar  
Join Date: Apr 2006
Location: NZ
Posts: 485
bigz1 is on a distinguished road

Appreciate the help Geoff unfortunately I couldn't get it to work. Here's what I have for the first circle:-

N10 G71 LX=1980 LY+760 LZ=37 HC1 Z=PRK
N12 BOT=280 LFT=280 RAD=150
N20 X=BOT Y=LFT+(RAD-8) Z=PRK PRF=LPZ/2 F3 TP2 L=PON
N30 G2 X=BOT Y=LFT+(RAD-8) J+LFT I=PON
N40 L=PSU
N50 X=BOT Y=LFT+(RAD-8) Z=PRK PRF=LPZ F3 TP2 L=PON
N60 G2 X=BOT Y=LFT+(RAD-8) J+LFT I=PON
N70 L=PSU
N80 X=BOT Y=LFT+(RAD+4) Z=PRK PRF=-14 F3 TP2 L=PON
N90 G2 X=BOT Y=LFT+(RAD+4) J+LFT I=PON
N100 L=POFF
N110 X=PRK Y=PRK
%

I am using a Biesse Rover 321 R ATC with a CNI NC 481 controller.
Reply With Quote

  #4   Ban this user!
Old 07-13-2009, 07:05 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,565
Geof will become famous soon enough

Originally Posted by bigz1 View Post
.....I am using a Biesse Rover 321 R ATC with a CNI NC 481 controller.
Those Italian machines that have their own version of G-code. I owned one briefly in partnership with a friend who is a cabinet maker; after six months I sold my share to him because programming the Biesse was so different to metal working machines it drove me up the wall.
__________________
An open mind is a virtue...so long as all the common sense has not leaked out.
Reply With Quote

  #5   Ban this user!
Old 07-14-2009, 06:34 PM
bigz1's Avatar  
Join Date: Apr 2006
Location: NZ
Posts: 485
bigz1 is on a distinguished road

Originally Posted by Geof View Post
Those Italian machines that have their own version of G-code. I owned one briefly in partnership with a friend who is a cabinet maker; after six months I sold my share to him because programming the Biesse was so different to metal working machines it drove me up the wall.
Thanks Geoff. Yes its driving me up the wall with no manual and trying to decipher the programs in the memory.
Reply With Quote

Sponsored Links
  #6  
Old 07-14-2009, 09:18 PM
ger21's Avatar
Community Moderator
 
Join Date: Mar 2003
Location: Shelby Twp, MI....USA
Posts: 20,455
ger21 is on a distinguished road
Buy me a Beer?

What did you use to get that first program? Did you hand code it? Does Biesse have a G or M code to offset the origin?
__________________
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 07-24-2009, 10:30 PM
bigz1's Avatar  
Join Date: Apr 2006
Location: NZ
Posts: 485
bigz1 is on a distinguished road

Originally Posted by ger21 View Post
What did you use to get that first program? Did you hand code it? Does Biesse have a G or M code to offset the origin?
The code was modified from a program already in the machine. The previous operator who left before I started working for the company 4 weeks ago used to hand code it. At the moment I couldn't tell you how to offset the origin. I have learnt so far that you cant create an arc by simply altering the I and J.
Reply With Quote

  #8   Ban this user!
Old 07-28-2009, 08:14 PM
 
Join Date: Feb 2008
Location: uk
Posts: 384
battwell is on a distinguished road

damn thats a lot of code for a circle!!!!
i have a 321r atc with 481 controller. in uk

the best circles are using circle centre at zero, zero
if cutting from inside circle make a segment from centre to circumference, arc to end point centres known eg i0 j0 then lead back out to centre.
depending on cutter used you may wish to ramp the cutter down on lead in

use xo=50 yo=50 (letter ow not zero) to place centre of circle at 50, 50

depending if your cutting on line g40, left of line or right of line etc you must add a lead in and lead out.
see my pool table video on you tube biessebod. i can send you the code for it if you like.
order yourself an expensive manual and fault code book from biesse uk approx £125 BUT TOTALLY INVALUABLE.
Reply With Quote

  #9   Ban this user!
Old 07-28-2009, 08:26 PM
 
Join Date: Feb 2008
Location: uk
Posts: 384
battwell is on a distinguished road

your code is written to offset the tool radius... presumably for 16mm cutter?

the best way to do this is set tool table up correctly with exact tool diameter ie 15.95mm etc which can be easily changed at each resharpening then use g41 or g42 to offset the tool.

ring me if you wish and il explain it. 07866631400
where are you based?
Reply With Quote

  #10   Ban this user!
Old 07-28-2009, 08:54 PM
 
Join Date: Feb 2008
Location: uk
Posts: 384
battwell is on a distinguished road

this is a sample program calling a external sub routine for a hole at different positions. i will paste one of a program with internal sub routine if i can find one!
N19 L=G7 QX=1715 QY=-2 PRF=LPZ+6 YF=930 F=5 QQN=2
N20 L=GC1 UT=1
N30 X20 Y-10 Z=PRK PRF=LPZ+4 F6 G41 TP1 L=PON
N39 G1 X79
N40 G1 Y16
N50 G1 X16 BR10
N60 G1 Y79
N70 G1 X0
N90 G1 Y=LPY-79
N99 G1 X16
N99 G1 Y=LPY-16 BR10
N99 G1 X79
N99 G1 Y=LPY
N99 G1 X=LPX-79
N99 G1 Y=LPY-16
N99 G1 X=LPX-16 BR10
N99 G1 Y=LPY-79
N99 G1 X=LPX
N99 G1 Y79
N99 G1 X=LPX-16
N99 G1 Y16 BR10
N99 G1 X=LPX-79
N99 G1 Y0
N99 G1 X20
N99 G1 X-20 Y-10 G40
N100 L=PSU
N110 XO=LPX/2-750 YO125 L=H112
N120 XO=LPX/2-275 YO85 L=H112
N130 XO=LPX/2+275 YO85 L=H112
N140 XO=LPX/2+750 YO125 L=H112
N210 X=LPX/2+620 Y109 Z=PRK PRF=LPZ+4 G40 TP1 L=PON
N219 G1 Y115
N220 L=PSU
N230 X=LPX/2+410 Y109 Z=PRK PRF=LPZ+4 G40 TP1 L=PON
N239 G1 Y115
N240 L=PSU
N210 X=LPX/2-410 Y109 Z=PRK PRF=LPZ+4 G40 TP1 L=PON
N219 G1 Y115
N220 L=PSU
N230 X=LPX/2-620 Y109 Z=PRK PRF=LPZ+4 G40 TP1 L=PON
N239 G1 Y115
N240 L=PSU
N277 X=LPX/2-300 Y=LPY/2-219 Z=PRK PRF=3 F10 G41 TP1 L=PON
N277 G1 X=LPX/2-300 Y=LPY/2-209.5
N277 G1 X=LPX/2-500
N277 G1 Y=LPY/2-229.5
N277 G1 X=LPX/2-300
N277 G1 X=LPX/2-350 Y=LPY/2-219 G40
N277 L=PSU
N277 X=LPX/2+300 Y=LPY/2-219 Z=PRK PRF=3 F10 G42 TP1 L=PON
N277 G1 X=LPX/2+300 Y=LPY/2-209.5
N277 G1 X=LPX/2+500
N277 G1 Y=LPY/2-229.5
N277 G1 X=LPX/2+300
N277 G1 X=LPX/2+350 Y=LPY/2-219 G40
N277 L=PSU
N210 X=LPX/2+620 Y=LPY-109 Z=PRK PRF=LPZ+4 G40 TP1 L=PON
N219 G1 Y=LPY-115
N220 L=PSU
N230 X=LPX/2+410 Y=LPY-109 Z=PRK PRF=LPZ+4 G40 TP1 L=PON
N239 G1 Y=LPY-115
N240 L=PSU
N210 X=LPX/2-410 Y=LPY-109 Z=PRK PRF=LPZ+4 G40 TP1 L=PON
N219 G1 Y=LPY-115
N220 L=PSU
N230 X=LPX/2-620 Y=LPY-109 Z=PRK PRF=LPZ+4 G40 TP1 L=PON
N239 G1 Y=LPY-115
N240 L=PSU
N277 X=LPX/2-300 Y=LPY/2+219 Z=PRK PRF=3 F10 G42 TP1 L=PON
N277 G1 X=LPX/2-300 Y=LPY/2+209.5
N277 G1 X=LPX/2-500
N277 G1 Y=LPY/2+229.5
N277 G1 X=LPX/2-300
N277 G1 X=LPX/2-350 Y=LPY/2+219 G40
N277 L=PSU
N277 X=LPX/2+300 Y=LPY/2+219 Z=PRK PRF=3 F10 G41 TP1 L=PON
N277 G1 X=LPX/2+300 Y=LPY/2+209.5
N277 G1 X=LPX/2+500
N277 G1 Y=LPY/2+229.5
N277 G1 X=LPX/2+300
N277 G1 X=LPX/2+350 Y=LPY/2+219 G40
N277 L=PSU
N278 XO=LPX/2+750 YO=LPY-125 L=H112
N278 XO=LPX/2+275 YO=LPY-85 L=H112
N278 XO=LPX/2-275 YO=LPY-85 L=H112
N278 XO=LPX/2-750 YO=LPY-125 L=H112
N278 L=POFF
N278 L=GC1 UT=5
N279 XO=LPX/2-750 YO125 L=H112C
N279 XO=LPX/2-275 YO85 L=H112C
N279 XO=LPX/2+275 YO85 L=H112C
N279 XO=LPX/2+750 YO125 L=H112C
N279 XO=LPX/2+750 YO=LPY-125 L=H112C
N279 XO=LPX/2+275 YO=LPY-85 L=H112C
N279 XO=LPX/2-275 YO=LPY-85 L=H112C
N279 XO=LPX/2-750 YO=LPY-125 L=H112C
N279 L=POFF
N280 X=PRK Y=PRK
%
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 07-28-2009, 09:12 PM
 
Join Date: Feb 2008
Location: uk
Posts: 384
battwell is on a distinguished road
fun biesse programming!

this one calls internal sub routines. a very clever program i wrote if i say it myself. it cuts internal circles out around a radius calculated from parameters input at n30 . took me a night to think how to do it and a day to code it! but its cut hundreds of parts since and is simple to change
it is set to centre the entire piece at x350 y650. after the tool change to ut5 it does an outer circle with lead in and out. basically it cuts a large circle with a "bolt hole circle"of 23mm diameter holes inside the radius of the outer circle
hope these are of use to you!

N20 L=GC1 UT=1
N30 MC=380 CD=290 HD=23 NH=10 DA=360/NH HP=5
;MC=OUTER D CD=HOLE CIRCLE D HD=HOLE D NH=NUM HOLES HP=HOLE DEPTH
N40 DD=0 AN=0
;N50 XO=MC/2+5+350 YO=MC/2+5+700
N50 XO=350 YO=650 ZO=-7
:1
N60 JM(DD=NH):2
N70 X0 Y0 Z=PRK PRF=-10 F10 G40 TP1 L=PON
N80 G1 BL=CD/2 BA=AN
N85 G1 Z=-LPZ+HP
N90 G1 BL=HD/2 BA90 F2
N100 XI.01 R=HD/2 G5 RP=4 ZI=LPZ/4+0.6
N110 G1 BL=HD/2 BA270 Z=-LPZ-10 F10
N120 G1 X0 Y0 G40
N130 L=PSU
N140 DD=DD+1 AN=DA+AN
N150 JM:1
:2
N160 X0 Y=-MC/2-20 Z=PRK PRF=3 F5 G42 TP1 L=PON
N170 G1 Y=-MC/2
N180 G2 X0 Y=-MC/2 I0 J0 RP=4 ZI=LPZ/4+1
N210 G1 Y=-MC/2-20 G40
;N220 L=PSU
;N230 X0 Y0 Z=PRK PRF=2 F1 G40 TP1 L=PON
N240 L=POFF
N160 L=GC1 UT=5
N160 X0 Y=-MC/2-20 Z=PRK PRF=LPZ/2+1 F5 G41 TP1 L=PON
N170 G1 Y=-MC/2+.5
N180 X0 Y=-MC/2+.5 I0 J0 G2
N210 G1 Y=-MC/2-20 G40
N240 L=POFF
N250 Y=PRK
%
Reply With Quote

  #12   Ban this user!
Old 08-02-2009, 05:10 PM
bigz1's Avatar  
Join Date: Apr 2006
Location: NZ
Posts: 485
bigz1 is on a distinguished road

Thanks for the reply Battwell. I have just emigrated to NZ from the UK. At present I am only getting 1/2 hr per week on the WWW at the local library. I will try your code next week when my stuff arrives. Yes I aggree the G41 G42 codes would be better for the offsets but I just quicky stuck the program together using a program already in their called 'any hole'.

Couple of questions is it possible to type the code on PC to floppy an I get a persistant X59 error even though a tool is in? The machine is somewhat lacking in maintenace but I hope to cure that.

Can I also connect a PC to the CNI unit for more specialist tasks like sign making. Using MACH and Vectric on my own machine.
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
Problem- Axis not repeating Aircraftman Mazak, Mitsubishi, Mazatrol 6 07-31-2009 02:16 AM
ALARM 401 REPEATING CHANDRU Fanuc 4 07-13-2009 09:24 AM
Need Help!- circles arent circles xlr8r DynaTorch 3 01-18-2009 11:26 AM
Repeating a Subroutine. Mike Mattera G-Code Programing 6 05-18-2008 04:01 PM
Repeating issue scorchtool Milltronics 16 01-19-2008 07:26 AM




All times are GMT -5. The time now is 12:19 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 354 355 356 357 358 359 360 361