Billy: Thanks, I think I'm giving up too, and moving to the O-word subroutine call. I'll probably be asking for help soon. :)
Andy: Don't worry, I don't think there were any false paths. I needed a userspace HAL component regardless to integrate the signal lines from my spindle. The python component remap code (using the py=mycode approach that you linked to) is what I've been struggling with - that code needs to access the signals, for example so the code can wait until the tool-released signal goes high. That's what I can't figure out - it can't communicate with my userspace component that's defining the pins and signals. The documentation suggests otherwise: it says the python code in the remap component has full raw access to almost everything that C++ code has. It also says things like "if you can't stand NGC or it gets in your way, do everything in Python" (paraphrased). But, I have to move forward, so O-word subroutine it is. :) On Tue, Apr 1, 2014 at 12:02 PM, andy pugh <[email protected]> wrote: > On 1 April 2014 16:18, Rod Fitzsimmons Frey <[email protected]> wrote: > > Wow, this is frustrating. :) > > > > I can create HAL pins just fine, and wire them up with signals just-so. > I > > can watch them turn on and off at appropriate times with halscope, etc. > > > > BUT I can't access them anywhere from code! The remap code for M6 has the > > hal python component, but: > > I am starting to worry that I have sent you down the wrong path. > I think I was thinking in terms of a userspace HAL component rather > than a remapped tool change. And I don't know how much commonality > there is. > > A HAL component is loaded at startup, creates HAL pins and remains > live for the duration of the run. > > I suspect that remap code runs then exits. > > Looking at the docs, perhaps the approach in section 9.4.5 is what you > need? > > > http://linuxcnc.org/docs/devel/html/remap/structure.html#_calling_conventions_ngc_to_python > > -- > atp > If you can't fix it, you don't own it. > http://www.ifixit.com/Manifesto > > > ------------------------------------------------------------------------------ > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------------ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
