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

M291 S2 not unblocking/Unblocking after timeout. #738

Closed
T3P3 opened this issue Apr 24, 2023 · 9 comments
Closed

M291 S2 not unblocking/Unblocking after timeout. #738

T3P3 opened this issue Apr 24, 2023 · 9 comments
Assignees
Labels
bug Bug that has been reproduced Done - Needs Testing
Milestone

Comments

@T3P3
Copy link
Contributor

T3P3 commented Apr 24, 2023

As reported in forum thread https://forum.duet3d.com/topic/30877/3-5beta1-movement-issue-on-cnc-6xd-some-minors

M291 S2 in a program does not continue by M292 P0/M292/pressing OK. After the window closed it still in processing state with no window/reaction to M292. M292 P0/M292/pressing OK works fine with M291 S3.

May be fixed in 3.5b3

@T3P3 T3P3 added this to the 3.5.0-beta.4 milestone May 10, 2023
@T3P3
Copy link
Contributor Author

T3P3 commented May 10, 2023

Also related to:

https://forum.duet3d.com/topic/32054/m291-some-behavior-not-matching-documentation

Issue #1 - The gcode dictionary for M291 with S=2 (as on line 4) says is the T parameter will be ignored (because S=2 is blocking). In practice, after 10 seconds, execution is unblocked. I am using this as a "feature" to make my macro work, but it seems wrong.

@T3P3 T3P3 changed the title M291 S2 not unblocking M291 S2 not unblocking/Unblocking after timeout. May 10, 2023
@T3P3
Copy link
Contributor Author

T3P3 commented May 10, 2023

Need to consider if this is a bug or an undocumented feature, suggestion from forum thread:

For modes that are blocking and can have only one response (S=2):

  • The display is instructed to show the message for the duration specified with the T parameter, if one is provided and <=0.

  • If T >0, RRF will wait for an m292 response from the display for the specified duration, then assume an "OK" response from the display and resume gcode execution. This is the current, incorrect behavior.

  • If RRF has a subsequent message to display, it will not send a message to the display instructing it to terminate the existing message until the time period T expires. This is needed to preserve the blocking nature of the mode.

@AndyEveritt
Copy link
Collaborator

Could not replicate on Duet 3 SBC - 3.4.1. Will try 3.5-b1 & 3.5-b3

@AndyEveritt
Copy link
Collaborator

AndyEveritt commented May 28, 2023

Using Duet3 Mini 5+ with 3.5.0-b1 the following behaviour exists:

  • M291 S2 P"xxx" blocks and pressing ok clears message succesfully
  • M291 S2 P"xxx" T3 message incorrectly times out after 3 seconds
    • Same occurs with S3
  • Could not get into the state where Duet is still in processing state

Same behaviour using 3.5.0-b3

There appear to be 2 potentially separate issues:

  1. The T parameter is not being ignored when using S2/S3
    • Reproduced in 3.5.0-b1&3 in standalone mode
    • Not present in 3.4.5 (SBC & standalone)
  2. M292 does not clear a M291 S2 message
    • Not reproducable in standalone mode on 3.4.5 & 3.5.0-b1&3
    • Not present in 3.4.5 with SBC
    • To be tested with 3.5.0-bX with SBC

@AndyEveritt
Copy link
Collaborator

3.5.0-b1 behaviour:

  • M291 R"test" P"Press OK to begin" S2
    • SBC: Pressing ok or clearing the message with M292 causes the duet to hang
    • Standalone: Pressing ok or clearing the message with M292 behaves normally
  • M291 R"test" P"Press OK to begin" S3
    • SBC: Behaves normally
    • Standalone: Behaves normally
  • M291 R"test" P"Press OK to begin" S2 T3
    • SBC: Message incorrectly times out after 3 seconds
    • Standalone: Message incorrectly times out after 3 seconds

@AndyEveritt
Copy link
Collaborator

3.5.0-b3 behaviour:

  • M291 R"test" P"Press OK to begin" S2
    • SBC: Pressing ok or clearing the message with M292 causes the duet to hang
    • Standalone: Pressing ok or clearing the message with M292 behaves normally
  • M291 R"test" P"Press OK to begin" S3
    • SBC: Behaves normally
    • Standalone: Behaves normally
  • M291 R"test" P"Press OK to begin" S2 T3
    • SBC: Message incorrectly times out after 3 seconds
    • SBC: If you press ok before timeout, Duet hangs until timeout is finished
    • Standalone: Message incorrectly times out after 3 seconds
    • Standalone: If you press ok before timeout, Duet does not hang

@AndyEveritt AndyEveritt added bug Bug that has been reproduced and removed requires reproducing Not yet reproduced, or needs a more concise reproduction method. labels May 31, 2023
@dc42
Copy link
Collaborator

dc42 commented Jun 2, 2023

Changed RRF and updated the documentation so that the timeout is forced to zero unless the mode is 0 or 1 or a Cancel button is displayed (i.e. mode 3, or mode >= 4 with the J1 parameter used to provide a Cancel button).

@dc42 dc42 self-assigned this Jun 2, 2023
@chrishamm
Copy link
Collaborator

I cannot reproduce any hangs in SBC mode with the latest state from GitHub. The code in RRF for handling timeouts looks fine to me, too.

This was referenced Jun 6, 2023
@AndyEveritt
Copy link
Collaborator

3.5.0-b4 behaviour:

  • M291 R"test" P"Press OK to begin" S2
    • SBC: Pressing ok or clearing the message with M292 behaves normally
    • Standalone: Pressing ok or clearing the message with M292 behaves normally
  • M291 R"test" P"Press OK to begin" S3
    • SBC: Behaves normally
    • Standalone: Behaves normally
  • M291 R"test" P"Press OK to begin" S2 T3
    • SBC: Message does not timeout & Duet does not hang after clearing message
    • Standalone: Message does not timeout & Duet does not hang after clearing message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that has been reproduced Done - Needs Testing
Projects
None yet
Development

No branches or pull requests

4 participants