Parameters saving/loading
The structures ST_TcPfw_TempMparamFromHmi_Itf, ST_TcPfw_TempPparamFromHmi_Itf, ST_TcPfw_SupplyParam contain parameters that must be stored remanently. The following variables are stored in each structure for this purpose:
- SaveDelay: Time-delayed saving. After a parameter change, a time-delayed saving can be performed here via a number in milliseconds. Based on the entered value, the library automatically counts down this number to zero. At zero the saving routine is triggered internally and at -1 the saving delay is inactive.
- bLoadParams: The parameters of the corresponding structure can be loaded via a TRUE
- bSavingParams: Feedback that parameters are being saved.
The path C:\Data must be created on the target system so that the parameter files can be created. The corresponding subdirectories within this folder are generated automatically after the first save.
The following flow chart should make clear how the saving process works.

During saving, a temporary file is created first. Then the backup file is deleted and the original file is converted to a backup file. As a final step, the temporary file is converted into an "original file".
This mechanism ensures that there is always a completely saved parameter file.

When loading a product via bLoadParams the following process checks whether the saved file is consistent.
