![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Punched this through a calculator a few times and it should work. Code: (#1 is X center) (#2 is Y center) (#3 is plunge depth) (#4 is a quarter of stepover) (#5 is one sixteeth of stepover plus #4) (#6 is The finish radius) (#15 is the start of the next loop) o100 sub G00 X#1 Y#2 Z.1 G01 Z#3 F10 X#4 G03 X#1 Y#4 R#4 X[[-2]*#4] Y#2 R#5 #15=0 #6=.12 o101 while [#15 LT #6] G03 X#1 Y[[[#4*3]+15]*[-1]] R[#5+#4+#15] X[[4*#4]+#1+#15] Y#2 R[[2*#4]+#5+#15] X#1 Y[[5*#4]+#2+#15] R[[3*#4]+#5+#15] X[[[#4*6]+#1+#15]*[-1]] Y#2 R[[4*#4]+#5+#15] #15 = [#4*4]+#15 o101 endwhile o100 endsub o100 call [0] [0] [-.1] [.0125] [.0156] G00 Z2 M02 Code: G00 X0.0000 Y0.0000 Z.1 G01 Z-.1 F10 X0.0125 G03 X0.0000 Y0.0125 R0.0125 X-0.0250 Y0.0000 R0.0156 G03 X0.0000 Y-0.0375 R0.0281 X0.0500 Y0.0000 R0.0406 X0.0000 Y0.0625 R0.0531 X-0.0750 Y0.0000 R0.0656 X0.0000 Y-0.0875 R0.0781 X0.1000 Y0.0000 R0.0906 X0.0000 Y0.1125 R0.1031 X-0.1250 Y0.0000 R0.1156 X0.0000 Y-0.1375 R0.1281 X0.1500 Y0.0000 R0.1406 X0.0000 Y0.1625 R0.1531 X-0.1750 Y0.0000 R0.1656 G00 Z2 M02
__________________ Anyone who says "It only goes together one way" has no imagination. |
|
#2
| ||||
| ||||
Look in the quoted code for my notes and changes. Alan
__________________ http://www.alansmachineworks.com |
|
#4
| ||||
| ||||
| Good luck, Alan
__________________ http://www.alansmachineworks.com |
|
#5
| |||
| |||
| The beauty of generating g-code with python is the ease of debugging. The beauty of an emc style parametric is the economy of code. I want the best of both. NCPlot does a macro B to "long hand" g-code conversion. Maybe it's times for a feature request. Some people are never satisfied. ![]() edit/ A practical example for this feature. An equally spaced pattern of 200 holes needs to be drilled. A parametric saves a lot of keystrokes. Now the drill goes dull on hole #150. How do you restart the program if it's all variables? Without altering the program?
__________________ Anyone who says "It only goes together one way" has no imagination. Last edited by cyclestart; 01-29-2008 at 06:47 AM. |
| Sponsored Links |
|
#6
| |||
| |||
John |
|
#7
| ||||
| ||||
| Cyclestart, I did a little editing on your file to try and make it a little easier to understand. I put the parameter comments inside the routine in case it were to be used with other subroutines. I also changed some of the variables to named variable to make it more easily readable. I changed it to pass in the stepover value and do the calculations inside the routine for 1/4 step and 1/16 step and then also passed in the ending radius as a parameter.
Hope you like this, Alan
__________________ http://www.alansmachineworks.com |
|
#8
| |||
| |||
| Thanks again Alan. I wasn't aware emc would accept a file commented in that way. Really improves the readability. These files are being used to test some calculations for a python program. Making changes to a parametric is simply quicker than making those same changes in python. The clean up you did definitely gives me something to chew on. A big attaboy to the developers for Axis (mostly Epler and Radek ?). Nobody should be deceived by it's simple, ie: clean , appearance. This thing is an amazing piece of work. Alan I have 3 Win2000 machines salvaged from work. Can we work out a trade for your Mac? j/k and rhetorical.
__________________ Anyone who says "It only goes together one way" has no imagination. |
![]() |
| 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 |
| WTF Have I done wrong now? | bryanrabb | Mach Software (ArtSoft software) | 4 | 01-08-2008 09:31 PM |
| Not sure what I'm doing wrong | chuy | Mastercam | 4 | 08-01-2007 03:28 AM |
| What am I doing WRONG??? | elalto | Mach Software (ArtSoft software) | 2 | 07-21-2006 05:23 AM |
| When everything goes wrong. | ImanCarrot | General Metalwork Discussion | 4 | 04-23-2006 09:42 PM |
| Anyone got any basic examples of a program using a subroutine/program? | Darc | CamSoft Products | 11 | 10-08-2005 11:45 PM |