Movicon Help on Line - Rel. 11.7.1301
You can use retentive variables when the project must store the variables' value after the project has been closed or the hardware platform turned off. The retentive variables can be specified for either the 'Shared' areas (Flag, Output, Input) or for those 'NOT shared'. To use the retentive variables you have to set their modes and quantities through the "Real Time DB Retentive Data Settings" for variables of 'shared' areas, and through the "Retentive not Shared" property (paragraph: "Variable General Properties") for variables of 'NON Shared' areas.
|
Any variables of the 'Shared' area declared retentive will start from the starting address to the ending address specified. It is also necessary to always check the congruency between the retentive variable area and the size of the established area. For instance, let's say 100 Outputs bytes are going to be used this means using the area from 0 to 99! The system will give warnings of any incongruities. |
The retentive variable files not only keep current variable values saved they can also contain a series of statistical data about the variables. This statistical data only gets saved when the variable's "Enable Statistic Data" property is enabled.
"NOT Shared" Retentivity Area
Movicon will create a file in XML format for each variable defined as retentive belonging to the "NOT shared" area within which the value of the current variable will be saved. These files, which are found in the project's 'DATA' folder, will be named in the following way:
NameProject_NameVariable.var
for example the "VAR0001" variable of the "Project1" project will be in a retentivity file called:
Project1_VAR0001.var
"Shared" Retentivity Area
However, variables belonging to the "Shared" area need their retentivity settings defined through the "Real Time DB Retentive Data Settings". In this case one retentivity file will be created for each area, Input, Output and Flag, within the "DATA" folder. These files will have the following names:
ProjectName.FLG: retentivity file for variables in the "Flag" area
ProjectName.FBK: Backup retentivity file for variables in the "Flag" area
ProjectName.IN: retentivity file for variables in the "Input" area
ProjectName.IBK: Backup retentivity file for variables in the "Input" area
ProjectName.OUT: retentivity file for variables in the "Output" area
ProjectName.OBK: Backup retentivity file for variables in the "Output" area
Retentivity File and Statistical Data
The last value obtained by the variable and other statistical data, if enabled, are saved in the retentivity file of each variable. The information available is:
Current Data
Actual variable value
Date of last variable update
Date of last transition from the zero value to a zero other than zero. This date (LastTimeOn) is only significant when the variable has a value that is not zero, and will be reset when the variable turns back to the zero value
Statistical Data
Minimum variable value
Maximum variable value
Average variable value
Total time in which the variable remained at a value different from zero (this data is updated on file only when the variable returned to the zero value)
Date of the last time the variable obtained a value different from zero (the date is zeroed when the variable returns to the zero value)
The five Statistical Data items described above are calculated starting from the first project run and are zeroed only when the variable's "Reset Statistic" command is used.
Daily Statistical Data
Daily minimum variable value
Daily maximum variable value
Daily average variable value
Daily total time in which the variable remained at a value different from zero (this data is updated on file only when the variable returned to the zero value)
Date of the last time the variable obtained a value different from zero for current day (the date is zeroed when the variable returns to the zero value)
The five Statistical Data items described above are calculated on a daily basis. This means that they will be automatically zeroed at midnight (passing over from the current day at 23:59:59 to 00:00:00 of the next day). The same zeroing will take place if the current day of the project startup is different from when the project was last stopped.
Weekly Statistical Data
Weekly minimum variable value
Weekly maximum variable value
Weekly average variable value
Weekly total time in which the variable remained at a value different from zero (this data is updated on file only when the variable returned to the zero value)
Date of the last time the variable obtained a value different from zero for current week (the date is zeroed when the variable returns to the zero value)
The five Statistical Data items described above are calculated on a weekly basis. This means that they will be automatically zeroed at midnight before the new week begins (passing over from Sunday at 23:59:59 to 00:00:00 of Monday). The same zeroing will take place if the current week of the project startup is different from when the project was last stopped.
Monthly Statistical Data
Monthly minimum variable value
Monthly maximum variable value
Monthly average variable value
Monthly total time in which the variable remained at a value different from zero (this data is updated on file only when the variable returned to the zero value)
Date of the last time the variable obtained a value different from zero for current month (the date is zeroed when the variable returns to the zero value)
The five Statistical Data items described above are calculated on a monthly basis. This means that they will be automatically zeroed at midnight before the new month begins (passing over from the last day of the month at 23:59:59 to 00:00:00 of the first day of the next month). The same zeroing will take place if the current month of the project startup is different from when the project was last stopped.
Yearly Statistical Data
Yearly minimum variable value
Yearly maximum variable value
Yearly average variable value
Yearly total time in which the variable remained at a value different from zero (this data is updated on file only when the variable returned to the zero value)
Date of the last time the variable obtained a value different from zero for current year (the date is zeroed when the variable returns to the zero value)
The five Statistical Data items described above are calculated on a yearly basis. This means that they will be automatically zeroed at midnight before the new year begins (passing over from the last day of the year at 23:59:59 to 00:00:00 of the first day of the next year). The same zeroing will take place if the current year of the project startup is different from when the project was last stopped.
Structure Variable Data Statistics
When the data statistics management is enabled in a structure variable, the statistics will be managed for each single member and data will always get saved in the variable's retentive file but in compressed format (and therefore unreadable with other text editors). This solution has been adopted so that data can be exchanged in Networking without influencing performances that may be effected by structure variables containing a lot of members, where the main data bulk to be exchanged is usually quite extensive.
Array Variable Data Statistics
Data statistics is not support for Array variables, whether as a whole or for each of its single components.