On Mon, 28 Feb 2022 at 10:51, andrew beck <andrewbeck0...@gmail.com> wrote: >
> I want to issue a m102 > > And get this code run > > S5m3 > Halcmd setp hm2 7i77etc pin output on This is slightly tricky, as you want to both issue a G-code command and a Halcmd command. I think you need to do a G-code remap to create a new M-code that runs G-code, and then have that G-code include a custom M-code that calls the halcmd. Or: Create a Python remap that includes an MDI to run the G-code then a command to set the HAL pin. (import linxcnc / import hal: http://linuxcnc.org/docs/2.8/html/config/python-interface.html#_code_linuxcnc_command_code_attributes http://linuxcnc.org/docs/devel/html/hal/halmodule.html#_set_p Or: Use a G-code remap and the little-documented (py, ...) "magic comment" I have never seen docs for this, but alongside the other documented "magic comments" there are: https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/rs274ngc/interp_convert.cc#L1447 -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912 _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users