Glossary · RETAIN
What is Retained variable (RETAIN)?
A variable held in retentive memory, so it keeps its value through a power cut and restart.
Used for totals, running hours and batch numbers. Not used for machine state: after a power cut the process must start from a known safe state, not from the middle of a fill step.
Retained memory is limited on many controllers, so retained variables are chosen deliberately rather than by default.