Internet PLC Forum
General => Technical support => Topic started by: CPEng on August 29, 2011, 04:00:51 PM
-
I'm trying to figure out the best way to initialize non-volatile memory variable to default values during programming.
I have a F1616-BA PLC and have switched DIP #1 to "on" to make DM[300] and above non-volatile.
I thought 1st scan would work but in testing that runs after every power cycle. I need the variables to retain their set values during a power failure, but they need to be initialized to a default value during programming.
Thanks for any help.
-
The F1616BA has a chunk of non-volatile FRAM. You can initialize this non-volatile memory using the EEPROM manager that is part of the I-Trilogi program.
On the first scan you can copy the non-volatile values into the DM[]. Look up the load_eep and save_eep tbasic functions to see how to access this true non-volatile memory.
I have used this on several of my projects. It allows me to customize a system without having to modify the PLC program. I can change some of the tuning constants in the non-volatile memory and then reboot the PLC so that it can use the new values. This is a very useful technique for storing user data.
Gary d
-
Gary thanks for the tip.
That looks to be the best way.