SD / eMMC Diagnostics
Patron Neuron Gate Unipi 1.1 Axon
Unipi controllers have Modbus registers for health monitoring of system storage - MicroSD card or 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.
Attention:
If your storage lifespan changes, you can contact Unipi support, describe the situation and attach Mervis solution. Our support will recommend you the best settings to keep your storage from wearing out.
SD / eMMC storage diagnosis
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%
Note:
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 specific cards.
Example of use
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.
Note:
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.

