NVRAM

KAS uses the NVRAMClosed "Non-volatile random access memory" NVRAM is the general name used to describe any type of random access memory which does not lose its information when power is turned off. This is in contrast to the most common forms of random access memory today, which both require continual power in order to maintain their data. NVRAM is a subgroup of the more general class of non-volatile memory types, the difference being that NVRAM devices offer random access, like hard disks. The best-known form of NVRAM memory today is flash memory (non-volatile memory) to save Retain Variables.

NVRAM Size Depending on Hardware
Hardware Type NVRAM Size Allocation
Simulator 128 Kbytes
AKD PDMM or PCMM 32 Kbytes

  • Part of the NVRAM allocation is reserved to store some internal data (144 bytes).
    As a consequence, not all the complete physical NVRAM is available for the retain variables.

If the size is big enough, KAS updates the non-volatile memory to store the retain variables values. This operation is performed in the background every 20 seconds. The frequency increases to every 2 seconds when the application is running, and when you shutdown the application.

Life Expectancy of the NVRAM

  • Data Retention: At maximum operating temperature, the data written to the memory is retained for 10 years.
  • Endurance: The NVRAM memory has an endurance limit of 1014 read/write accesses, (or more than 6,000,000 years of being accessed every 2 seconds).

  • Using the retain variables is very cycle time consuming.
    As a consequence, Kollmorgen strongly recommends to carefully monitor the system load with the TraceTimes command.

How can I check the NVRAM space is enough to store my retain variables?

To calculate the NVRAM space, you have to add the size of each retained variable according to the:

  • Data Types
  • Arrays - The numbers of elements in case the variable is declared as an array.

Remember! Add the 144 bytes as stated in the Warning above.

In this example, the total size is: 3684 bits (which is less than 0.5 Kbytes).

Variable Size / element Element no. Total Size / variable
bLedStatus 1 bit 4 4
MasterAbsPos 64 bits 1 64
MyString 800 bits (100 bytes) 3 2400
TravelSpeed 64 bits 1 64
Internal data 1152 bits (144 bytes) na 1152