M00 command gets skipped

In my tool change script I have an M00 command with a short instruction, followed by another M00 command with another message. Basically, two steps in the tool change process, the first message telling me which bit to install, and the second telling me that the Z-axis homing is about to start.

I find that the first message flashes by and the run pauses at the second message only.

My understanding is that M00 is an unconditional stop, and that I should have to press the main button to move past the message.

My code looks like this:
M00 Chg to Click when changed

M00 Home the Z-axis first

Am I doing something wrong?

Tech: MPCNC Primo with Rambo 1.4 board and ā€œFull Graphic Smart Controller, bigā€. Fusion360 with Estlcam to generate the gcode.

Strange. Your understanding matches mine, and I just copied and pasted your two lines into a file and ran it off the SD card, and the MPCNC stopped at both lines. Maybe you can attach the g-code file that is messing up to this topic so we could take a look. Maybe there is a non-printing character in the line or some other issue.

1 Like

Hereā€™s my start up code. I added the M400ā€™s today to see if it made a difference, but it still reacts the same. ā€œConsole2 4 v6 - frontā€ is the name of the gcode file (for where you see that in the code).

So I get a pause on the first message: ā€˜Console2 4 v6 - front Click to startā€™
It briefly shows ā€˜Chg to S1R 1/8" 2 flute 24000 Click when changedā€™
And then it pauses on ā€˜Home the Z-axis firstā€™.

It skips the pause for the second message.

Any help is appreciated.

G90

M00 Console2 4 v6 - front Click to start

M107 P2 ; Stop spindle
M400 ; wait for move to finish

G00 Z40 F500 ; Raise Z probe off of surface
M400 ; wait for move to finish

M00 Chg to S1R 1/8" 2 flute 24000 Click when changed

M400 ; wait for move to finish

M00 Home the Z-axis first

G28 Z ; Home in order, w/zprobe
G92 Z0.5 ; Account for probe thickness (set your thickness)
G00 Z5.0000 F500 ; Raise Z probe off off of surface

M400 ; wait for move to finish

M0 Rtr will start now

I donā€™t know what is going on. Brainstorming I see possible sources: something in the g-code generation is inserting non-printing characters that is confusing Marlin, a bug in Marlin, a bug or issue in the g-code sender, or a minor hardware issue. So gather a bit of info:

  • What program are you using to generate your g-code?
  • What program are you using to send your g-code to the control board?
  • If you are using a g-code sender like Repetier-Host, does the problem occur if you run that same program from the SD card.?
  • What version of the Marlin firmware are you running?
  • Please attach the exact file that is causing the problem. You can use the upload button:

UploadIcon

There is one thing you can try. Put some g-code command(s) that take a bit of time just before the M00 that is failing. Maybe something like this:

G00 Z65 F100
G00 Z40 F100

If this ā€œsolvesā€ the problem, there the issue is most likely Marlin or the rotary encoder button on your display. Iā€™m running Marlin 509D on a Rambo 1.4 board like yours, and I tested multiple M00 commands yesterday in response to your question. I did not have an issue.

Edit: I just copy and pasted your code above, put it on an SD card and ran it off the SD card. The machine stopped at all the M00 commands.

I would definitely try removing all non letter characters. - and "

I removed the " from the bit name in Estlcam, but never thought to remove the /. Iā€™ll try that tomorrow.

Hereā€™s the code generated by Estlcam for a really simple piece. The tool change code is defaulted in at the beginning of the fileā€¦

As I said in the original post: Tech: MPCNC Primo with Rambo 1.4 board and ā€œFull Graphic Smart Controller, bigā€. Fusion360 with Estlcam to generate the gcode.
Additional info: running straight off SD card. The Marlin version is whatever V1 shipped, 509D sounds right ā€“ I can check that tomorrow as well.

bit block.gcode (25.7 KB)

As another thought: The M00 command has a [P] and an [S] parameter. Is there any chance that Marlin is seeing the bit name (ā€œS1R blah blah blahā€) and interpretting the S1 as a one second time out on the pause???

2 Likes

I took a look, and there is no non-printing characters besides in the M00 areas of the file, so we can rule that possibility out. I like Darrellā€™s idea.

Thanks - I didnā€™t see anything in Notepad+, but I forget whether it automatically shows non-display characters or not.

I like the idea that ā€œS1Rā€ is being interpretted as a one second pause parameter. Iā€™m going to test that tomorrow.

So the answer is the ā€˜S1Rā€™ in the prompt string of the M00 command.

Since S is ā€˜expire time in secondsā€™, it was expiring the message in one second and moving on.
Once I changed the string from S1R to SIR, everything works correctly.

Something new to consider when creating prompt strings. Lol.

1 Like

The only thing strange is that I copied your text and ran it, and it did stop for me. Anyway, glad you have a solution.

Robert - my Marlin pops up as 509 on the splash screen. No ā€˜Dā€™ at the end. I wonder if you have a slightly newer version? I got mine from the V1 site, so I assumed it was flashed with the most current firmware.

I believe the ā€œDā€ denotes the Dual end-stop firmware version.

1 Like