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

[BUG] G-code M25 does not work #18191

Closed
DrumClock opened this issue Jun 3, 2020 · 74 comments
Closed

[BUG] G-code M25 does not work #18191

DrumClock opened this issue Jun 3, 2020 · 74 comments

Comments

@DrumClock
Copy link

If there is an M25 command in the G-code or it is sent via the terminal, the printer will not pause printing correctly and the process will freeze - the printer RESTART is required.
Pause printing is performed correctly only through the menu on the LCD panel.

Behavior description:

  with M25 command in G code

  1. print from SD card
  2. G-code M25 (in file)
  3. parking is performed at the specified position X, Y, Z
  4. The print head returns above the object
  5. The LCD panel "freezes" and the printer must RESTART

with the M25 command from the terminal

  1. print from SD card
  2. sent G-code M25 from the terminal
  3. parking is performed at the specified position X, Y, Z
  4. The print head returns "very slowly" above the object
  5. The LCD panel "freezes" and the printer must RESTART

configuration 3.6.2020.zip

@ellensp
Copy link
Contributor

ellensp commented Jun 4, 2020

You need to enable HOST_ACTION_COMMANDS so you can un pause it from console.

@DrumClock
Copy link
Author

DrumClock commented Jun 4, 2020

Hi,
I enabled HOST_ACTION_COMMANDS and nothing has changed.

Interesting that in CONFIGURATION_ADV_H_VERSION 020000 of STRING_DISTRIBUTION_DATE "2019-08-26" the function was disabled and it worked without problems from the terminal or from the file.

I am currently using:
BUILD_VERSION "bugfix-2.0.x"
DISTRIBUTION_DATE "2019-07-10"
CONFIGURATION_H_VERSION 020005
CONFIGURATION_ADV_H_VERSION 020005

@DrumClock
Copy link
Author

I tried the latest version of bugfix 2.0.x and nothing has changed.

  • CONFIGURATION_H_VERSION 020006
  • CONFIGURATION_ADV_H_VERSION 020006

@Gornerrrrr
Copy link

I have same problem

@qwewer0
Copy link
Contributor

qwewer0 commented Jun 8, 2020

I have this too.
SKR Mini E3 v1.2
Latest Bugfix.
Edit: HOST_ACTION_COMMANDS does not help.

Edit2: Pausing from the LCD primes the nozzle right after it parked the print head, then asks for more priming or to continue.
When using M25 in the gcode it doesn't tries to pause until it executes few more gcode lines after the M25 line in the gcode file, then parks the print head and immediately slowly goes back to the printed object for a few more gcode lines to execute, then the printhead stops/"freezes" on the printed part.
On the LCD it shows "PRINT PAUSED, Parking... Nozzle E1 190/190" the temperature fluctuates, so it reads the nozzle temp, but the printer isn't responsive to LCD encoder clicks, restart required.
(Isn't it suppose to be E0?)

Configuration.zip

@DrumClock
Copy link
Author

Thank you for the response, we have to wait for the programmers we will not solve it,
I hope it will be soon.

@boelle
Copy link
Contributor

boelle commented Jun 23, 2020

@DrumClock
Please test the bugfix-2.0.x branch to see where it stands.

@thinkyhead
Copy link
Member

An M25 inside of a G-code file is interesting. Does M125 work any better? I wish I had a working debugger, or logging in exactly the part of the code where it could tell us what is happening. Without more detailed data it is hard to know what's going on. At some point, myself or one of the community members with the requisite time and talent will investigate the issue and try to narrow it down.

@DrumClock
Copy link
Author

DrumClock commented Jun 24, 2020

I will be happy to help you find bugs in Marlin.
Unfortunately, I'm not a programmer and I'm happy to set up configuration files and upload the FW on the board with using Visual Studio Code, forgive me. I can describe in the behavior of the printer for a certain situation.

G-codes M25 or M125 behave exactly the same. As described above.
Printing is interrupted, the head moves to the park position, then returns above printing and the entire printer freezes.

Example G-code in file:

M25

I have the same printer with:

BUILD_VERSION "bugfix-1.1.x"
DISTRIBUTION_DATE "2017-10-24 12:00"
CONFIGURATION_H_VERSION 010107
CONFIGURATION_ADV_H_VERSION 010107

Where G-code M25 works 100% both in the file and via the terminal.

@Gornerrrrr
Copy link

Gornerrrrr commented Jun 24, 2020

use balck_stm32f407ve,Latest ver marlin2.0
I changed the program
in pause.cpp line421
planner.synchronize();
change to
do{ planner.synchronize(); queue.advance(); } while(queue.has_commands_queued());
It's now to pause correctly in my printer.
So I think the bug was caused by instructions that didn't properly process the cache queue.

@DrumClock
Copy link
Author

DrumClock commented Jun 24, 2020

My friend helped me edit the pause.cpp program.

pause

Parking still does not work and the printer freezes.

  1. print
  2. M25 command in G-code
  3. parking heads #define NOZZLE_PARK_POINT { 10, -10, 15 }
  4. return above the print position
  5. filament extrusion
  6. freeze - only RESTART printers work

So it doesn't work for me :(
I have a RUMBA ATmega2560 board.

@qwewer0
Copy link
Contributor

qwewer0 commented Jun 27, 2020

Pause via LCD works for me, but M125 is the same as M25.

do{ planner.synchronize(); queue.advance(); } while(queue.has_commands_queued());

Didn't help.

@DrumClock
Copy link
Author

Due to minimal responses to solving this problem, I closed this issues. The bug is still at 1.7.2020 in Marlin FW.

@thinkyhead thinkyhead reopened this Jul 3, 2020
@DrumClock
Copy link
Author

* Marlin-bugfix-2.0.x 
* Downloaded:	13.7.2020

G-code M25 or M125 in the file still does not work.

Test: https://www.youtube.com/watch?v=XJfbxOgrXVM

@thinkyhead
Copy link
Member

We've recently updated this area of the code. Please test the latest bugfix-2.0.x branch to see where it stands.

@qwewer0
Copy link
Contributor

qwewer0 commented Jul 20, 2020

@thinkyhead Tested the latest Bugfix-2.0.x cea097d, while it did change the behavior from slowly drifting back to the printing XYZ spot, but now after parking the head, it goes back printing (XY) with NOZZLE_PARK_XY_FEEDRATE speed, on the parking z height, and it still freezes after a couple printing moves.

Edit: Configuration.zip

@DrumClock
Copy link
Author

Hi @thinkyhead
Tested with the version distributed on 2020-08-02

Still the same behavior error still uncorrected !!

G-code M25 or M125 in file = print pause does not work, printer freezes.

@qwewer0
Copy link
Contributor

qwewer0 commented Aug 3, 2020

It seems that it works for Chuck Hellebuyck (CHEP) on an Ender 3 v2, video, but it is still not working for me, 5e34110.

@qwewer0
Copy link
Contributor

qwewer0 commented Aug 7, 2020

It works for Chuck Hellebuyck (CHEP) on the same board as mine (SKR Mini E3 v1.2, video), but then why could it not working for me?

@DrumClock
Copy link
Author

@thinkyhead
Bugfix 2.0.x - DISTRIBUTION DATE "2020-08-27"

Bug still not fixed.

@qwewer0
Copy link
Contributor

qwewer0 commented Sep 21, 2020

On the latest Bugfix-2.0.x fb48cd0, the problem is still present.

M25_Test.zip
Made a (30 line long) dummy M25 test gcode file, and the results are the same as with a "real" gcode file.
When running the M25_Test.gcode and the it reaching M25 line, the printer parks the head, then slowly drifts back, but not to the XYZ position before M25, but rather to the next gcode lines XY position with the parking Z height, then after it executes one more line it just freezes, and all this while the LCD says "Parking...", and the nozzle kept at temperature.
With HOTEND_IDLE_TIMEOUT enabled and HOTEND_IDLE_TIMEOUT_SEC set to 5*60, after the printer stayed frozen for 5 min the printer switched off the heating.

@rhapsodyv
Copy link
Member

This issue can be closed, as it is not a bug, just a missing parameter.


About the M25 / M24 combo not working for you:

I lost a few hours to setup a env, test, debug, to find that P1 parameter, trying to help with this issue.

Then I was totally discredited and even need to read sarcasms about what I was saying.

@thinkyhead needed to came here and just show what I was saying for the last hour, to you be convinced.

Sorry, but I will not help you with that.

I'm not doing free unpaid work to receive any rudeness in exchange.

Good luck getting help.

@qwewer0
Copy link
Contributor

qwewer0 commented Oct 18, 2020

I'm sorry that I hurt you, didn't meant to do any harm.

@qwewer0
Copy link
Contributor

qwewer0 commented Oct 18, 2020

@rhapsodyv And I really appreciate your help even if I seem ungrateful.

@qwewer0
Copy link
Contributor

qwewer0 commented Oct 18, 2020

In my surroundings a sarcazm is a "great" way to explain things to the other.

Edit: Won't use sarcasm in github anymore.

@qwewer0
Copy link
Contributor

qwewer0 commented Oct 18, 2020

If @DrumClock says that @rhapsodyv great tip to use P1 fixes the problem then I'm behind the idea to closed this issue.

PS: If to change your mind @rhapsodyv would mean that I wouldn't able to help with marlin, then so be it. Your work worth way more than mine. So please don't leave Marlin just because my idiocy.

@thisiskeithb
Copy link
Member

@DrumClock / @qwewer0 Please open an issue in the Marlin Documentation repo and reference the missing P1 parameter for M25/M125 so it can be documented.

@DrumClock
Copy link
Author

Hi @thisiskeithb
I will not mention the P1 parameter anywhere because it is not my idea.
And I don't know how and who figured it out @rhapsodyv .

I just pointed out the G-code M25 in file which worked without problems
until the bugfix 1.1.x ............ then something went wrong in the FW !!!!

I am willing to continue testing the FW to fix bugs that are there and have not been before.

Petr

@qwewer0
Copy link
Contributor

qwewer0 commented Oct 19, 2020

@DrumClock Could you take a video of the M25 problem?

@DrumClock
Copy link
Author

Yes, I will try today

@thisiskeithb
Copy link
Member

M125 was just modified in f501930, so please try with the latest bugfix-2.0.x.

@DrumClock
Copy link
Author

Yes, the M25 or M125 command in the G-code on the SD card does not work and will cause the printer to freeze.

The M125 P1 command works in "LCD 12864" mode (connectors EXP1 and EXP2).

If the printer is controlled via the TFT display (via the serial line), it will cycle to "Pause" and printing cannot continue.

@thisiskeithb
Copy link
Member

If the printer is controlled via the TFT display (via the serial line), it will cycle to "Pause" and printing cannot continue.

It sounds like the TFT firmware is not equipped to handle standard pause/resume commands.

@DrumClock
Copy link
Author

Yes it looks like that .....
If I "blindly" press the wheel, turn it and press it again, printing will resume .....
I will probably simulate the steps that are displayed in the LCD 12864 mode.

I don't know if it's in the communication between TFT and Marlin or in FW Marlin itself, which does not take into account that it is printed via a serial line.

Tomorrow I will try printing from a computer via a pronterface terminal and give info.

@thisiskeithb
Copy link
Member

Tomorrow I will try printing from a computer via a pronterface terminal and give info.

Please make sure you're running the latest bugfix-2.0.x for the test.

@DrumClock
Copy link
Author

Yes, I use bugfix-2.0.x for the test. from 19.10.2020
The test using pronterface and the M108 command did not help
Again, I had to "blindly" use the wheel to resume printing

Pronterface info:

Connecting...
echo:start
 External Reset
Marlin bugfix-2.0.x
echo: Last Updated: 2020-10-19 | Author: (Petr Forejt)
echo:Compiled: Oct 19 2020
echo: Free Memory: 1981  PlannerBufferBytes: 1296
//action:notification DeVeliX Ready.
echo:EEPROM version mismatch (EEPROM=V81 Marlin=V82)
echo:Hardcoded Default Settings Loaded
//action:prompt_end
echo:No SD card
//action:notification SD Init Fail
Printer is now online.
Loading file: C:\Users\Petr\Desktop\M125_P1.gcode
Loaded C:\Users\Petr\Desktop\M125_P1.gcode, 358 lines
47.56mm of filament used in this print
The print goes:
- from 143.91 mm to 164.10 mm in X and is 20.19 mm wide
- from 156.90 mm to 177.09 mm in Y and is 20.19 mm deep
- from 0.00 mm to 1.01 mm in Z and is 1.01 mm high
Estimated duration: 4 layers, 0:01:04
Print started at: 22:01:05
echo:Active Extruder: 0
echo:busy: processing
echo:Active Extruder: 0
//action:notification DeVeliX Ready.
echo:busy: processing
//action:notification DeVeliX Ready.
//action:notification M125 P1 test
echo:busy: processing
echo:busy: processing
//action:paused
//action:prompt_end
//action:prompt_begin Pause
//action:prompt_button Dismiss
//action:prompt_show
echo:busy: processing
echo:busy: processing
echo:busy: processing
echo:Send M108 to resume
//action:prompt_end
//action:prompt_begin Nozzle Parked
//action:prompt_button Continue
//action:prompt_show
echo:busy: paused for user
echo:busy: paused for user
>>> M108
SENDING:M108
echo:busy: paused for user
echo:busy: paused for user
echo:busy: paused for user
echo:busy: paused for user
echo:busy: paused for user
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
echo:busy: paused for user
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
echo:busy: paused for user
echo:busy: paused for user
echo:busy: processing
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
echo:busy: paused for user
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
echo:busy: processing
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
echo:busy: processing
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
echo:busy: paused for user
echo:busy: paused for user
echo:busy: processing
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
echo:busy: processing
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
echo:busy: processing
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
echo:busy: paused for user
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
echo:busy: processing
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
//action:prompt_end
//action:prompt_begin Paused
//action:prompt_button PurgeMore
//action:prompt_button Continue
//action:prompt_show
//action:prompt_end
echo:busy: processing
echo:busy: processing
echo:busy: processing
echo:busy: processing
echo:busy: processing
echo:busy: processing
echo:busy: processing
//action:notification Print Paused
echo:busy: processing
echo:busy: processing
echo:busy: processing
//action:resumed
//action:notification DeVeliX Ready.
Print ended at: 22:04:58 and took 0:03:53

@DrumClock
Copy link
Author

It occurs to me that when G-code M125 P1 is started, Marlin invokes the "PAUSE PRINT" procedure and waits for commands from the control wheel as in LCD mode 12864.

This does not work if printing is via a terminal either Pronterface, Octoprint or TFT display. Here I have to simulate "blindly"
steps as when printing in LCD mode 12864 ....

@thisiskeithb
Copy link
Member

Which TFT do you have? One of BigTreeTech’s dual-mode TFTs?

Again, it sounds like the TFT firmware is not equipped to handle these pause/resume commands which is why you have to switch back to “Marlin Mode” to interact with the prompts in Marlin.

@DrumClock
Copy link
Author

Yes I have a dual TFT 50 V3.0 from Bigtreetech.

Because I don't speak very good English can I ask you to solve this communication problem with bigtreetech?

Actually, I don't even know what Marlin sends over the rx / tx line to the TFT display and it doesn't even work in pronterface.

@thisiskeithb
Copy link
Member

Looking at the BigTreeTech TFT source code, I can't find any mention of M125 which explains why you're not getting a prompt on the "Touch Mode" side of the TFT. Searching for "pause", I see mentions of M0. Does using M0 in place of M125 work?

You've already confirmed that Marlin is presenting the resume menu when switching to "Marlin Mode"/"12864 Mode", so that is working as expected.

@DrumClock
Copy link
Author

DrumClock commented Oct 20, 2020

Hi,
the M0 command on the "Touch Mode" side of the TFT pauses printing but the head does not leave,
so it is not possible to insert nuts, for example, so I used G-code M25 now M125 P1

Yes, it works when switching to "Marlin Mode" / "12864 Mode"
pause M125 P1 as expected.

@thisiskeithb
Copy link
Member

Yes, it works when switching to "Marlin Mode" / "12864 Mode"
pause M125 P1 as expected.

Great!

You’ll need to put in a Feature Request to BigTreeTech’s TFT firmware repo to handle the M125 P command since it’s working as intended on the Marlin side.

@DrumClock
Copy link
Author

Hi @thisiskeithb
Due to my English, I would like to ask you for help with entering the request.
Would it be possible ?

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants