This is an old revision of the document!


SD / eMMC Diagnostics

Patron Neuron Gate Unipi 1.1 Axon

Unipi controllers have Modbus registers for health monitoring of system storage - MicroSD card and eMMC memory. This article describes how and why you can check those values in Mervis and what do they mean.


By monitoring storage lifespan, you can prevent damaging it. If storage lifespan changes, it is good to inform relevant persons, for example by sending an SMS/e-mail and call an alarm state. Storage can be irreversibly damaged by excessive or inappropriate use. Correct PLC setting and avoiding problems is described in Variable Backup article.

If your storage lifespan changes, you can contact Unipi support, describe the situation and attach Mervis solution. Our support wil recommend you best suited settings, so your storage will not wear out.

There are registers available on the Modbus TCP server, that indicate storage health for all Unipi controllers (apart Unipi 1.1):

Erase cycles used percentage

  • states storage wear (in %)
  • default: 0%

Good blocks percentage

  • states how many storage blocks are good (in %)
  • default: 100%


Device Modbus definition has to be at least v2_2, and also OS version has to be at least 2.4.0.

For Neuron units, there is also available information about on/off cycles with current SD card and also SD card vendor, but only for selected cards.

Following program will send an e-mail, when storage health status of the PLC changes.

When Storage_good_blocks_percentage and Storage_erase_cycles_used_percentage variables change, block changeChecker will generate true on its output for period of one cycle, which is accepted by SendMailTrig block. Parts of messages are taken from variables and merged by concat block.

Description of changeChecker function block can be found in article Variable Backup, part "Event variable backup".

More information about e-mail sending from Mervis system can be found in a separate article.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies