Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-02 Thread Rod Fitzsimmons Frey
Thanks Michael, I really appreciate the help. For clarity, could you tell me why calling G64/G65 to set a pin results in recursion? In the example code you sent on line 49 that is done: self.execute(G64 P0.001,lineno()) Also, while I have your attention. :) Would this job [1] be better done

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-02 Thread Michael Haberler
Rod, Am 02.04.2014 um 10:57 schrieb Rod Fitzsimmons Frey rodf...@gmail.com: Thanks Michael, I really appreciate the help. For clarity, could you tell me why calling G64/G65 to set a pin results in recursion? In the example code you sent on line 49 that is done: self.execute(G64

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-02 Thread Rod Fitzsimmons Frey
Michael, the control flow is this: what happens here: Python calls back into the interpreter C++ code to parse and execute this line. Since string is basically a new block, it must save the current block context, do the job, restore the current block context, return. That's where the design

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-02 Thread Michael Haberler
Rod, Am 02.04.2014 um 12:41 schrieb Rod Fitzsimmons Frey rodf...@gmail.com: To test my understanding: is it legitimate for the python mapping code to call canon methods directly? yes, definitely - it's just what the interpreter itself does all the time the basic logic of the interpreter

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-02 Thread Michael Haberler
Am 02.04.2014 um 12:41 schrieb Rod Fitzsimmons Frey rodf...@gmail.com: To test my understanding: is it legitimate for the python mapping code to call canon methods directly? Would that mess up state for the interpreter when it continued executing? to be more clear: canon is primarily a

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-02 Thread Rod Fitzsimmons Frey
Thanks, your explanations really help. I actually think there's a astonishing lack of entropy in the code, given its age and the inherent complexity of the problem. It's all coming together for me with your explanations. On Wed, Apr 2, 2014 at 7:29 AM, Michael Haberler mai...@mah.priv.at

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-02 Thread Michael Haberler
Am 02.04.2014 um 16:23 schrieb Rod Fitzsimmons Frey rodf...@gmail.com: Thanks, your explanations really help. I actually think there's a astonishing lack of entropy in the code, given its age and the inherent complexity of the problem. It's all coming together for me with your

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-01 Thread Rod Fitzsimmons Frey
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: 1. If I try to

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-01 Thread Billy Huddleston
Rod, Again, I had the same experiance with trying to use Python for tool changer and went back to O code. I know have a complete tool change program for a carousel style tool changer that raises the Z axis. Still in simulator, will be testing on real machine soon, but, it keeps track of

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-01 Thread andy pugh
On 1 April 2014 16:18, Rod Fitzsimmons Frey rodf...@gmail.com 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

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-01 Thread Rod Fitzsimmons Frey
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

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-01 Thread Michael Haberler
Rod, Am 31.03.2014 um 21:22 schrieb Rod Fitzsimmons Frey rodf...@gmail.com: I've looked at this and see where the bitmask, but it seems I can only read pins with the hal component, not set them? that is correct How can I turn on my power drawbar valve, trigger the blow valve, etc? you can

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-01 Thread Michael Haberler
here is an example for what I described below: http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=commit;h=d426cc90b5e1338f1a2b8ad403ea11e0a24f3b50 try 'M465 P0Q1' and 'M465 P0Q0' and watch motion.digital-out-00 - Michael Am 01.04.2014 um 22:10 schrieb Michael Haberler mai...@mah.priv.at: Rod,

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-01 Thread Rod Fitzsimmons Frey
Thanks, Michael! I had read much of the C++ code but not that bit... I got to SET_DIGITAL_OUTPUT_BIT and thought that was as good as it got. It seemed at that point I might as well just execute(G64 P01) etc. On Tue, Apr 1, 2014 at 6:53 PM, Michael Haberler mai...@mah.priv.at wrote: here is

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-04-01 Thread Michael Haberler
Am 02.04.2014 um 02:26 schrieb Rod Fitzsimmons Frey rodf...@gmail.com: Thanks, Michael! I had read much of the C++ code but not that bit... I got to SET_DIGITAL_OUTPUT_BIT and thought that was as good as it got. It seemed at that point I might as well just execute(G64 P01) etc. I suggest

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Rod Fitzsimmons Frey
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

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Michael Haberler
Am 31.03.2014 um 16:03 schrieb Rod Fitzsimmons Frey rodf...@gmail.com: 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

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Rod Fitzsimmons Frey
Thanks! .ini file: http://pastebin.com/VsnQFuzt .hal file: http://pastebin.com/RHEJYqJB hal file hook (hal_racktoolchange): http://pastebin.com/njTUZAqS tool change python code: http://pastebin.com/1EZy0Pur Console output: http://pastebin.com/jNHZbxAE On Mon, Mar 31, 2014 at 10:59 AM,

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Michael Haberler
Am 31.03.2014 um 17:15 schrieb Rod Fitzsimmons Frey rodf...@gmail.com: Thanks! .ini file: http://pastebin.com/VsnQFuzt .hal file: http://pastebin.com/RHEJYqJB hal file hook (hal_racktoolchange): http://pastebin.com/njTUZAqS tool change python code: http://pastebin.com/1EZy0Pur this is

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Rod Fitzsimmons Frey
Oh! But it works now! I can move the spindle where I want it, I can setp on the pins to release the tool, etc. M6T1 does exactly that with this code. I just can't signal to EMC that the tool has been changed, so on the *next* call to M6 it reports that the current tool is -1. But I readily

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Rod Fitzsimmons Frey
Wait! There's probably confusion because of my crappy naming. interpreter.execute doesn't rely on from interpreter import * interpreter is just the argument passed to toolchange. I thought it was an instance of an emc interpreter so that's what I called it. On Mon, Mar 31, 2014 at 11:39

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Billy Huddleston
I gave up trying to do remap via python and switched to O word. I have a complete simulate umbrella style tool changer working now. I would have rather done it in python, but, got it done with O word no problem. Thanks, Billy On 03/31/2014 11:41 AM, Rod Fitzsimmons Frey wrote: Wait!

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Niemand Sonst
Rod, it is easy to access hal pin from ngc code, if you enable features in your INI [RS274NGC] with FEATURES = 12 (enables INI and Hal reading) And the needed pins can be created in a python handler file. You might want to check gmoccapy and gmoccapy_tool_sensor.ini for an example, please see

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Rod Fitzsimmons Frey
Thanks, Niemand! I'll try that. Where should I look for documentation that would tell me features available in rs274ngc? I've looked through the source as best I can but don't know how you found that features=12 parameter. On Mon, Mar 31, 2014 at 11:50 AM, Niemand Sonst nie...@web.de wrote:

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Niemand Sonst
Hallo Rod, my name is Norbert ;-) Have you taken a look to http://www.linuxcnc.org/docs/devel/html/remap/structure.html#_optional_interpreter_features_ini_file_configuration_a_id_sub_ini_features_a Special section 18. Norbert Am 31.03.2014 19:42, schrieb Rod Fitzsimmons Frey: Thanks,

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Rod Fitzsimmons Frey
Thank you, sorry about mistaking your name. :) Fooled by the From field in the email envelope. On Mon, Mar 31, 2014 at 2:12 PM, Niemand Sonst nie...@web.de wrote: Hallo Rod, my name is Norbert ;-) Have you taken a look to

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Rod Fitzsimmons Frey
I've looked at this and see where the bitmask, but it seems I can only read pins with the hal component, not set them? How can I turn on my power drawbar valve, trigger the blow valve, etc? I feel like I'm missing some obvious insight... this feeling of incompetence is very uncomfortable. On

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Niemand Sonst
Rod, that is easy, just use Gcode ;-) See : http://linuxcnc.org/docs/html/gcode/m-code.html#sec:M62-M65 Norbert Am 31.03.2014 21:22, schrieb Rod Fitzsimmons Frey: I've looked at this and see where the bitmask, but it seems I can only read pins with the hal component, not set them? How can

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Gene Heskett
On Monday 31 March 2014 15:40:56 Rod Fitzsimmons Frey did opine: I've looked at this and see where the bitmask, but it seems I can only read pins with the hal component, not set them? How can I turn on my power drawbar valve, trigger the blow valve, etc? I feel like I'm missing some

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread Rod Fitzsimmons Frey
Gene, I really appreciate the brain dump, and will go through it in detail. That said, I do have the 5i25 hooked to a 7i76. I moved from pncconf to vim about a week ago. I have all the pins mapped in my hal file and can turn things on and off on my machine (and see the spindle status pins) with

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-31 Thread andy pugh
On 31 March 2014 22:13, Rod Fitzsimmons Frey rodf...@gmail.com wrote: Everything's working great, I'm just getting hung up on communicating with them from the python remap code. Looks like the suggestion of mapping to M64 commands is the way to go, although it seems a bit unsatisfying. I was

[Emc-users] Remapping M6 - change_epilog not called.

2014-03-26 Thread Rod Fitzsimmons Frey
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

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-26 Thread Michael Haberler
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

Re: [Emc-users] Remapping M6 - change_epilog not called.

2014-03-26 Thread Rod Fitzsimmons Frey
Thanks, I'll do that! On Wed, Mar 26, 2014 at 3:15 PM, Michael Haberler mai...@mah.priv.atwrote: 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