I'm now looking seriously into creating custom g/mcodes. Your proposal on the wiki assumes every parameter word is made accessible to the subroutine, and it's the sub's responsibility to figure what makes sense.
My idea would rather be a check during conversion - before calling the sub - driven by a parameter spec as follows: # define custom G and M codes # syntax: GCODE=<number>,<argument spec> # argument spec: # an uppercase letter for each required parameter 'word' # a lowercase letter for each optional parameter 'word' # [CUSTOM] GCODE=88.1,XYZR # G88.1 requires all of X,Y,Z,R to be present GCODE=88.2,XYpq # G88.2 requires X,Y and takes optional P and Q MCODE=290,PQ # M290 requires P and Q Any required parameters would be available as '#<X>' or some variant thereof. Optional parameters could be tested for with the EXISTS(#<P>) function. The subroutine may rely on the fact that all required parameters are accessible instead of testing for each one. -Michael Am 17.04.2011 um 17:25 schrieb Kenneth Lerman: > See: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?User_Defined_Gcodes > > This proposal would provide an infrastructure that would permit user defined > gcodes and would allow existing gcodes to be overridden. It would also allow > user defined mcodes. > > It should be pretty straightforward to implement. > > Regards, > > Ken > > -----Original Message----- > From: Michael Haberler [mailto:[email protected]] > Sent: Sunday, April 17, 2011 6:52 AM > To: EMC developers > Subject: [Emc-developers] vote: canned cycle candidate as o-word subroutine > > I'm near completing the toolchange-by-oword subroutines work. It turns out > to be useful well beyond toolchange, like building canned cycles through > O-word subroutines, and I'd like to do a canned cycle as a tutorial example. > > Instead of boring you once more with a toolchange issue, let me ask you for > your 'great-to-have canned cycle': > > what would be a canned cycle, currently not in EMC, which you could think of > describing as a oword-procedure, and have mapped it to, say, some G8x code? > > a decent facing routine? your favorite Fanuc cycle? > > > -Michael, clueless coder > > > > > > > ---------------------------------------------------------------------------- > -- > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Emc-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-developers > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Emc-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-developers ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
