Jump to content

Recommended Posts

Could use some help to get un-stuck. I am putting together a routine where I want to store variables in the event of a power failure. I thought that if I created a table and wrote the data to the cells of that table, the data was written to NVram, but found when I re-powered my V130 that the data in the table was clean. The test routine is simple where I take a MI value and do a Write Row. I verify the data exists by executing a read row into another variable to check it. What is the the correct way to save data for restart in the event of a power-fail?

Thanks in advance

Mwd

Link to comment
Share on other sites

  • MVP 2014

Hello MWD,

The data table is stored in battery backed RAM, the same as the MB, MI, etc. If it is being lost when power is switched off there must be a problem with the battery - either not-fitted, is flat or the unit is faulty (the latter is least likely, but one of the possibilities). SB8 will tell you if the battery is getting low.

Since the V130 supports the SD card, you could use that.

Link to comment
Share on other sites

Simon thanks for the reply. This post is a follow up for others that are learning and might learn from my mistakes.

My test program was to store a time counter value in a table for reporting and also to not lose the accumulated value due to a system failure.

Mistake 1 - I was using the "Reset & Initialize" command to test with, not thinking it was initializing the DB as well. I was thinking about the DB as a file and not a memory table. If you want to use the DB as a static file, use the SD card for storage.

Mistake 2 - Once I figured out the above and used just the "Reset" command, the DB value was still resetting to 0. I found that the variable I was testing with had a value of 0 for power up initialization that I had missed. A reset command is the same as a power up and was initializing the variable just as it should. After I removed the power up value and reset the PLC, the DB retained its value properly.

Thanks again for the support.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...