M28 Writing Comments
-
So I have so been unable to write comments to files, only gcode commands. Is the M28 command able to write comments or is it only commands in a file?
-
anything after a
;
is considered a comment in g-code. what are you trying to achieve? -
I'm trying to write a gcode file with comments and commands inside it using the m28 command
-
@nickpm said in M28 Writing Comments:
m28
Yes, the question is why are you doing this?
M28 is for writing a file to sd-card https://duet3d.dozuki.com/Wiki/Gcode#Section_M28_Begin_write_to_SD_card -
I think the problem is that the g-code parser (rightfully) ignores everything after ; until a newline.
my duet webcontrol crashed when trying, and with rrf3 it didn't work at all so can't really test it, but I would assume the above is correct.
-
Because I would like to create a file that has code and comments in it. So I can look at it and see all my notes by the code inside the file.
-
But where does the need to use the g-code console stem from?
-
As others have said, M28 ignores comments in commands. Like you can (probably, I haven't tried) send console commands with comments, but they are lost as soon as the command is sent.
I can see why you might want to do this (maybe for logging?), but it's probably easiest to write the gcode file in a text editor, then send each line by copying and pasting that into your terminal program (I assume that's how you're connecting). Then you'd have a local editable copy of the file from the SD card, with comments. Or remove the SD card from the Duet, copy the file onto it locally, then replace it in the Duet.
Ian