Take more than 2 arguments for M100-199?

More
6 years 8 months ago #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 to join the conversation.

More
6 years 8 months ago #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 to join the conversation.

More
6 years 8 months ago #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.

Please Log in to join the conversation.

More
6 years 8 months ago #158047 by meloon
Thank you so much for helping, Todd!

Please Log in to join the conversation.

More
6 years 8 months ago #158752 by andypugh

meloon wrote: 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.

Please Log in to join the conversation.

More
6 years 8 months ago #158754 by Todd Zuercher
Ingenious Andy, I bow to your hacking skills. but yes a truly ugly work around.

Please Log in to join the conversation.

More
6 years 8 months ago #158828 by meloon
That's a really smart HACK! Thank you, Andy!

Please Log in to join the conversation.

Time to create page: 0.171 seconds
Powered by Kunena Forum