"Persistent" Variables in Core Studio

When creating or editing a variable in ReAX Core Studio, you will notice there is a checkbox labelled "Persist".  This article will explain what that means, how to use it, and things to watch out for.


Persistent Variables

When a variable has the persist box checked, the variable will be saved to non-volatile memory and the variable will still have the same value after the controller reboots.  

When a variable has the persist box unchecked, the variable value will revert to the default value when the controller reboots.

Applications

Persistent variables can be helpful for tracking certain status information or the current mode of operation of certain devices.  Generally, if you are using true 2-way feedback for a device (power status, volume, current input, etc.), using persistent is not advised, since the current value can be obtained from the device.

One great application for persistent variables is for storing values such as the IP address of a controlled device, a PIN code to access the GUI, the pan/tilt/zoom speed of a camera, or the default startup volume level for a DSP.  Being persistent, you can build an administrative setup page in the controller and allow the site technician to configure the parameters on the panel or in their browser on the fly.  This is especially handy for large installations where many similar rooms are being installed that share the same GUI, but have different device parameters.


Things to watch out for when using persistent variables

  1. The default value of the variable in Core Studio will no longer be the initial value of the variable after publish or reboot.  This can be confusing if you are expecting the project to revert to defaults at publish time.
  2. Persistent configuration values like IP addresses that are set on the fly are only present on the controller.  If a controller were set to factory defaults or replaced, the variables that were set on the fly would have to be set again.
  3. Persistent variables will survive from project to project unless cleared.  In the event that you are testing multiple projects and use common variable names between those projects, the value will persist.

How and when to clear persistent variables

Clearing persistent variables is simple, just check the "Clear persistent state" checkbox when publishing to FTP.  This will clear all variables stored to non-volatile memory and will revert back to default values after the publish.  The variables are still persistent, so once values are changed online, they will again be stored to non-volatile memory.