EEPROM new parameter problem

edited November 2016 in Questions & Answers
Hi Repetier,

I define some new parameters for Scara Arm, but I have some strange problem in EEPROM. 
for example arm length parameter:

Configuration.h Line 68: #define ARM_LENGTH 220

Communication.cpp Line 171: FSTRINGVALUE(Com::tArmLength,"Arm length (mm):")

Communication.h Line 164: FSTRINGVAR(tArmLength)

Printer.cpp Line 29: float Printer::ArmLength = ARM_LENGTH;

Printer.cpp Line 1328:   ArmLength = ARM_LENGTH;

Printer.h Line 308: static float ArmLength;

EEPROM.cpp Line 76:     Printer::ArmLength = ARM_LENGTH;

EEPROM.cpp Line 359:     HAL::eprSetFloat(EPR_ARM_LENGTH,Printer::ArmLength);

EEPROM.cpp Line 576:     Printer::ArmLength = HAL::eprGetFloat(EPR_ARM_LENGTH);

EEPROM.cpp Line 915:     writeFloat(EPR_ARM_LENGTH, Com::tArmLength);

EEPROM.h Line 77: #define EPR_ARM_LENGTH 180

After long while, I finally found the problem is the firmware somehow doesn't read new parameters.
first time I defined EPR_ARM_LENGTH  in EEPROM.h with 500, then I read EEPROM with repetier host, the result is I get "Extr.6" prefix before "Arm length (mm):" And I got value 0.
Then I modify with 700, I get "Extr.8" prefix and strange value 135
Last I modify with 180, the prefix is gone, but I get value 0.

How to fix this?

Tx 

Comments

  • We have eeprom versions to support upgrading to new parameter. So you need to increase version and catch the upgrade case and set your variable. Otherwise you need to set value manually yes.

    Eprom positions between 200 and 1400 are reserved for extruder settings whcih is why you see epr offset for these values.
  • Hi repetier, how to increase version? I use latest repetier firmware dev10.
    I put position 180 to 190 for new parameter, i also tried to reposition use 10 to 20, but the result is the same. All the value of new parameter is 0. Even if I manually add value from repetier host, it turn to 0 again after save.

  • When you send changed value from host it should get stored regardless of position. 180 should be ok at the moment as it is unused. As proof open editor directly again. Then it rereads the values. If it then vanishes the memory is used by something else I just have not in mind.

    With version I mean eeprom version.

    // Id to distinguish version changes
    #define EEPROM_PROTOCOL_VERSION 16

    in void EEPROM::readDataFromEEPROM(bool includeExtruder) it is used to upgrade correctly.
  • Hi repetier, tx. Problem solved
Sign In or Register to comment.