-
Notifications
You must be signed in to change notification settings - Fork 37
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
Cutter Comp and motion digital outputs yields unexpected behavior #29
Comments
Comment by dkhughes Little update on this - I adapted the aux outputs in the interpreter to call the queue functions similar to how the coolant/spindle commands behave. Now, M64/M65 function as expected with cutter compensation turned on. Needs more testing, I can wrap it into a branch if anyone is interested in giving it a whirl. Oh, also, is there a reason M64/M65 should cause the tp to not blend? M64/M65 without a forced pause would be really nice since there are times we do not have a motion G01,G02, etc. following a toggle of a digital pin, and using M64/M65 instead of M62/M63 makes handling the no move following case irrelevant. Last, I wonder if it would also be useful to have a way to set a default "safe" value for the dio that is enforced on aborts. Maybe a tristate option like safe-high, safe-low, don't care. |
Comment by luminize Hi Devin
M64 and M65 are queue busters. You could use M62 and M63 which synchronise with motion http://www.machinekit.io/docs/gcode/m-code/#sec:M62-M65 |
Comment by dkhughes
@luminize Thanks for the response! That behavior is exactly what I'm asking about. In the code for emctaskmain, I can see where the decision was made to make M64/M65 queuebusters (it waits for motion to complete on that command). But, as I've been digging through this IO stuff more and more, it's apparent that the work wasn't entirely finished. For instance, there are many places where motion synchronized io reference both a The fix that I have been testing for digital outputs with cutter comp turned on seems promising. The fix isn't complicated, I figure no one in the past has had much interest in the use case that is critical for my application. In an effort to be more clear about my earlier question I'll restate it: Why are M64/M65 queuebusters? I totally understand why reading an input with an Right now I am looking at a double edged sword. If I use I hope that makes more sense. |
Comment by dkhughes Here is a link to the changes I made allowing cutter comp to be active when controlling a digital output: https://github.com/JDSquared/machinekit/tree/io-rebased Using the queue structures from interp_* corrected the out of phase issues that I think are the reason the original error guards were put into place. Testers welcome - I can't see any bad side affects from these changes being merged into the main code base. |
Comment by luminize @dkhughes I'm afraid I don't have an answer to your question, but I did find some more info (link here) |
Issue by dkhughes
Wed Sep 7 19:25:39 2016
Originally opened as machinekit/machinekit#1055
Other issues address the problem of the tp tripping over non motion commands, which are related, but, specifically, I want this issue to be an anchor for working out why motion digital outputs act "differently" when cutter comp is turned on. Currently in the source there is a guard that disallows auxiliary output when cutter comp is enabled, but I feel like that is a bit of a kludge considering coolant io and spindle io work properly.
For instance, when cutter comp is enabled, spindle control commands function identically to when cutter comp is disabled - which is to say as expected in a naive mindset. If you ask the spindle to be on or off, it obliges. A functional example of (what I consider to be) expected behavior:
The above produces the spindle-on output toggling as expected with a 1Hz period. Aux DO do not mimic this behavior, and remain in a locked state when cutter comp is turned on. Here is the equivalent example of above but modified to use a digital output instead of the spindle:
This example does not produce the expected bit toggling from the face value of the nc code. Turning cutter comp off, the following example does produce the expected bit toggling:
I would like to make digital output handling when cutter comp is turned on match the other two cases, as I can think of plenty of use cases where this type of digital io + cutter compensation are beneficial.
The text was updated successfully, but these errors were encountered: