Can I recollect/retrieve an Ewon tag after a reboot of the Ewon?

23 Feb 2023

The MEMORY IO Server is not a real IO server because values do not come from a peripheral.
Memory Tags (Tags defined with the MEM IO server) are rather sorts of variables that can be modified by a user input or by a BASIC application.

 

APPLICABLE PRODUCTS

Ewon Flexy

 

ISSUE / QUESTION / SYMPTOM

How can I recollect a tag value after a reboot?

 

POSSIBLE CAUSES / ANSWER

By using RET tag topic, the tag becomes retentive.

Each change of the tag is saved to flash memory and when the Ewon boots, the last value of the Tag is restored. This feature can be convenient to use Tags as parameters.

For general tags the only thing you have to do is to ensure the MEM tag is set to the RET topic, so that it retains the tag value after a reboot.

mceclip1.png

In case you are using a buit-in Counter Tag for the digital inputs you have to first setup the tag, and use scripting to set the value of the RET tag. The script must be placed in INIT section and it must be set in Autorun.

In the example below MEM_CI is my MEM tag:

CI@ = MEM_CI@
ONCHANGE "CI","MEM_CI@ = CI@"

 


 

ADDITIONAL INFO

RET values are saved in the FLASH memory, this is not an immediate operation and the FLASH memory can only be written and erased a limited (even if huge 100.000) number of times.
This means that you should not use a BASIC script for changing retentive values at very high rate. 1 Tag/Sec. is a maximum AVERAGE rate (occasional higher rates are not prohibited at all).