=History and Collector in Charts and Trends= There is a specified way how trend manages the items in the history. The "id"-field of an history item has the following format: "subscriptionId-variableId-formatId". Therefore the files are named in the same notation (appended with the different extensions ".data", ".txt", ".index"). The trend's history item format has the following record: { id : String, variableId : String, // Simantics RVI format : Datatype, deadband : Double, // NaN = No deadband interval : Double, gain : Double, bias : Double, enabled : Boolean, groupId : String, // Subscription Id groupItemId : String, // Subscription Item Id formatId : String // One of: "all", "100ms", "1s", "10s", "60s", or "minmax" } Each datasource variable is sampled into 5-6 separated files with different interval. The sampling formats are named. Some formats may be omited if subscription configuration suggests so. For example, if "subscription interval = 250ms" then, the files "all" and "100ms" are omited. {| border="1" cellpadding="3" cellspacing="0" align="center" |- style="background-color: #f9f9f9;" |'''SamplingFormat-Id''' |'''Description''' |- |"all" |All datasource samples are stored here. |- |"100ms" |Samples are written with (atleast) 100ms interval. |- |"1s" |Samples are written with (atleast) 1000ms interval. |- |"10s" |Samples are written with (atleast) 10000ms interval. |- |"60s" |Samples are written with (atleast) 60000ms interval. |- |"minmax" |File contains only one sample and it has fields { time, value, endTime, min, max }. Not used for with binary variable. |} The file format for analog variables is the following: {| border="1" cellpadding="3" cellspacing="0" align="center" |- style="background-color: #f9f9f9;" |'''SamplingFormat-Id''' |'''Sample RecordType''' |- |"all" |{ time:Double, endTime:Double, value:Double, quality:Byte } |- |"100ms" |{ time:Double, endTime:Double, value:Double, min:Double, max:Double, avg:Double, quality:Byte } |- |"1s" |{ time:Double, endTime:Double, value:Double, min:Double, max:Double, avg:Double, quality:Byte } |- |"10s" |{ time:Double, endTime:Double, value:Double, min:Double, max:Double, avg:Double, quality:Byte } |- |"60s" |{ time:Double, endTime:Double, value:Double, min:Double, max:Double, avg:Double, quality:Byte } |- |"minmax" |{ time:Double, endTime:Double, value:Double, min:Double, max:Double } |} The file format for binary variables is the following: {| border="1" cellpadding="3" cellspacing="0" align="center" |- style="background-color: #f9f9f9;" |'''SamplingFormat-Id''' |'''Sample RecordType''' |- |"all" |{ time:Double, endTime:Double, value:Byte, quality:Byte } |- |"100ms" |{ time:Double, endTime:Double, value:Byte, max:Byte, quality:Byte } |- |"1s" |{ time:Double, endTime:Double, value:Byte, max:Byte, quality:Byte } |- |"10s" |{ time:Double, endTime:Double, value:Byte, max:Byte, quality:Byte } |- |"60s" |{ time:Double, endTime:Double, value:Byte, max:Byte, quality:Byte } |}