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 10-19-2007, 09:29 PM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road
Sprocket milling macro ???

I think I remember seeing some sort of a calculator on this forum that would right your g-code for milling a sprocket but I cant find it now.

My second question is does anyone have a macro for milling sprockets in a lathe?? The tooth profile is nothing but radius's on this part that I am doing.'

It is 15.165 in diameter with 30 teeth, using #120 roller chain.

I got a good start on it today using G12.1 but it took me 8 hrs to prg. half of it. (LOTS OF NUMBERS).

The other option I thought of was some kind of a repeat event, Maybe a WHILE DO macro that I am familar with.

Any idea guys???
thanks
Jon
Reply With Quote

  #2  
Old 10-22-2007, 09:56 AM
*Registered User*
 
Join Date: Nov 2005
Location: USA
Posts: 274
Bluesman is on a distinguished road

Originally Posted by theemudracer View Post
I think I remember seeing some sort of a calculator on this forum that would right your g-code for milling a sprocket but I cant find it now.

My second question is does anyone have a macro for milling sprockets in a lathe?? The tooth profile is nothing but radius's on this part that I am doing.'

It is 15.165 in diameter with 30 teeth, using #120 roller chain.

I got a good start on it today using G12.1 but it took me 8 hrs to prg. half of it. (LOTS OF NUMBERS).

The other option I thought of was some kind of a repeat event, Maybe a WHILE DO macro that I am familar with.

Any idea guys???
thanks
Jon
Send me the G-Code (Private Mesage) you wrote for the first few teeth and I will see if I can come up with a macro that will do what you need. I am having a slow week since my hard drive on my main desktop crashed and burned friday so I got some time on my hands

Bluesman
Reply With Quote

  #3  
Old 10-22-2007, 09:57 AM
*Registered User*
 
Join Date: Nov 2005
Location: USA
Posts: 274
Bluesman is on a distinguished road

Originally Posted by theemudracer View Post
I think I remember seeing some sort of a calculator on this forum that would right your g-code for milling a sprocket but I cant find it now.

My second question is does anyone have a macro for milling sprockets in a lathe?? The tooth profile is nothing but radius's on this part that I am doing.'

It is 15.165 in diameter with 30 teeth, using #120 roller chain.

I got a good start on it today using G12.1 but it took me 8 hrs to prg. half of it. (LOTS OF NUMBERS).

The other option I thought of was some kind of a repeat event, Maybe a WHILE DO macro that I am familar with.

Any idea guys???
thanks
Jon
Oh stink you need to send me the print too

Bluesman
Reply With Quote

  #4   Ban this user!
Old 10-22-2007, 05:37 PM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road

Ok sounds good. I will try to have the night shift guy email me the info this evening and I will post it. Other wise it will be tomorrow before I can get you the print and prg.

thanks
Jon
Reply With Quote

  #5   Ban this user!
Old 10-23-2007, 12:35 AM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road

Here is the complete prg. I also attached the .dxf file of the part.

%
O7005(411-47004 SPROCKET)
M118M32
G40G28U0
G99G28B0


(ROUGHING END MILL)
G54G98
T0202
M43
G0C0.
G97S2000M13
G0Z10.
X16.
G12.1
G42G1X15.1574C0.F15.
G03X14.1254C.3187R.8073
G02X13.9492C1.1567R.4375
G03X14.8262C1.5757R.8073
G03X13.6842C1.7801R.8073
G02X13.1634C2.5815R.4375
G03X13.847C3.0825R.8073
G03X12.645C3.1638R.8073
G02X11.8024C3.8935R.4375
G03X12.2626C4.4547R.8073
G03X11.053C4.4092R.8073
G02X9.9254C5.0354R.4375
G03X10.1424C5.6321R.8073
G03X8.978C5.4618R.8073
G02X7.6146C5.9571R.4375
G03X7.5788C6.5634R.8073
G03X6.5108C6.2758R.8073
G02X4.9712C6.6185R.4375
G03X4.6838C7.2078R.8073
G03X3.7588C6.8155R.8073
G02X2.1104C6.9907R.4375
G03X1.5844C7.5372R.8073
G03X.8426C7.0573R.8073
G02X-.8426C7.0573R.4375
G03X-1.5844C7.5372R.8073
G03X-2.1104C6.9907R.8073
G02X-3.7588C6.8115R.4375
G03X-4.6838C7.2078R.8073
G03X-4.9712C6.6185R.8073
G02X-6.5108C6.2758R.4375
G03X-7.5788C6.5634R.8073
G03X-7.6146C5.9571R.8073
G02X-8.978C5.4618R.4375
G03X-10.1424C5.6321R.8073
G03X-9.9254C5.0354R.8073
G02X-11.053C4.4092R.4375
G03X-12.2626C4.4547R.8073
G03X-11.8024C3.8935R.8073
G02X-12.645C3.1638R.4375
G03X-13.847C3.0825R.8073
G03X-13.1634C2.5815R.8073
G02X-13.6842C1.7801R.4375
G03X-14.8262C1.5757R.8073
G03X-13.9492C1.1567R.8073
G02X-14.1254C.3187R.4375
G03X-15.1574C0.R.8073
G03X-14.1254C-.3187R.8073
G02X-13.9492C-1.1567R.4375
G03X-14.8262C-1.5757R.8073
G03X-13.6842C-1.7801R.8073
G02X-13.1634C-2.5815R.4375
G03X-13.847C-3.0825R.8073
G03X-12.645C-3.1638R.8073
G02X-11.8024C-3.8935R.4375
G03X-12.2626C-4.4547R.8073
G03X-11.053C-4.4092R.8073
G02X-9.9254C-5.0354R.4375
G03X-10.1424C-5.6321R.8073
G03X-8.978C-5.4618R.8073
G02X-7.6146C-5.9571R.4375
G03X-7.5788C-6.5634R.8073
G03X-6.5108C-6.2758R.8073
G02X-4.9712C-6.6185R.4375
G03X-4.6838C-7.2078R.8073
G03X-3.7588C-6.8155R.8073
G02X-2.1104C-6.9907R.4375
G03X-1.5844C-7.5372R.8073
G03X-.8426C-7.0573R.8073
G02X.8426C-7.0573R.4375
G03X1.5844C-7.5372R.8073
G03X2.1104C-6.9907R.8073
G02X3.7588C-6.8115R.4375
G03X4.6838C-7.2078R.8073
G03X4.9712C-6.6185R.8073
G02X6.5108C-6.2758R.4375
G03X7.5788C-6.5634R.8073
G03X7.6146C-5.9571R.8073
G02X8.978C-5.4618R.4375
G03X10.1424C-5.6321R.8073
G03X9.9254C-5.0354R.8073
G02X11.053C-4.4092R.4375
G03X12.2626C-4.4547R.8073
G03X11.8024C-3.8935R.8073
G02X12.645C-3.1638R.4375
G03X13.847C-3.0825R.8073
G03X13.1634C-2.5815R.8073
G02X13.6842C-1.7801R.4375
G03X14.8262C-1.5757R.8073
G03X13.9492C-1.1567R.8073
G02X14.1254C-.3187R.4375
G03X15.1574C0.R.8073
G40G1X16.F40.
G13.1
M09
G28U0.
M15
M40
G0Z5.

(.500 FINISH)
G54G98
T0909
M43
G0C0.
G97S1668M13
G0Z-.6
X16.
G12.1
G42G1X15.1574C0.F10.
G03X14.1254C.3187R.8073
G02X13.9492C1.1567R.4375
G03X14.8262C1.5757R.8073
G03X13.6842C1.7801R.8073
G02X13.1634C2.5815R.4375
G03X13.847C3.0825R.8073
G03X12.645C3.1638R.8073
G02X11.8024C3.8935R.4375
G03X12.2626C4.4547R.8073
G03X11.053C4.4092R.8073
G02X9.9254C5.0354R.4375
G03X10.1424C5.6321R.8073
G03X8.978C5.4618R.8073
G02X7.6146C5.9571R.4375
G03X7.5788C6.5634R.8073
G03X6.5108C6.2758R.8073
G02X4.9712C6.6185R.4375
G03X4.6838C7.2078R.8073
G03X3.7588C6.8155R.8073
G02X2.1104C6.9907R.4375
G03X1.5844C7.5372R.8073
G03X.8426C7.0573R.8073
G02X-.8426C7.0573R.4375
G03X-1.5844C7.5372R.8073
G03X-2.1104C6.9907R.8073
G02X-3.7588C6.8115R.4375
G03X-4.6838C7.2078R.8073
G03X-4.9712C6.6185R.8073
G02X-6.5108C6.2758R.4375
G03X-7.5788C6.5634R.8073
G03X-7.6146C5.9571R.8073
G02X-8.978C5.4618R.4375
G03X-10.1424C5.6321R.8073
G03X-9.9254C5.0354R.8073
G02X-11.053C4.4092R.4375
G03X-12.2626C4.4547R.8073
G03X-11.8024C3.8935R.8073
G02X-12.645C3.1638R.4375
G03X-13.847C3.0825R.8073
G03X-13.1634C2.5815R.8073
G02X-13.6842C1.7801R.4375
G03X-14.8262C1.5757R.8073
G03X-13.9492C1.1567R.8073
G02X-14.1254C.3187R.4375
G03X-15.1574C0.R.8073
G03X-14.1254C-.3187R.8073
G02X-13.9492C-1.1567R.4375
G03X-14.8262C-1.5757R.8073
G03X-13.6842C-1.7801R.8073
G02X-13.1634C-2.5815R.4375
G03X-13.847C-3.0825R.8073
G03X-12.645C-3.1638R.8073
G02X-11.8024C-3.8935R.4375
G03X-12.2626C-4.4547R.8073
G03X-11.053C-4.4092R.8073
G02X-9.9254C-5.0354R.4375
G03X-10.1424C-5.6321R.8073
G03X-8.978C-5.4618R.8073
G02X-7.6146C-5.9571R.4375
G03X-7.5788C-6.5634R.8073
G03X-6.5108C-6.2758R.8073
G02X-4.9712C-6.6185R.4375
G03X-4.6838C-7.2078R.8073
G03X-3.7588C-6.8155R.8073
G02X-2.1104C-6.9907R.4375
G03X-1.5844C-7.5372R.8073
G03X-.8426C-7.0573R.8073
G02X.8426C-7.0573R.4375
G03X1.5844C-7.5372R.8073
G03X2.1104C-6.9907R.8073
G02X3.7588C-6.8115R.4375
G03X4.6838C-7.2078R.8073
G03X4.9712C-6.6185R.8073
G02X6.5108C-6.2758R.4375
G03X7.5788C-6.5634R.8073
G03X7.6146C-5.9571R.8073
G02X8.978C-5.4618R.4375
G03X10.1424C-5.6321R.8073
G03X9.9254C-5.0354R.8073
G02X11.053C-4.4092R.4375
G03X12.2626C-4.4547R.8073
G03X11.8024C-3.8935R.8073
G02X12.645C-3.1638R.4375
G03X13.847C-3.0825R.8073
G03X13.1634C-2.5815R.8073
G02X13.6842C-1.7801R.4375
G03X14.8262C-1.5757R.8073
G03X13.9492C-1.1567R.8073
G02X14.1254C-.3187R.4375
G03X15.1574C0.R.8073
G40G1X16.F40.
G13.1
M09
G28U0.
G0Z5.
M40
M30
%
Attached Files
File Type: dxf 41147004.DXF‎ (84.8 KB, 130 views)
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 11-02-2007, 01:06 AM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road
Sprocket Macro I Wrote .

I figured it out guys, with the help of Bluesman.
It works good so far.



%
O0049(SPROCKET MACRO TEST)
/2M98P9999
#502=[#501+.1]
#503=-[23.4684-#500+1.5]
#504=-[23.4684+[#503-.145]]
M118M32
G40G28U0
G99G28B0

#5224=0.(G54 FOR C AXIS)
#528=30.(# OF SPROCKET TEETH)
#529=12.(DEGREE PER TOOTH)
#530=0.(TOOTH COUNTER)
#531=0.(INITIALIZING C INCRMENT TO 0.)
(ROUGHING END MILL)
G54G98
T0202
M43
G0C0.
G97S100M13
G0Z5.
X16.
WHILE[#530NE#528]DO1
G54G0C0.
G12.1
G42G1X15.1574C0.F60.
G03X14.1254C.3187R.8073
G02X13.9492C1.1567R.4375
G03X14.8262C1.5757R.8073
G40G1X15.5F120.
G13.1
#530=[#530+1.](TOOTH COUNTER)
#531=[#531+#529](INCREMENT C BY #529)
#5224=#531(INCREASING G54C0. TO CURRENT PO
END1
G0C0.
#5224=0.
M40
G28U0.
M30
Reply With Quote

  #7   Ban this user!
Old 11-04-2007, 02:32 PM
 
Join Date: Feb 2006
Location: United States
Posts: 273
dpuch is on a distinguished road

Originally Posted by theemudracer View Post
/2M98P9999
#502=[#501+.1]
#503=-[23.4684-#500+1.5]
#504=-[23.4684+[#503-.145]]
It looks like this isn't used at all.

May I suggest a few possible changes.
Code:
#528=30.(# OF SPROCKET TEETH)
#529=12.(DEGREE PER TOOTH)
Make Degree a the calculation of the other, UNLESS you intend to use this for non-360 deg sprockets. Insures you always have even spacing of x number of teeth.
Code:
#529=360/#528
Change
Code:
WHILE[#530NE#528]DO1
to
Code:
WHILE[#530LT#528]DO1
Catch it if somehow it is past #528 It should never happen, but keeps it from running an infinite loop if it does.

And a personal preference for readability
Code:
#531=[#531+#529](INCREMENT C BY #529)
#5224=#531(INCREASING G54C0. TO CURRENT PO
could be 1 line... <shrug>

Nice job working it out. If you make more gears besides this one, do you intend to make it a universal macro handling diameter, and perhaps changes in the profile?

Dale
Reply With Quote

  #8   Ban this user!
Old 11-04-2007, 08:32 PM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road

Originally Posted by dpuch View Post
It looks like this isn't used at all.

May I suggest a few possible changes.
Code:
#528=30.(# OF SPROCKET TEETH)
#529=12.(DEGREE PER TOOTH)
Make Degree a the calculation of the other, UNLESS you intend to use this for non-360 deg sprockets. Insures you always have even spacing of x number of teeth.
Code:
#529=360/#528
Change
Code:
WHILE[#530NE#528]DO1
to
Code:
WHILE[#530LT#528]DO1
Catch it if somehow it is past #528 It should never happen, but keeps it from running an infinite loop if it does.

And a personal preference for readability
Code:
#531=[#531+#529](INCREMENT C BY #529)
#5224=#531(INCREASING G54C0. TO CURRENT PO
could be 1 line... <shrug>

Nice job working it out. If you make more gears besides this one, do you intend to make it a universal macro handling diameter, and perhaps changes in the profile?

Dale

This was basically just a test prg., testing the basic theory,that has some needed changes as you pointed out. My intentions are to make it a 9000# prg. and use a G65 and load the variables from the main calling prg.

My intentions are also to figure out the math on how to create a tooth profile with different radi. and Diameter dimenisions. Now that will be challenge. For now I can just measure it out on Autocad and get my start and end points for the radius's.
Reply With Quote

  #9   Ban this user!
Old 11-04-2007, 10:36 PM
 
Join Date: Feb 2006
Location: United States
Posts: 273
dpuch is on a distinguished road

You will have to figure out the trig/math to create the points needed by hand, using the normal set of definitions you have for sprockets. Once you have that, your almost there.

If 1 tooth is 12 deg, the center of the middle arc is at 6, each end is at 6 +- the arc radius.... Not that simple to get it all, but... Draw it out with the lines needed to calculate the trig for each point and I think it will not take you too long. I don't know enough about it to help more than that

I did have fun drawing up a gear though.

Dale
Reply With Quote

  #10   Ban this user!
Old 11-05-2007, 12:09 AM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road

yea this will be the hardest macro I have done yet as fas as all the trig that will be needed to complete the formula.

thanks
Jon
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 11-05-2007, 12:15 AM
 
Join Date: Feb 2006
Location: United States
Posts: 273
dpuch is on a distinguished road

One thing that may make it a little easier, center the macro at C0 instead of starting it there. That cuts the calcs needed in half.

Edit: err, actually it shouldn't matter... But looking at your X and C numbers, either they are wrong or I don't understand how the X and C programming should work. Is X=pos from center, and C=rotation in deg? I'm used to X Y Z...

Dale
Reply With Quote

  #12   Ban this user!
Old 11-05-2007, 05:39 AM
 
Join Date: Nov 2005
Location: Only the USA
Posts: 213
theemudracer is on a distinguished road

Originally Posted by dpuch View Post
One thing that may make it a little easier, center the macro at C0 instead of starting it there. That cuts the calcs needed in half.

Edit: err, actually it shouldn't matter... But looking at your X and C numbers, either they are wrong or I don't understand how the X and C programming should work. Is X=pos from center, and C=rotation in deg? I'm used to X Y Z...

Dale
LOL You dont understand how G12.1 works on a lathe... X is the diameter position from center and C is basically a "Y" dimension from center using radius instead of diameter. G12.1 basically turns Y axis needed movements into C axis degrees. I believe it does start at C0.
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
RFQ: Sprocket (closed) mcraig79 Employment Opportunity 7 07-03-2007 06:30 AM
Gear sprocket software PlasmaGuy Mechanical Calculations/Engineering Design 4 05-15-2007 05:27 PM
Milling Macro sencinia General Metalwork Discussion 2 04-04-2007 08:20 AM
Macro for milling round bar sencinia General Metalwork Discussion 0 03-31-2007 10:58 AM
Sprocket teeth MattMachinist General Metalwork Discussion 0 04-17-2006 09:06 PM




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