Take more than 2 arguments for M100-199?
20 Feb 2020 03:15 #157921
by meloon
Take more than 2 arguments for M100-199? was created 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.
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.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
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.
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.
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.
28 Feb 2020 13:27 #158752
by andypugh
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.
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.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
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.
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.111 seconds