Author Topic: NV MEMORY FULL/DAMAGED  (Read 20729 times)

Offline pinias

  • PLUS+1 Guru
  • *****
  • Posts: 220
  • Karma: +7/-0
NV MEMORY FULL/DAMAGED
« on: November 21, 2015, 06:49:31 PM »
Hello there.

I record the time that the equipment has been used in the NV memory of a MC050-010. I pretty much record everyminute, but when I did the logic by first time I did record every second of equipment in use.

After attending the Advance training I learn that I should add a positive transition to write to the NV memory and the máximum times to writte to the NV memory will be 1,000,000 at 20°C...

as son as I learn that I update my logic in order to record/write every minute of equipment used to the NV Memory, becuase just doing simple math, if I record every second that is 3600 seconds in 1 hour,

so 1 million divided by 3600 is 277 hours (pretty much)the maximum time to record.

well, the problem is that 10 of the equipments were already deployed to the field, with the logic to record every second, one of these units came back to the shop and the guys ask me about the issue, it shows that the equpment has been used for around 272 hours which does not make sense, they reflashed the controller with the latest version, set the hours been used , test the equipment for a while and  power off

Next day the equipment was power on and the hours in use were wrong, it was showing less hours tan the day before.

I have checked my logic and it is right, I change the name for the NV memory block just to see if the problem may go away but no, the problem is still there.

I had to replace the controller , download the firmware that records every minute and so far it works fine.

So it seems that I reached the maximum written times.

this is what DANFOSS says "NOTE! The EEPROM in our controllers has got a maximum writing times
of 1000000 at 20° C."

the question is, is any way to do something if the EEPROM has been written 1000000 times?

I mean, the controler functionallity works ok, however, I can not longer use it becuase doesn not record the time anymore .

and that is just 2 memory allocation, I mean I have 2 memory blocks to record time in the NV memory.

Does anyone knows if I can define a different memory allocation so that the NV memory will work again?

it is just not fair if nothing can be done, I am sure something can be done, any suggestions?

I appreciate any feedback

Thanks


Offline Marbek_Elektronik

  • PLUS+1 Guru
  • *****
  • Posts: 352
  • Karma: +8/-0
    • Marbek Elektronik
Re: NV MEMORY FULL/DAMAGED
« Reply #1 on: November 22, 2015, 11:18:54 AM »
If it should be my controller, I would open it and change the EEProm ;-)
And then use it for testing.

The other way ist to send it back an Danfoss can repair it.
Marbek Elektronik, Dipl.-Ing. Bernd Konrad
Dienstleistung, Entwicklung, Herstellung

Offline jashom1

  • PLUS+1 Expert
  • ****
  • Posts: 80
  • Karma: +6/-0
Re: NV MEMORY FULL/DAMAGED
« Reply #2 on: November 23, 2015, 02:51:37 AM »
Hi,

In future you could use the MC050-110 that has FRAM and does not have the limitation of EEPROM erase/write cycles...

You could in theory allocate more memory locations and switch over to them based on an input or service tool setting, as I suspect that only that 32 bit block would get damaged.

A general rule I read somewhere is on parameters that do change often is to allocate 32bits for each parameter, as the full 32 bits get written every time it's changed (even if it's only a U8 declared for that parameter for example) so if the erase/write cycles are exceeded it doesn't muck up another parameter if it's sharing the same 32 bit block.

Another thing I also do is check to see if the same value is already stored in the EEPROM, so it's not writing the same value to EEPROM, which would be wasting a cycle.

Cheers,

John.

Offline Marbek_Elektronik

  • PLUS+1 Guru
  • *****
  • Posts: 352
  • Karma: +8/-0
    • Marbek Elektronik
Re: NV MEMORY FULL/DAMAGED
« Reply #3 on: November 23, 2015, 06:40:03 AM »
Yes,
and I allways read out the EEProm after writing to it!
I don't write to it and have the value in memory and read it only at next starting of controller.

It's better to save the value in EEProm, read it out directly and work with it directly.
For example: Write in one loop and read out in next loop and show it on display.
Marbek Elektronik, Dipl.-Ing. Bernd Konrad
Dienstleistung, Entwicklung, Herstellung

Offline pinias

  • PLUS+1 Guru
  • *****
  • Posts: 220
  • Karma: +7/-0
Re: NV MEMORY FULL/DAMAGED
« Reply #4 on: November 24, 2015, 08:13:49 PM »
John,

That is what I thought, just  that 32 bit allocation could be damaged. That is why I tried adding another memory block in order to assign a new allocation however I had the same issue.

as I said I have 2 memory allocations for time used/operated of the equipment becuase the controller works for 2 different systems each can be operated individually or combined so the fun thing is that it did happen for just 1 of the NVmemory not for both.


when the equipment is power on I gather what is in the NVmemory and show it in the display and if some conditions are met then it starts adding a minute to what was already in there and write this new value to the NVmemory and so on.

the display shows hours not minutes but if I read the memory with the service tool I can see the new data as it is recorded.

As marbek said,  I can replace the EEPROM and use for testing but the problem is that I will have around 10

thanks both for your inputs

I guess I will check with Danfoss about the replacement of the EEprom and see if it is worth to do it

I appreciate



Offline Loader

  • PLUS+1 Expert
  • ****
  • Posts: 50
  • Karma: +3/-0
  • If something can go wrong, it will!
Re: NV MEMORY FULL/DAMAGED
« Reply #5 on: November 25, 2015, 12:20:48 PM »
Hi Pinias, I have an idea...
If memory allocation is doing in alphabetical mode (like when you doing an All parameters list)...
You can try this: add a new U32 parameter after the two NV for to be sure you go out from eprom damaged.
Then you try to modify your logic adding other two new parameter in order to use these in your logic. Don't use the oldest parameters!
If this method works remember of don't adding other parameters before the location damaged!

Please let us know your updates for this issue...!
Bye

Offline pinias

  • PLUS+1 Guru
  • *****
  • Posts: 220
  • Karma: +7/-0
Re: NV MEMORY FULL/DAMAGED
« Reply #6 on: November 25, 2015, 03:23:21 PM »
Loader,

I did something like that. I left the NV blocks with the old name, I added a new NV block and set a new name, but I got the old blcks disconnected or not "writting"...
mmm

may be I could try this, leave the old blocks connected or recording as normal and the new NVblocks will do it too.

and see if i got a new memory allocation, I could even set another 2 more just in case.

that may work... I will try.

Thanks




Diego

  • Guest
Re: NV MEMORY FULL/DAMAGED
« Reply #7 on: December 01, 2015, 08:24:13 PM »
Hello Pinias, reading your doubts I recommend you to read "520L0719 • Rev KA • Nov 2011" document that talks about EEPROM Write/erase cicles.
Best regards. Diego

Offline pinias

  • PLUS+1 Guru
  • *****
  • Posts: 220
  • Karma: +7/-0
Re: NV MEMORY FULL/DAMAGED
« Reply #8 on: December 02, 2015, 02:45:02 PM »
ok, that confirms our thoughts.

just a sector is damaged, now the question is what could be the best way to skip the sector damaged?

the picture attached shows what I have tried so far, basically I added another NV block with a different name but it did not work, looks like it was placed at the same sector

I remind that is it supposed the program is generated from top to bottom and left to right of the graphical page.  so may be I have to créate another subpage after the previous one.

what else you could try?

I appreciate the feedback
Thanks all for the brain storm

Diego

  • Guest
Re: NV MEMORY FULL/DAMAGED
« Reply #9 on: December 02, 2015, 08:58:37 PM »
Hello Pinias. Could you show us more of the logic implemented? Regards. Diego.

Offline Loader

  • PLUS+1 Expert
  • ****
  • Posts: 50
  • Karma: +3/-0
  • If something can go wrong, it will!
Re: NV MEMORY FULL/DAMAGED
« Reply #10 on: February 24, 2016, 01:58:16 PM »
Hi Pinias,
have you the solution to identify the damaged sector?
Have you solved the problem?
Thanks for your feedback
Bye

Offline pinias

  • PLUS+1 Guru
  • *****
  • Posts: 220
  • Karma: +7/-0
Re: NV MEMORY FULL/DAMAGED
« Reply #11 on: February 26, 2016, 01:57:41 AM »
first answer is no, I have not had time to get back to that issue.

Now, I do have the controller with the issue but I have not done any other test, however I did some research.

I am going to quote the following:
"If the value being saved in a sector is less than 32 bits (such as. U8, S16, BOLL, etc) adjacent bits in the same EEPROM sector are rewritten with their previous value. The implication of this memory property is that if two values are being written to the same memory sector"

first concern, what do Danfoss mean about 2 values in the same sector?, that should not be, right?? becasue they said that even if you value is U8 it will write it down as a u32 everytime

because as mentioned before a sector is a U32 and it is assignend just to one variable (memory block) I believe.

So one thing I am thinking to try is to switch to S32 instead of U32 and have another memory block in a different part of the program and see if it assignes a new sector for this new memory block, but I will monitor the old one in order to check what is going on.

maybe the new mem block gets the damaged sector assigned and the old mem block get the new sector assigned. That is something that may happen, right?

anyway as soon as i can do the test I will let you know the results

Thanks

Antonio


Offline Loader

  • PLUS+1 Expert
  • ****
  • Posts: 50
  • Karma: +3/-0
  • If something can go wrong, it will!
Re: NV MEMORY FULL/DAMAGED
« Reply #12 on: February 26, 2016, 10:06:45 AM »
Hi,
Quote
first concern, what do Danfoss mean about 2 values in the same sector?, that should not be, right?? becasue they said that even if you value is U8 it will write it down as a u32 everytime
I think this: if you have more parameters for example 1 U8, 1 U16, 1 BOOL, 1 S8 ...etc... it is possible that all this parameters are allocated in the same 32 bits memory location.
In this case, is sufficient that if one of these value is "over" written,  all the parameters became damaged!
To change from U32 to S32 I think don't helps, because S32 is Always 32 bits like U32.
.... ???....
I am very interested of this, please give me a feedback!!
Bye

Offline spittet

  • PLUS+1 Guru
  • *****
  • Posts: 118
  • Karma: +6/-1
Re: NV MEMORY FULL/DAMAGED
« Reply #13 on: February 26, 2016, 02:56:26 PM »
The way I understand it is that if you have two U8 values that are written to the same U32 sector, then the whole U32 sector is written each time one or the other of the two U8 values are written.

So, if valueU8#1 is written each 60s and valueU8#2 is written each 30s, then the whole U32 EEPROM sector is written each 30s. This means you meay reach the 1 millions times limit faster than you think for the valueU8#1.

Sam

Offline pinias

  • PLUS+1 Guru
  • *****
  • Posts: 220
  • Karma: +7/-0
Re: NV MEMORY FULL/DAMAGED
« Reply #14 on: April 01, 2016, 03:09:27 PM »
Loader,

I was able to run some tests at the bench this week and after a couple of days it seems to be working.

Basically I copied the page that counts and record the working time and paste it at the top page.

of course I assigned a new name to the NV memory at the copied page.

not sure when I could do a test in the equipment but if it had worked at the bench I do not see what it could fail at the equipment is just the time worked feature.

I think that is all what I can do in order to skip the NV memory damaged due to 1000000 times have written down it

Thanks all for your help
Regards