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.


[0] Message Index

[*] Previous page

Go to full version