Possible to remap M9?

More
16 Feb 2021 03:08 #199018 by underscore
Is it possible to remap M9? I’d like to add a third “coolant” option, namely air blast (e.g. by implementing M207 using digital out Hal pins). I’d like my air to be turned off by M9, just like M7 and M8.

According to the documentation it should not be possible, but even the examples contain m codes that shouldn’t be allowed but work.

I tried to remap, but that totally kills M9 all together.

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

More
16 Feb 2021 08:18 #199028 by cmorley
Replied by cmorley on topic Possible to remap M9?
cab you post your renaap code? was there an error message?

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

More
17 Feb 2021 04:06 #199129 by underscore
Replied by underscore on topic Possible to remap M9?
I'm using REMAP = M9 modalgroup=8 ngc=m9extended

I don't get an error message just the "old" behavior of M9

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

More
25 Feb 2021 15:49 #200104 by cmorley
Replied by cmorley on topic Possible to remap M9?
I looked in the source code and M9 is not allowed to be remapped.
Not sure why.

I changed it and mostly had success remapping with python other then the active Mcode display did not update till another MDI command was sent.

I'm considering adding the change.

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

More
26 Feb 2021 02:49 #200170 by underscore
Replied by underscore on topic Possible to remap M9?
Thanks for looking into that!

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

More
26 Feb 2021 06:22 #200174 by cmorley
Replied by cmorley on topic Possible to remap M9?
Are you using master branch?

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

More
26 Feb 2021 13:15 #200193 by underscore
Replied by underscore on topic Possible to remap M9?
I am (via buildbot).

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

More
26 Feb 2021 16:47 #200203 by cmorley
Replied by cmorley on topic Possible to remap M9?
Ok I just pushed the change - you'll have to wait for the buildbot to update.
Here is the python remap I tried, which just does what the original did.
i didn;t try remap with NGC.

As I said the controls do seem to turn off but the active gcode of m7/8 don;t change until another gcode is run.
Let me know what happens for you.
#####################################
# pure python remaps
#####################################

# REMAP=M6 python=remap_m9
#
#
def remap_m9(self,**words):
    try:
        emccanon.enqueue_MIST_OFF()
        emccanon.enqueue_FLOOD_OFF()
        return INTERP_OK
    except Exception as e:
        return "remap M9 failed: %s" % (e)

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

More
26 Feb 2021 21:52 #200241 by newbynobi
Replied by newbynobi on topic Possible to remap M9?
Chris, have you tried adding a G4 command?
In my remap es this helped.

Norbert

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

More
26 Feb 2021 22:11 #200244 by cmorley
Replied by cmorley on topic Possible to remap M9?
please explain more.

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

Time to create page: 0.106 seconds
Powered by Kunena Forum