PLUS+1 Software > General controls

How to save a STRING to NV?

<< < (2/2)


--- Quote from: FluidPowerTom on September 02, 2020, 06:09:30 PM ---I'd be checking to see if STRING type variables will save as RETAIN variables in the Structured Text POU.  That'd be by far the easiest way.

--- End quote ---

I tried it and, unfortunately, it seems that a variable of String type cannot be set as "RETAIN" in ST. I got the following message in the "Compiler Messages" during compilation (that aborted) :

--- Code: ---st_SavedString_data has a non-basic type, and can therefore not be backed by Non-Volatile memory
--- End code ---

I joined the test project to this post

See this post from Nilla about limited support for RETAIN: -

I agree. Expanding the support for NV and RETAIN variables is long overdue.

Hi All,

I downloaded the program SaveStringNV and I modified.

It's working but the data it's not saved as in NV.
when the controller is off,  the SaveString data it's not saved .

Please are you finding a why to save string?

I need that to integrate a password in our program for customers. 

Thanks in advance for your help

With best regards

It sounds like the only way to do it with Danfoss hardware may be to set up an ASCII lookup table and actually save the values as number arrays.


[0] Message Index

[*] Previous page

Go to full version