Take more than 2 arguments for M100-199?

  • meloon
  • meloon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
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.

  • meloon
  • meloon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
20 Feb 2020 08:00 #157942 by meloon
Replied by meloon on topic Take more than 2 arguments for M100-199?
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
Replied by Todd Zuercher on topic Take more than 2 arguments for M100-199?
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.

  • meloon
  • meloon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
20 Feb 2020 19:23 #158047 by meloon
Replied by meloon on topic Take more than 2 arguments for M100-199?
Thank you so much for helping, Todd!

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

  • andypugh
  • andypugh's Avatar
  • Away
  • Moderator
  • Moderator
More
28 Feb 2020 13:27 #158752 by andypugh
Replied by andypugh on topic Take more than 2 arguments for M100-199?

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
Replied by Todd Zuercher on topic Take more than 2 arguments for M100-199?
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.

  • meloon
  • meloon's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
29 Feb 2020 18:09 #158828 by meloon
Replied by meloon on topic Take more than 2 arguments for M100-199?
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.088 seconds
Powered by Kunena Forum