General description

To eliminate loss of critical information (controller’s state, external device status, etc.) in case of a power failure, the CANNY 7 controller is equipped with non-volatile memory. The values saved in EEPROM will be available in special registers after the power is restored.

There are 64 16-bit non-volatile memory cells, which are accessed by using the corresponding input and output registers.

Note: Working with non-volatile memory does not require any special pre-configuration. However, in order to avoid loss of information, make sure that in the time period between writing new values, the value in the write register of the used non-volatile memory cell is read from the read register of the same cell. See the example for more detail.

Note: Changing a value in a non-volatile memory cell will increase the execution time of the diagram loop in which the change occurred by several milliseconds.

Note: The number of times you can overwrite information in non-volatile memory is limited. CANNY 7 memory driver is organized in a way that substantially increased the longevity of non-volatile memory. However, avoid permanently saving unnecessary data into the EEPROM or storing data on each execution cycle of the diagram. Only preserve information upon meeting certain conditions, see example.

Non-volatile memory registers

Below is a description of expected values of controller non-volatile memory setup registers. They are used to write information into the EEPROM cells.

Memory set registers.
Register Expected values
EEPROM Set Cell 00

EEPROM Set Cell 63
0…65535 = value to be set

Below is a description of acceptable values controller non-volatile memory read registers. They are used to read information from the EEPROM cells.

Memory get registers.
Register Return values
EEPROM Get Cell 00

EEPROM Get Cell 63
0…65535 = value to be read


Function diagram with non-volatile memory cells.

Pressing a button connected to Channel #0 of the controller causes 1 to be added to the value previously stored in EEPROM Cell 00, and the resulting value is then written into the same cell and sent into the “counter” network. When the controller is reset, the value saved in EEPROM Cell #0 will be restored to the “counter” network. This lets you avoid data loss.

Note: The process of storing data in the EEPROM takes time, i.e. it is not instantaneous.