Hey!  After a couple days away I'm back at this.  And immediately stalled!
:)

stdglue.py returns INTERP_ERROR and other constants that I just can't seem
to locate!  When I try to

import emccanon
from interpreter import *

in my own handler code linuxcnc complains that neither of those modules can
be found.  I've gone through the source looking for the constants but no
luck.

Any advice?


On Wed, Mar 26, 2014 at 3:15 PM, Michael Haberler <mai...@mah.priv.at>wrote:

>
>
> > Am 26.03.2014 um 16:53 schrieb Rod Fitzsimmons Frey <rodf...@gmail.com>:
> >
> > Hi!  I'm merrily trying to remap M6 using the guidelines at
> >
> http://linuxcnc.org/docs/devel/html/remap/structure.html#_configuring_iocontrol_with_a_remapped_m6
> .
> > I'm trying to use all-python to implement my rack toolchanger.
> >
> > I have some stuff working - change_epilog in stdglue.py is called, my
> code
> > executes and moves the spindle to the correct location for the new tool,
> > etc. But change_epilog isn't called.  I put a print statement as the
> first
> > line in both change_prolog and change_epilog - the former is executed but
> > the latter is not.
> >
> > Perhaps as a result of change_epilog not getting called, my current tool
> is
> > never changed from -1.  (Although that could be something else if
> there's a
> > step I'm missing in my toolchange code.)
> >
> > My ini file line is
> > REMAP=M6 modalgroup=6 prolog=change_prolog epilog=change_epilog
> > py=toolchange
> >
> > and the epilog signature (unchanged from src) is
> > def change_epilog(self, **words):
> >
> > Any advice?
>
> yes
>
> what you are doing is an all-python remapped code
>
> now the prolog and epilog Python handlers are there to extract parameters,
> and set the environment for a _ngc_ remap function
>
> if you are doing all-python you can collapse all code into a single python
> remap body (all code will go into py=toolchange)
>
> so just drop the prolog and epilog handlers, do it all in toolchange() and
> you should be fine
>
> there was a problem with three python handlers in sequence; not sure if it
> is mentioned in the docs or just the code; since the separate pre- and post
> handlers dont make sense anyway I avoided the issue by not calling them
>
> let me know if you get stuck - just push your config and coce beforehand
> so I can have a look
>
> - Michael
> >
> > Thanks!
> > Rod
> >
> ------------------------------------------------------------------------------
> > Learn Graph Databases - Download FREE O'Reilly Book
> > "Graph Databases" is the definitive new guide to graph databases and
> their
> > applications. Written by three acclaimed leaders in the field,
> > this first edition is now available. Download your free book today!
> > http://p.sf.net/sfu/13534_NeoTech
> > _______________________________________________
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to