Step 0: Terminal connection
To do any work on the settings of the board, you'll need to run a Terminal - for setting that up, please see the relevant question here.
Step 1: What do we have?
The second step is dissecting the settings that are set already. To do so, send M503
to read the relevant settings from the SRAM of the board and display them in the Terminal of your choice.
Step 2: Try a PID Autotune
To run a PID Autotune, just start by sending this for your first hotend to enforce a 3-cycle PID tuning for the 200 °C region:
M303 C3 S200
For your second hotend, you'd send M303 C3 E1 S200
- the E-value is 0-indexed and defaults to 0 for the first hotend, so E1 is the second hotend.
For your heatbed (and PLA) you send M303 C3 E-1 S60
as -1 is the function dependant value for the heated bed.
Step 3: Setting the PID settings
After having obtained the PID settings from running the tuning cycle, we need to send those to the chips. To do so use M301
for a hotend and M304
for the heatbed, using the given values from step 2 as parameters.
Note again, that if you have more than one hotend, you absolutely need to have an E-value if you try to set the second hotend, as the default value is, again, E0 for the first hotend.
Step 4: Saving
To properly save the values into the EEPROM - provided it is enabled - is to just send one command to finalize:
If your EEPROM is not enabled, you'd need to take the line you wrote for Step 3 and insert that into your pre-print G-code, thus overwriting the PID settings in the SRAM before each print.