How to get rid of "Invalid M204 command "M204 P500" (without a macro)
Hi, I am running Pura Slicer 2.92 and I cannot get rid of this irritating error. I want to eliminate any chance this is causing problems. I get periodic MCU errors mid-print so want to keep my code clean. Frustrating as I have moved from Slicer to Slicer (Cura, then Orca, then Creality now Cura which has a Vase mode) learning each one and always getting errors of some kind. I am running the Sonic Pad on Ender 3 v2 Neo, Marlin 2 Flavor in Prusa. Finally got a good print with my gcode below. There is no such M204 code in my starting gcode and Machine Limits are set to " Ignore". Can someone please show me how to get rid of this error without any complexity? Older posts show how to get an additional setting in the Command but with a macro which I want to avoid due to the complexity. Thank you! I uusally Google my way out of these errors but not this one.
Here is my Start gcode:
M220 S100 ;Reset FeedrateM221 S100 ;Reset Flowrate
M190 S{first_layer_bed_temperature[0] - 5} ; Heat up bed 5° lower and waitM140 S[first_layer_bed_temperature] ; Continue heating to full temperatue and don't waitM109 S[first_layer_temperature] ; Heat up the nozzle while bed is heating up
G28 ;HomeG29 ; abl
G92 E0 ;Reset ExtruderG1 Z2.0 F3000 ;Move Z Axis up
G1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position
G1 X10.1 Y145.0 Z0.28 F1500.0 E15 ;Draw the first line
G1 X10.4 Y145.0 Z0.28 F5000.0 ;Move to side a little
G1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line
G92 E0 ;Reset Extruder
G1 E-1.0000 F1800 ;Retract a bit
G1 Z2.0 F3000 ;Move Z Axis up
G1 E0.0000 F1800
RE:
Depending on the software, misinterpretation of comments on command lines can happen. That is what it looks like here.
3 things I noticed when looking at Verbose code generated by the slicer and how it uses comments and code lines.
First, there is always a space before and after the ";" comment character.
Second in most all cases there is code, then comment, not code, comment, code, comment on a single line. I would not intermix comments and code. Only one comment section after the commands on a line.
Third, I did see at the end of a program where one line has multiple code-comment groups. After each comment a "\n\n " is used. These are new line characters that breaks each command-comment group to be treated as a single line.
example of changing one of your lines.
M220 S100 ;Reset FeedrateM221 S100 ;Reset Flowrate
change to
M220 S100 ; Reset Feedrate\n\nM221 S100 ; Reset Flowrate
Or better yet
M220S100 ; Reset Feedrate
M221 S100 ; Reset Flowrate
After 41 years working in software, I learned not to stuff too much on one line. Hope this helps.
RE: How to get rid of "Invalid M204 command "M204 P500" (without a macro)
You have not attached a Prusa Slicer project file.
With a project file saved from PS as a .3mf when loaded it also loads in the contents of your 3 profiles. So we can see every setting, inc all the start blocks in all the profiles, any substitutions etc. It basically allows a much easier time debugging things as we don't have to play 20 questions. Remember the filament profiles can also have start gcode etc in them too. Also the other fields like before/after layer change should also be checked.
If you do decide to attach a file then please remember that it must be zipped up or the forum will just silently not attach it.
RE: How to get rid of "Invalid M204 command "M204 P500" (without a macro)
How do I do that?
RE: How to get rid of "Invalid M204 command "M204 P500" (without a macro)
Thank you. Will clean it up!
RE: How to get rid of "Invalid M204 command "M204 P500" (without a macro)
Separated the lines with a carriage return and inserted spaces before and after “;”. The error remains!
RE:
Looking up M204 (because I'm unfamiliar with it) I find that it is a machine limit code for acceleration. What is likely is PrusaSlicer is attempting to send the hardware settings for the printer before the custom start g-code. I've never looked to disable this, but hopefully you can find that setting based on my troubleshooting.
See my (limited) designs on:
Printables - https://www.printables.com/@Sembazuru
Thingiverse - https://www.thingiverse.com/Sembazuru/designs