Remap M3 - how to access HAL pin/param values

More
28 Jan 2023 18:53 #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 or Create an account to join the conversation.

More
28 Jan 2023 19:36 - 28 Jan 2023 19:45 #263107 by Aciera
Last edit: 28 Jan 2023 19:45 by Aciera.
The following user(s) said Thank You: chowderhead

Please Log in or Create an account to join the conversation.

More
28 Jan 2023 22:52 #263129 by chowderhead
Well, that's humbling. I didn't even think of looking at the hal module. Duh!

Thank you!

Please Log in or Create an account to join the conversation.

More
01 Feb 2023 20:06 #263461 by chowderhead
Note M3 is not eligible for remapping. Used a custom M-code instead...

Please Log in or Create an account to join the conversation.

More
04 Feb 2023 10:31 #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)
The following user(s) said Thank You: chowderhead

Please Log in or Create an account to join the conversation.

More
05 Feb 2023 15:22 #263752 by chowderhead
Ah, that is an excellent suggestion! I'll explore that one. Thank you.

Please Log in or Create an account to join the conversation.

Time to create page: 0.107 seconds
Powered by Kunena Forum