Remap M3 - how to access HAL pin/param values

More
3 years 9 months ago #263106 by chowderhead
I'm using LinuxCNC to control a robotic welding cell. I've highjacked spindle controls to start/stop welding power using M3/M5. It works great with MIG, now I want to use TIG. My welder only supports TIG touch start, so I would like to remap M3 to first call G38.2 to touch the tungsten to the work piece, then fire M3 to activate power, followed by G1 Znn to lift the electrode off the piece prior to continuing the weld path dictated by my ngc file. I have a user space HAL control for communicating with the robotic welder, and I need to access HAL pins in that component to turn the welder's touch sense on and off. I would like to do all of this in pure Python, but I've run my head against the wall trying to figure out how to access HAL pins in my user space component.

I see named parameters can be called very simply (e.g., sim/remap/extend-builtins), but I can find no similar way to do so with HAL pins. There seems to be no documentation on the interpreter python module, and I'm not seeing anything obvious in the rs274 interp code. Am I missing something, or asking the impossible?

Thanks!

Please Log in to join the conversation.

More
3 years 9 months ago #263107 by Aciera

Please Log in to join the conversation.

More
3 years 9 months ago #263129 by chowderhead
Well, that's humbling. I didn't even think of looking at the hal module. Duh!

Thank you!

Please Log in to join the conversation.

More
3 years 8 months ago #263461 by chowderhead
Note M3 is not eligible for remapping. Used a custom M-code instead...

Please Log in to join the conversation.

More
3 years 8 months ago #263653 by andypugh
You can, however, remap S. So possibly you could use M3 S1 to touch-start and then M3 S2 to weld? (Or use S to set the current)

Please Log in to join the conversation.

More
3 years 8 months ago #263752 by chowderhead
Ah, that is an excellent suggestion! I'll explore that one. Thank you.

Please Log in to join the conversation.

Time to create page: 0.088 seconds
Powered by Kunena Forum