-
Notifications
You must be signed in to change notification settings - Fork 296
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
Status report with wrong stat #367
Comments
Interesting. Could indeed be a bug. As a general thought, I think it's recommended to send G-Code as plain text, instead of using the json format. Changing variable settings and the various control things are recommended for json though. 😄 |
Ahhh, here's the wiki page I was thinking of: Under the Notes section:
|
Thanks for the quick reply @justinclift, I didn't bother looking into the existing code for sending GCode commands. It's now fixed so that GCode commands are sent without wrapping with {"gc":..}. |
Cool. Good point, as that really does sound like a bug. 😉 |
Testing here now... agreed. This is happening for me now too. Reverting my Due back to 100.26, and this bug isn't showing up. |
This is very odd. I’m not sure why G20/G21 would have ever caused a stat
change. I believe the old behavior is a bug.
You *should* however see the `unit` value change in the status report.
Also, since it’s gcode you can put an `Nxxx` in front of it and with the
right `jv` value see that the line was received in the response.
G20/G21 are among the gcode commands that do not participate in a cycle.
Basically if it only changes the way other following codes are interpreted
then it won’t change the stat.
*However*, if the machine was not in a cycle and you send any gcode, it
will automatically start one. Since we don’t wait for the user to push a
“cycle start” button we automatically start a cycle when we see any gcode.
I was looking over the pull request comments (but not the code) in the UGCS
repo, and see what you’re going for. In the DRO case mentioned, the system
stat changed to RUN with just the G20/G21 (or something you sent before)
but there was nothing there to cause motion. If you send M0 or M2 (which
resets stuff, so maybe avoid this one) as the first line of gcode the
system sends, it’ll show stat of STOP or END (respectively).
…On Tue, Jul 17, 2018 at 1:58 AM Justin Clift ***@***.***> wrote:
Testing here now... agreed. This is happening for me now too. Reverting my
Due back to 100.26, and this bug isn't showing up.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#367 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAXj0Y5k0PhRTQnQlggSaE4Kp0WT3-6Yks5uHYsTgaJpZM4U_Vkk>
.
|
I'm having the same problem, but with G10. G10 just sets the offsets, without causing any motion. cm_cycle_start() is called early in _execute_gcode_block(), regardless of what is in the block. It looks as if, when no motion is involved, there are cases where cm_cycle_end() never gets called. The addition of the blanket cm_cycle_start() came in commit ae0145c , described as "Some comments and naming changes to offsets for clarity". It seems that a semantic change came along for the ride. |
For fixing issue synthetos#367
Fix #367 - Status report with wrong stat
I'm using
{sv:1}
and{si:250}
to receive status reports during and after a command has been sent to the controller and in version 101.03 it sometimes ends up with the wrongsr:stat
.So for instance if I issue the following command I get a
sr:stat
saying that it's running. I would expect it to be 3 (program stop) or 4 (program end).If I run a G0-command it works as expected:
I don't experience the same problem in version 100.26 but that's probably because it doesn't report the stat for the G20-command:
The G0-command works as expected:
The text was updated successfully, but these errors were encountered: