Skip to content
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

grbl needs line-specific "ok" response (e.g. "k7") #1

Open
doppelhub opened this issue Feb 18, 2020 · 0 comments
Open

grbl needs line-specific "ok" response (e.g. "k7") #1

doppelhub opened this issue Feb 18, 2020 · 0 comments

Comments

@doppelhub
Copy link
Member

After each g-code line is executed, grbl needs to respond with a line-specific 'ok'. When "line-specific response" is enabled (e.g. via $(TBD)=1), grbl will no longer respond with 'ok', but will instead respond with 'k_', where '' is a unique line number. However, grbl must respond with the shortest possible message, and so rather than send back the entire g-code line (e.g. "ok g0 x-32 y-23"), or even the line number (e.g. "ok L546455), grbl will instead respond with a single hex character (0:F). Since grbl's onboard buffer is only 13 lines long, those 16 possible characters give us the information we need to figure out which line number was most recently executed. grbl will need to maintain its own circular LUT, which will contain the original line in one column and the single hex character pertaining to that line in another. This way, if grbl hangs, DDcut simply needs to look at the last received 'k' command, which will tell us the last line that executed correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant