Save Cold Retain values - why it is done?
If i define a RealIO with attribute cold retain, initial value =0.
Now suppose Particular Real IO value is 5. At this point if power failure occurs, what will be the value of that variable after power recovery?
What will happen if i had saved cold retain values before power failure?
Voted best answer
Nothing would happen! The attribute cold retain is used for variables that are not continously filled with data from inputs or executing code. Cold retain means that a variable used retains it's value on a cold restart (if saved). Otherwise the variable assumes it's initial value.
Yes, for example various settings in an application or maybe calculations that are not made continously.
Cold retain is Not for analog signals from the field.
1. If you have a input field on the HMI to enter some set points and if the variable attribute is retain, you can store the current values on OPC server by saving cold retain values.
2. If you have a internal variable inside the controller and the attribute set to cold retain, then it retains the last value of the variable even after a cold restart.
3. If you want to retain the analog value from the field in case of comm failure or power failure to the IO module then use the ISP control channel and ISP value channel in your hardware setting on the AI card to define a fixed value.
If you have defined a variable as cold retain..there is no need to provide an initial value.
when a controller will be cold restarted it will hold its last value. Different kind of variables will have different values
1. Variables with attribute retain...will have the present field value. They will not latch last running value.
2. Variables with initial value..will have that value as their starting value after cold restart.
3.Variables with cold retain attribute will hold the last value they were holding before cold restart.
Generally, In a plant, only those variables are given cold retain as attribute which are very critical for plant startup and should assume a particular value for successful startup op plant. This has to be decided carefully as they also impact the memory(load) of a controller very drastically.
Hope this helps