Welcome! Log In Create A New Profile

Advanced

Unable to enter two PID values (needed for double extruder) in Marlin firmware

Posted by Dr. Dave 
Unable to enter two PID values (needed for double extruder) in Marlin firmware
April 03, 2020 12:24AM
I have an Artifex2 Duo 3D printer, which has two extruders. Because of changes I have made, they are no longer matched and I have now calculated two sets of PID values, one for each extruder. However, I can't figure out how to enter these values into the Marlin firmware, and can't find any examples for how to do this.

I'm currently using Marlin 2.1.0.5 with Arduino 1.8.12 and my printer has a RAMBO controller.

No matter what I do, the same PID values are stored for each extruder. After I upload the Marlin firmware to my machine, an old value for Kp, Ki, and Kd was seen on my LCD. When I select the option to "Initialize EEPROM", the values are updated, and I expected them to reflect the values in my Configuration.h file. However, that is not what happened.

I'm including the Configuration.h and Configuration_adv.h files.

Note that I have

#define EXTRUDERS 2

and

#define PID_PARAMS_PER_HOTEND

in my configuration.h file.

If I only list a single set of values for Kp, Ki, and Kd, these values are stored for both extruder PID values (obtained after selecting "Initialize EEPROM"). When I list values for each extruder:

#define  DEFAULT_Kp   8.61,   25.51
#define  DEFAULT_Ki   0.33,    2.04
#define  DEFAULT_Kd  55.35,   79.95

only the second set of values (25.51, 2.04, 79.55) for E1 is retrieved for both extruders. On a whim, I put three values in the firmware even though I only defined two extruders:

#define  DEFAULT_Kp   8.61,   25.51,  22.61
#define  DEFAULT_Ki   0.33,    2.04,   1.69
#define  DEFAULT_Kd  55.35,   79.95,  75.55

Surprisingly, only the third set of values (22.61, 1.69, 75.55) which would be for E2, if one existed, were retrieved.

I have also tried enclosing the values in braces, parentheses, and brackets, but this generated errors during compilation.

Does anyone have an idea what is happening here? Am I defining the values incorrectly, or is this a bug?

Thanks.
Addendum:

After a bit of exploring, it looks like there is at least one, if not two software errors involved. I will try to further define these and then submit them.

The scenario: reprap 3D printer (in my case, an Artifex2Duo All Metal) with two extruders which have different PID values

What I have found is that when using the M503 command, both extruder PID values are not always printed. If the S0 option is used, both extruder PID values will be listed; otherwise, only the E0 values are listed.

In addition, assume the firmware defines
    #define  DEFAULT_Kp  11, 21
    #define  DEFAULT_Ki  12, 22 
    #define  DEFAULT_Kd  13, 23
Now reload the firmware and issue the command M502 to load the firmware PID values into the active memory. Then enter M503 S0 to print the current settings
The values printed will be:
  M301 E0 P11.00 I22.00 D23.00
  M301 E1 P11.00 I22.00 D23.00
. In other words, the P value belongs to E0, and the I&D values belong to E1.
.
Sorry, only registered users may post in this forum.

Click here to login