MWD Posted March 29, 2011 Report Posted March 29, 2011 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
MVP 2014 Simon Posted March 29, 2011 MVP 2014 Report Posted March 29, 2011 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.
MWD Posted March 31, 2011 Author Report Posted March 31, 2011 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now