Take more than 2 arguments for M100-199?

More
20 Feb 2020 03:15 #157921 by meloon
Does anyone know if there is a way for the M100s customized code to take more than 2 arguments?

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

More
20 Feb 2020 08:00 #157942 by meloon
Also, does anyone know if it's possible to remap M100-199? For example, assume we did remap for M100, and in the remap function, we make it execute 'self.execute('M100')', will it now run the M100 file? I need a component that can take more than two arguments and at the same be able to control HAL pin values (the HAL pin values are for customized HAL components)

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

More
20 Feb 2020 14:53 #158007 by Todd Zuercher
No, custom M-codes can only accept up to two arguments (P,Q)

No, M100-M199 are not remap-able.

But you may be able to remap another M-code to do what you want.
The following user(s) said Thank You: meloon

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

More
20 Feb 2020 19:23 #158047 by meloon
Thank you so much for helping, Todd!

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

More
28 Feb 2020 13:27 #158752 by andypugh

Does anyone know if there is a way for the M100s customized code to take more than 2 arguments?


nasty workaround:
M100 P[#1 * 10000 + #2] Q[ #3 * 10000 + #4]

Then use a modulo division in the M-code code.

The other suggestions are better.
The following user(s) said Thank You: meloon

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

More
28 Feb 2020 13:47 #158754 by Todd Zuercher
Ingenious Andy, I bow to your hacking skills. but yes a truly ugly work around.

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

More
29 Feb 2020 18:09 #158828 by meloon
That's a really smart HACK! Thank you, Andy!

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

Time to create page: 0.128 seconds
Powered by Kunena Forum