-
-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement M66 Immediate mode #1330
Conversation
917edef
to
caebc4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested it so I can't say if it works, but I don't see any problems with the code.
Nice work. I can do some testing. |
I am getting some |
Thanks for the fast testing @bdring - I just tested this on my CNC, and added fixes for those errors. It's working on my hardware now. |
It works better for me now. I am not sure how this should work. #5399 does not exist until you do an M66. The
|
The LinuxCNC documentation doesn't explicitly state what system defined numbered parameters should return in situations like this, but I think a reasonable default is to initialize |
945962b
to
ec5ecca
Compare
Changed so that
|
- Update M modal group enum to reflect LinuxCNC - Add UserInputs and basic structure for M66 in GCode - Add numbered paramter 5399 - M66 input read - GCode value words need to be cleared, debug logs
ec5ecca
to
611733a
Compare
This is a partial implementation of M66 - Wait On Input, as defined by LinuxCNC.
Adds a few things that needed to be in place -
And finally, the M66 implementation itself. This is a partial implementation only, and supports only Immediate wait mode (0). It will read a user defined input and set numbered parameter
#5399
to that value. That parameter can be used in subsequent conditional branching.This is to support implementing safe pneumatic ATC operation, which relies on reading sensor inputs to detect tool presence. That being said, I'm sure there are plenty of usecases for reading sensor values and inputs.
Now working on testing this on real hardware.Tested on ATC with an NPN NC inductive sensor.
Relevant log lines after the controller is reset
config.yml
snippet configuring digital0_pin as an input -Using the M66 command -