Hello,
I noticed in 2.7 the option of saving variables, "SurvivesPowerCycle." I chose this option for several variables but on power cycle they revert to their defaults. Is there something I need to do to activate it?
Also, what does "SurvivesUpdate" mean? Do I have to choose this to save through a display update?
Thanks,
Phil
2.7 retained variables
- drphil69
- Posts: 139
- Joined: Wed Mar 02, 2011 5:59 pm
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: 2.7 retained variables
Hi Phil,
On the survives power cycle variables, are you saving after you change the variable? If you are and they still aren't persisting through the power cycle, if you give me some more details, I'll try to help.
SurvivesUpdate question, you are correct. We are now able to have variables persist through updating the configuration. Great for service reminders and similar variables.
On the survives power cycle variables, are you saving after you change the variable? If you are and they still aren't persisting through the power cycle, if you give me some more details, I'll try to help.
SurvivesUpdate question, you are correct. We are now able to have variables persist through updating the configuration. Great for service reminders and similar variables.
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls
- drphil69
- Posts: 139
- Joined: Wed Mar 02, 2011 5:59 pm
Re: 2.7 retained variables
Hi Stally,
No, I assumed it was new feature that would automatically save the variables for me.
I'm still a little confused - does this mean that if I save through programming but do not choose "SurvivesPowerCycle" that I will lose the data in a power cycle (that would defeat saving it entirely)? Or if I choose 'SurvivesUpdate' that it won't save through a power cycle? I would certainly want the data saved for both, is this possible?
Regards,
Phil
No, I assumed it was new feature that would automatically save the variables for me.
I'm still a little confused - does this mean that if I save through programming but do not choose "SurvivesPowerCycle" that I will lose the data in a power cycle (that would defeat saving it entirely)? Or if I choose 'SurvivesUpdate' that it won't save through a power cycle? I would certainly want the data saved for both, is this possible?
Regards,
Phil
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: 2.7 retained variables
Hi!
You still have to explicitly save your variable, even when you have chosen SurvivesPowerCycle or SurvivesUpdate.
The Save Values selections determine how long the value will last. SurvivesUpdate variable value will live through both the configuration update and a power cycle. SurvivesPowerCycle variable value will live through a power cycle.
You still have to explicitly save your variable, even when you have chosen SurvivesPowerCycle or SurvivesUpdate.
The Save Values selections determine how long the value will last. SurvivesUpdate variable value will live through both the configuration update and a power cycle. SurvivesPowerCycle variable value will live through a power cycle.
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls
- CustomFP
- Posts: 41
- Joined: Thu Mar 22, 2012 4:12 pm
Re: 2.7 retained variables
What is the function/syntax for doing this, I can't find it in the function library.You still have to explicitly save your variable, even when you have chosen Survives PowerCycle or SurvivesUpdate.
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: 2.7 retained variables
Hi!
You can send the NVMgr->Save All() event, you can create an event with Action NVMgr->Save(variable) and send the created event or you can use SendAction(NVMgr, Save, variable). This isn't the exact syntax you will use, you'll have to get the enums for the application and action.
You can send the NVMgr->Save All() event, you can create an event with Action NVMgr->Save(variable) and send the created event or you can use SendAction(NVMgr, Save, variable). This isn't the exact syntax you will use, you'll have to get the enums for the application and action.
Sara Talley
Software Engineer
Enovation Controls
Software Engineer
Enovation Controls