Page 2 of 4
Re: M200 prompts sometimes disappear
Posted: Sat Nov 30, 2024 3:05 pm
by corbin
Yup...definitely seems like a bug in CNC12. I use M221's to tell the user what is happening, but sometimes (based on conditions) I ask them to do stuff.
It means I have to go remove all my M221 messages because of this bug, unless I know for sure there won't be any user prompts.
Corbin
Re: M200 prompts sometimes disappear
Posted: Sat Nov 30, 2024 3:38 pm
by cncsnw
What happens if you replace the M200 with an M225, and a time limit of zero?
Re: M200 prompts sometimes disappear
Posted: Sat Nov 30, 2024 6:10 pm
by ShawnM
cncsnw wrote: ↑Sat Nov 30, 2024 3:38 pm
What happens if you replace the M200 with an M225, and a time limit of zero?
This is how I do user prompts. Message stays until some action is taken.
Re: M200 prompts sometimes disappear
Posted: Sat Nov 30, 2024 7:12 pm
by suntravel
cncsnw wrote: ↑Sat Nov 30, 2024 3:38 pm
What happens if you replace the M200 with an M225, and a time limit of zero?
That will not work, since the M225 message disappears after the M221 timer is over if the c-gode after M221 is shorter than the M221 timer.
Replacing M221 with M225 will work, but with M225 the g-code will stop and wait for cycle start.
Uwe
Re: M200 prompts sometimes disappear
Posted: Sun Dec 01, 2024 11:32 am
by cnc_smith
I agree that the M200 is missing the timer variable that is the problem. I have always used a timer variable with each M2xx even if I want it to display the same amount of time. The manual does not show any example without timer variaable. As cncsnw stated, this is "a minor bug" I believe that the software should give an error message the M2## is missing a timer variable.
Re: M200 prompts sometimes disappear
Posted: Sun Dec 01, 2024 3:57 pm
by cncsnw
No, I think the problem is that CNC12 fails to cancel the M221 timer when a new message is displayed.
M200 does not have or need a timer value, because by definition it waits until the operator presses Cycle Start.
Unfortunately, M200 is of limited use, because it only performs its primary job (displaying a message) if you have enabled M0 jogging via Parameter 10. Since you cannot assume that M0 jogging is enabled on every control, you cannot use M200 in macros that are intended for general use.
Re: M200 prompts sometimes disappear
Posted: Mon Dec 02, 2024 12:09 pm
by corbin
@cnc_smith Am I missing something from the manual?
-------------
13.55 M200/M201– Stop for Operator, Prompt for Action
M200 is used to pause the currently running job and prompt the Operator for action. If M0_jogging is unlocked, or the
control is in DEMO mode, jogging is enabled while waiting for the Operator to respond. If this option has not been
enabled, the behavior will default to that of a standard M0 (jogging disabled).
The syntax is:
M200 formatted-string [[user_var_expr] ...
---------------
For me, it isn't a minor bug, as I can't figure out a work around.
Re: M200 prompts sometimes disappear
Posted: Mon Dec 02, 2024 12:22 pm
by suntravel
The workaround is to make sure the code after M221 will take more time like the timer, or use M225 with stopping g-code procession till cycle start from the user.
Even if the timer would not delete the next Mxx message, it would not make sense for a M221 message to be only visible for a half second.
Uwe
Re: M200 prompts sometimes disappear
Posted: Mon Dec 02, 2024 12:50 pm
by corbin
suntravel wrote: ↑Mon Dec 02, 2024 12:22 pm
The workaround ist to make sure the coder after M221 will take more time like the timer, or use M225 with stopping g-code precession till cycle start from the user.
Yeah, but when coding abstractly that isn't always possible to ensure the code takes that long. Using M225 with a required cycle stop sort of defeats the purpose of a temporary notification that is not always important, but is nice to see.
suntravel wrote: ↑Mon Dec 02, 2024 12:22 pm
Even if the timer would not delete the next Mxx message, it would not make sense for a M221 message to be only visible for a half second.
So, here's my tool change scenario where it does make sense:
1. Temporary message telling the user a Tool Change is happening from Tool X to Y
2. If no user input is required (pure ATC), then the message stays up for 3 seconds and disappears.
3. If the user has to do something, such as manually remove or insert a tool that isn't in the rack, I want to prompt them with M200.
I could keep track of the time from the last M221 and do a dwell before showing the M200, but man, that feels so hacky.
So, I removed all my M221's because of this bug.
I'm open to other suggestions! My code is here:
https://github.com/corbinstreehouse/Cen ... corbin.mac
Although, this problem stems into other files.
Corbin
Re: M200 prompts sometimes disappear
Posted: Mon Dec 02, 2024 1:07 pm
by suntravel
I am sure it is not a big deal for Centroid to delete the timer if another Mxx is issued after M221.
Some old bugs are coming only to light if some user finds them till all others did not run into this issue, because they never used this feature in this way
Uwe