Save Permanent Function Block
The function block is used to save values in a non-volatile memory (e.g. Flash). The value is not lost when the supply voltage is switched off. When the power is switched on again, the last saved value is restored in the first DDC cycle; from the 2nd DDC loop on, SavePermanent can save the value into the non-volatile memory.
This can be used to save a measured value (energy consumption value, motor running time, ) or a parameter written via BACnet.
The controller does not have a battery to store the data, instead it stores the data in the flash memory. This data is never lost, no matter how long the controller was turned off. But the flash memory has a limited number of write cycles. Therefore, an intelligent solution is needed to store data that changes permanently in the flash.
The function block behaves differently between controllers that recognize a voltage interruption (Compact VAV, VAV IP and MSTP and FCU IP and MSTP) and controllers that cannot detect a voltage interruption (Spyder Model 5 / Unitary IRMN FCU controller). This distinction makes it possible that the same parameters in SavePermanent work for both controller types; that means no change of parameters is necessary.
The following applies to controllers that can detect a voltage interruption:
If the supply voltage is interrupted, there is still enough time to save the current value in the flash.
There is no save to the flash in case of a significant change. The parameter DeltaForWriting and MaxWritesPerWeek are ignored.
A periodic save can be configured with the parameter ForcedWritePeriod so that the value is not completely lost in the event of a software crash.
The following applies to controllers that cannot detect a voltage interruption:
A periodic save can be configured with the parameter ForcedWritePeriod so that also small changes are not lost.
MaxWritesPerWeek ensures that not too many writes occur over DeltaForWriting and ForcedWritePeriod to protect the flash memory
Figure 1: Save Permanent Function Block |
Figure 2: Save Permanent Property Sheet |
Example for a BACnet Parameter
Figure 3: Example for BACnet Parameter
Input
Input Name |
Description |
In |
This is 32-bit floating point. The value of this input is saved in the non-volatile memory under described conditions. The saved value is saved permanently, even if the controller is not supplied with power. |
Enable |
This enables or disables the complete saving: Also, the automatic saving in the event of a controller power supply failure is disabled. 0 = Do not save 1 = null = Saving is active |
Table 1: Inputs of Save Permanent Function
Output
Output Name |
Description |
Out |
In the first DDC cycle after power-up, Out displays the value of the last stored In value. From the 2nd DDC cycle, the output shows the input value, independent whether the value is saved in the flash. Numeric: 32-Bit (float, integer), Null |
OutSaved |
The output shows the last stored value, after Power UP as well as during normal DDC loop. This makes it easy to see if the save into the flash was successful. The behavior is the same for controllers that support automatic saving in the event of a controller power supply failure Numeric: 32-Bit (float, integer), Null |
Table 2: Output of SavePermanent Function
Parameter
Parameter Name |
Description |
Delta for Writing |
For controllers that support automatic saving in the event of a controller power supply failure, DeltaForWriting is ignored. For controllers that cannot detect a voltage interruption: The value entered through In is saved, if it differs from the last saved value by this delta value. The value 0 means that every change is saved. A "nan" value means Save Permanent function block wont save any value Note: There are memories with a limited lifetime where the number of write cycles is limited (IRM N4: 100000). If the function block is used to save a BACnet parameter, use 0 to save every change. |
Forced Write Period |
The value entered through In is saved, if the time set is elapsed after the last saving or after power up. It does not matter whether the saving was caused by DeltaForWriting or by the elapsed time; the time is restarted with each saving. It ensures that even small value changes are saved periodically. The value 0 deactivates the periodic saving. Note: There are memories with a limited lifetime where the number of write cycles is limited (IRM N4 : 100000). If the function block is used to save a BACnet parameter, use 0.0 hours (no periodic saving). For controllers that support automatic saving in the event of a controller power supply failure, ForcedWritePeriod could be disabled (0 hours). However, to ensure that the value is not completely lost in the event of a software crash, a value of for example 24 hours also makes sense. ForcedWritePeriod is configurable. Range: 0-8760 hours, default: 0.0 hours |
Max Writes Per Week |
For controllers that support automatic saving in the event of a controller power supply failure, MaxWritesPerWeek is ignored. For controllers that cannot detect a voltage interruption: There are memories with a limited lifetime where the number of save cycles is limited. With the IRM controller, the maximum number of save cycles over the lifetime of the device is 100000. Due to the blockwise storage of the data it is recommended that the IRM controller should use 1 write cycle per day (7/week) for continuously changing values, for example: counters, measured values, etc. If the function block is used to save a BACnet parameter, then it is assumed that the value changes during commissioning but not in daily operation. In this case, significantly higher values can be entered. The internal counter for MaxWritesPerWeek starts with 0 after power up. Default = 150 |
Current Value Par |
This value represents the saved value. When saving measured values (energy consumption, motor runtime, etc.) disable the Master Sync function to prevent the measured value of the synchronized devices from being overwritten by the master measured value. If the function block is used to save a BACnet parameter, then there is no need to write any default value, because the default value comes from the BACnet function block. Also the Master Sync function needs to be disabled. The parameter default value is entered in the BACnet function block. |
Table 3: Parameters of Save Permanent Function
Examples
|
|
Figure 4: Example: Save Permanent Function Block and Property Sheet
Refer to General Description for general information about IRM N4 Function Blocks.