Yes, I do this all the time now, I call it "closure", which is what it is in programming.
Here's my program to tap a grid of 3x5 holes (I wrote a subroutine apply_to_grid): (Rigid tapping with 1/32 tap) O100 sub G33.1 Z-0.6 K[1/32] O100 endsub S1 M3 M8 O<apply_to_a_grid> call [0] [0] [0.5] [0.5] [5] [3] [0.01] [100] M2 On Sun, Dec 19, 2010 at 3:22 PM, Kenneth Lerman <[email protected]>wrote: > On 12/17/2010 09:04 AM, Igor Chudov wrote: > > Yep, I am going to shoot a video. I want to write a subroutine that > accepts > > a closure and applies this closure to a rectangular grid of points. > Do you know that you can pass a subroutine number as an argument to > another subroutine and then invoke it? > > O<namedRoutine> sub > > O#3 call [#1] [#2] > > O<namedRoutine> end > > O<namedRoutine> call [2.5] [6.3] [100] > > In this example, subroutine O100 will be called with the arguments 2.5 > and 6.3 > > Unfortunately, you can't pass the name of a routine as an argument. :-( > > Ken > > > i > > > > On Fri, Dec 17, 2010 at 7:58 AM, sam sokolik<[email protected]> > wrote: > > > >> video! :) > >> > >> sam > >> > >> On 12/17/2010 7:55 AM, Igor Chudov wrote: > >>> Thanks guys. It works great now. > >>> > >>> i > >>> > >>> On Fri, Dec 17, 2010 at 5:53 AM, John Thornton<[email protected]> > wrote: > >>> > >>>> There are several spindle examples in the Integrators manual. > >>>> > >>>> John > >>>> > >>>> Igor Chudov wrote: > >>>>> I am realizing that I am not sure what scale should I use for rigid > >>>> tapping. > >>>>> Should I configure EMC2 so that a single revolution of the spindle > >>>> results > >>>>> in the spindle position of 1.0? > >>>>> > >>>>> Also, another question. Does anyone who has rigid tapping, have a > .ini > >>>> file > >>>>> that they can share? > >>>>> > >>>>> I am specifically not sure how to tie my input to spindle speed. When > I > >>>> try > >>>>> G33.1, EMC2 errors out and says "spindle is not in motion". I believe > >>>> that I > >>>>> need to tie my input somehow to spindle speed that EMC2 knows how to > >>>> read, > >>>>> but I am not sure what variable to use. > >>>>> > >>>>> Thanks > >>>>> > >>>>> i > >>>>> > >> > ------------------------------------------------------------------------------ > >>>>> Lotusphere 2011 > >>>>> Register now for Lotusphere 2011 and learn how > >>>>> to connect the dots, take your collaborative environment > >>>>> to the next level, and enter the era of Social Business. > >>>>> http://p.sf.net/sfu/lotusphere-d2d > >>>>> _______________________________________________ > >>>>> Emc-users mailing list > >>>>> [email protected] > >>>>> https://lists.sourceforge.net/lists/listinfo/emc-users > >>>>> > >>>> > >> > ------------------------------------------------------------------------------ > >>>> Lotusphere 2011 > >>>> Register now for Lotusphere 2011 and learn how > >>>> to connect the dots, take your collaborative environment > >>>> to the next level, and enter the era of Social Business. > >>>> http://p.sf.net/sfu/lotusphere-d2d > >>>> _______________________________________________ > >>>> Emc-users mailing list > >>>> [email protected] > >>>> https://lists.sourceforge.net/lists/listinfo/emc-users > >>>> > >> > ------------------------------------------------------------------------------ > >>> Lotusphere 2011 > >>> Register now for Lotusphere 2011 and learn how > >>> to connect the dots, take your collaborative environment > >>> to the next level, and enter the era of Social Business. > >>> http://p.sf.net/sfu/lotusphere-d2d > >>> _______________________________________________ > >>> Emc-users mailing list > >>> [email protected] > >>> https://lists.sourceforge.net/lists/listinfo/emc-users > >>> > >>> > >> > >> > ------------------------------------------------------------------------------ > >> Lotusphere 2011 > >> Register now for Lotusphere 2011 and learn how > >> to connect the dots, take your collaborative environment > >> to the next level, and enter the era of Social Business. > >> http://p.sf.net/sfu/lotusphere-d2d > >> _______________________________________________ > >> Emc-users mailing list > >> [email protected] > >> https://lists.sourceforge.net/lists/listinfo/emc-users > >> > > > ------------------------------------------------------------------------------ > > Lotusphere 2011 > > Register now for Lotusphere 2011 and learn how > > to connect the dots, take your collaborative environment > > to the next level, and enter the era of Social Business. > > http://p.sf.net/sfu/lotusphere-d2d > > _______________________________________________ > > Emc-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
