![]() | |
| 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 have been using WHILE/ENDWHILE loops to plot parabolic curves, with slow but sure success. New problem with the use of this approach - is it possible to include in the loop a parameter that is a function of the number of times that the loop has run ? It sounds a bit like the traditional "picking yourself up by your own bootstraps, but I thought I'd ask ![]() Typical line of code is ..... #11=83.5 O103 WHILE [#11 GE 79.970] g01 x[[#11*#1] y[[-9.6*[[83.5-#11]**0.5]+23.5]*#1] z[-1*[85.175-#11]*#1] F#3 #11=[#11-0.03525] O103 ENDWHILE (This will make the v-tool follow a parabolic path, but with one edge circular and the other one straight as it decends into the work piece through 100 steps.) .......but I want to add in to the x value an additional component that is increasing linearly with each step of the loop, which has the effect of sloping the line, like going from upright to italic lettering. For example, if I change x[#11*#1] to x[[#11+N/100]*#1] , the change is fixed, and I want the value of N to increase from 0 to 100 during the 100 steps of the loop. Can anyone help ? Thanks, John
__________________ It's like doing jigsaw puzzles in the dark. Enjoy today's problems, for tomorrow's may be worse. |
|
#2
| ||||
| ||||
| Well, as is often the case, 7 hours sleep produced the answer ![]() While making the morning tea, the following seems to have solved it... x[[#11-[[83.5-#11]*1.83688]]*#1] .... slews the parabola round just nicely. OK, so the inner circular edge is now eliptical, but who's counting.
__________________ It's like doing jigsaw puzzles in the dark. Enjoy today's problems, for tomorrow's may be worse. |
![]() |
| 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 |
| Using loops in gcode? | forhire | DynaTorch | 4 | 04-06-2010 09:47 PM |
| Need Help!- Need full list of G CODES AND M CODES FOR FANUC 21I | SonnyTees.com | G-Code Programing | 3 | 02-23-2010 10:27 AM |
| Setting up loops | Zmachine | Haas Lathes | 6 | 03-20-2009 10:15 AM |
| M-codes and G-codes 4 Matsuura ES-1000V | maximusek | G-Code Programing | 2 | 11-27-2007 06:41 AM |
| loops and subs | d.dixson | Mach Mill | 5 | 04-07-2007 05:25 PM |