Welcome! Log In Create A New Profile

Advanced

How to use M23

Posted by CDorn 
How to use M23
March 07, 2022 05:34AM
Hello there, and sorry for spamming this forum (I have loads of questions about Marlin but Im a bloody newbie). grinning smiley

So my question is, how do I make the M23 command word? My setup is a that I use a Ramps1.4 on a Arduino Mega.
I created a serial connection via pySerial (on my Computer) and want to load a g-code file to my Ramps-Board. Technically it should work by enabeling the SDSUPPORT in configuration.h right?
After that I tried to use the M23 by sending: "M23 C:\Users\username\Desktop\g_file.gcode", but it didnt work...

Is it because of the directory of the file?
Or is it that I have to tell marlin that the SD-card is connected via serial?

Thanks in advance
CDorn
Re: How to use M23
March 07, 2022 06:05AM
M23 requires 8.3 format names and directories

Also M23 can only open files that are already on the sdcard in the controller

To upload a file to the sdcard you M28 file.txt then send the code file line by line, then close the file with M29

Edited 3 time(s). Last edit at 03/07/2022 06:44AM by Dust.
Re: How to use M23
March 09, 2022 06:02AM
Okay thanks. That info helped a lot.
But now I there is a new problem with M28. In seems to have a write problem. It does not accept new commands because it wants me to give it the position of the G-Code in the new file. How do I do that?
I read that in some instances people used something like M107*1 or so. Where the star and number tell marlin the position of the g-code line.
But it doesnt work.. any advice? smiling smiley
Re: How to use M23
March 09, 2022 07:24AM
your getting this error?

"> Error:No Checksum with line number, Last Line: 0
> Resend: 1
> ok"

Because uploading to sd card requires you to use the line and check sum protocol. As you would not want errors on uploading

This is why you should be using a real control program and not just a terminal program

See [reprap.org] for details on the protocol

But basically it is expecting data on the format

N123 [...G Code in here...] *71

Where N starts at 1 and increases each line

the checksum starts with *

You can find a python implementation of calculating the checksum here [reprap.org]

You also need to watch for errors like "Resend: 1" which states that the checksum failed for line 1 and you need to send it again.

Edited 1 time(s). Last edit at 03/09/2022 07:25AM by Dust.
Re: How to use M23
March 15, 2022 04:07AM
Thanks a lot for that detailed answer!
I will try it out as soon as possible smiling smiley
Sorry, only registered users may post in this forum.

Click here to login