Retain variable

Retain variable

Please clarify the following questions:
1) It is advisable to use a retain variable as a reference for the exchange of data ModBus?
2) What mechanism is assigning a value to a variable stored. Every time when there is a performance of the assignment operator is executed or recording function only when you change?

This is a migrated post! Originally posted on 28.05.2016 by user LSergM. Please be aware that information can be outdated.