Jump to content
Ultimaker Community of 3D Printing Experts
RPMGuy

Adjusting Startup G.Code/PIDs in Cura

Recommended Posts

Hello all!

I was having some issues with my printer (Prusa i3 MK2) and it holding temp. A friend of mine, and their support team, recommended I try adjusting the PID settings. Using Pronterface I was able to get some new PIDs from Marlin's Auto PID Tune feature, however, I have no idea how I should implement this. I tried putting this onto a G.Code file, but it didn't work. (Surprise! Well, not really) I understand you could go into the files of Cura and change it in there, but the guide I found here was for Cura 2.1.2 (or something similar), and the files have changed since then (I'm running 2.3.1). How exactly should I implement my PID tune?

Thank you, and sorry to bother you!

Happy printing!

Share this post


Link to post
Share on other sites

I have a Prusa I3 style printer as well and found this wiki on PID Tuning very helpful:

PID Tuning - RepRapWiki

After you have found the correct PID settings, you can save same to the EEPROM via the M500 command (its all covered in that Wiki). So there's no need to put them in the startup g-code.

Hope this helps.

 

So, just to clarify, I would enter in those new PID values through Pronterface, then save them via the M500 command so that the printer uses those every time it starts a print instead.

Share this post


Link to post
Share on other sites

I've not used Pronterface, but if it lets you send gcodes directly to the printer, then Yes.

 

Ok, so I tried that, and that caused the printer to stop printing things altogether. I wrote the G.Code like this: M301 P25.78 I2.26 D73.40 (Pronterface said "Sending" when I tried uploading it so I have no clue what it actually sent) After I sent that I sent "M500", however, I did so with no confirmation that the machine had actually received the M301 command, so that was a pretty stupid move on my part. (Through a quick firmware refresh I got the printer back to its old state, including the heater issue, unfortunately)

Share this post


Link to post
Share on other sites

You can try sending the setting individually, waiting for an OK from each one, and then send the M500. You also might try specifying the heater number.

M301: Set PID parameters

IE:

 

M301 H1 P25.78M301 H1 I2.26M301 H1 D73.40M500

 

 

I'll try that in a few days, once I have the time. Pronterface had been giving me issues already, so I'm not surprised I had issues again.

Share this post


Link to post
Share on other sites

You can try sending the setting individually, waiting for an OK from each one, and then send the M500. You also might try specifying the heater number.

M301: Set PID parameters

IE:

 

M301 H1 P25.78M301 H1 I2.26M301 H1 D73.40M500

 

 

Hello again! It seems I'm still having issues with the printer. (I reran the test, so that's why I have different numbers)

>>>M301 P:24.99

SENDING:M301 P:24.99

Attempted to write invalid text to console, which could be due to an invalid baudrate

echo:Unknown command: "24.99"

>>>M301 Kp:24.99

SENDING:M301 Kp:24.99

Attempted to write invalid text to console, which could be due to an invalid baudrate

echo:Unknown command: "24.99"

>>>M301 Kp: 24.99

SENDING:M301 Kp: 24.99

Attempted to write invalid text to console, which could be due to an invalid baudrate

echo:Unknown command: " 24.99"

>>>M301 H1 Kp: 24.99

SENDING:M301 H1 Kp: 24.99

Attempted to write invalid text to console, which could be due to an invalid baudrate

echo:Unknown command: " 24.99"

>>>M301 Kp: 24.99 Ki: 2.10 Kd: 74.21

SENDING:M301 Kp: 24.99 Ki: 2.10 Kd: 74.21

Attempted to write invalid text to console, which could be due to an invalid baudrate

echo:Unknown command: " 24.99 Ki"

echo:Unknown command: " 2.10 Kd"

echo:Unknown command: " 74.21"

Any idea how this would be fixed? Thanks!

Share this post


Link to post
Share on other sites

Send it without the : and without any spaces between the parameter and the value:

 

M301 P24.99

 

or

 

M301 P24.99 I2.10 D74.21

 

 

I probably should have tried that! Unfortunately, it still gave be errors. (I checked every single baudrate and I got the same error)

>>>M301 P24.99 I2.10 D74.21

SENDING:M301 P24.99 I2.10 D74.21

Attempted to write invalid text to console, which could be due to an invalid baudrate

Share this post


Link to post
Share on other sites

I was also having this exact same problem. I found that by downloading repetier host (alternative to pronterface) and going to Config > Firmware EEPROM Configuration and then entering the PID values there (don't forget to click Save to EEPROM once you're done) then I was able to successfully enter and save the PID.

Hope that helps :)

Share this post


Link to post
Share on other sites

Did you try with the H1 to designate which heater the settings were for?

M301 H1 P25.78

 

M301 H1 I2.26

 

M301 H1 D73.40

 

M500

 

 

I did and it sent this back

SENDING:M301 H1 P25.94

Attempted to write invalid text to console, which could be due to an invalid baudrate

Share this post


Link to post
Share on other sites

I was also having this exact same problem. I found that by downloading repetier host (alternative to pronterface) and going to Config > Firmware EEPROM Configuration and then entering the PID values there (don't forget to click Save to EEPROM once you're done) then I was able to successfully enter and save the PID.

Hope that helps :)

 

I will try that to see what happens. I was going to try Octoprint, but Octoprint takes a while to set up. Thank you for the suggestion!

(On a side note, I would be quite annoyed if it was something so simple XD )

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • Our picks

    • Architect Design Contest | Vehicles.
      We're open for entries! - Design and submit your 3D designs of architectural entourage - vehicles - for a chance to win a large filament pack. Presenting an idea, an architectural design or something as big as an urban project isn't easy. A scaled model can really help to get your idea across.
        • Like
      • 24 replies
    • What The DfAM?
      I'm Steve Cox, an experienced engineer familiar with 3D printing. I wanted to share some DfAM guidelines with this community to help and make stronger parts.
      I'm also an Autodesk Certified Instructor for Fusion 360, so many of the images in ...
        • Thanks
        • Like
      • 23 replies
×

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!