![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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 |
|
#2
| |||
| |||
Bluesman |
|
#3
| |||
| |||
Bluesman |
|
#5
| |||
| |||
| 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 % |
| Sponsored Links |
|
#6
| |||
| |||
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 |
|
#7
| |||
| |||
| May I suggest a few possible changes. Code: #528=30.(# OF SPROCKET TEETH) #529=12.(DEGREE PER TOOTH) Code: #529=360/#528 Code: WHILE[#530NE#528]DO1 Code: WHILE[#530LT#528]DO1 And a personal preference for readability Code: #531=[#531+#529](INCREMENT C BY #529) #5224=#531(INCREASING G54C0. TO CURRENT PO 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 |
|
#8
| |||
| |||
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. |
|
#9
| |||
| |||
| 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 |
|
#11
| |||
| |||
| 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 |
|
#12
| |||
| |||
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
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 |