2.7 retained variables

Discuss issues and ideas you have to configuring displays with PowerVision
drphil69
Posts: 139
Joined: Wed Mar 02, 2011 5:59 pm

2.7 retained variables

Post by drphil69 » Tue May 20, 2014 4:29 pm

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
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: 2.7 retained variables

Post by stalley » Tue May 20, 2014 4:57 pm

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.
Sara Talley
Software Engineer
Enovation Controls
drphil69
Posts: 139
Joined: Wed Mar 02, 2011 5:59 pm

Re: 2.7 retained variables

Post by drphil69 » Wed May 21, 2014 10:28 am

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
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: 2.7 retained variables

Post by stalley » Wed May 21, 2014 10:54 am

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.
Sara Talley
Software Engineer
Enovation Controls
CustomFP
Posts: 41
Joined: Thu Mar 22, 2012 4:12 pm

Re: 2.7 retained variables

Post by CustomFP » Tue Jul 29, 2014 10:51 pm

You still have to explicitly save your variable, even when you have chosen Survives PowerCycle or SurvivesUpdate.
What is the function/syntax for doing this, I can't find it in the function library.
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: 2.7 retained variables

Post by stalley » Wed Jul 30, 2014 2:41 pm

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.
Sara Talley
Software Engineer
Enovation Controls