<< Click to Display Table of Contents >> Manual > Monitoring system construction guide > Construction of main functions > Logging/trend graph > Trend graph and logging function > What is historical data? |
What is historical data?
Historical data is time-series data that also includes a time field, such as:
time |
DATA00 |
DATA01 |
... |
DATA98 |
DATA99 |
2017/1/1 10:12:00 |
23 |
0 |
... |
2 |
75 |
2017/1/1 10:12:01 |
44 |
1 |
... |
3 |
34 |
... |
... |
... |
... |
... |
... |
Data stores can include CSV files and databases (ODBC).
To create historical data in FA-Server, you can use the logger action or summary action. You can also import CSV files or database tables created by external applications.
Requirements for historical data (CSV)
If you save data in CSV file format, please separate files by date.
example)
LOG20170101.csv
time |
DATA00 |
DATA01 |
... |
DATA98 |
DATA99 |
2017/1/1 00:00:00 |
23 |
0 |
... |
2 |
75 |
2017/1/1 00:00:01 |
44 |
1 |
... |
3 |
34 |
... |
... |
... |
... |
... |
... |
2017/1/1 23:59:59 |
54 |
0 |
... |
4 |
66 |
LOG20170102.csv
time |
DATA00 |
DATA01 |
... |
DATA98 |
DATA99 |
2017/1/2 00:00:00 |
43 |
1 |
... |
4 |
55 |
2017/1/2 00:00:01 |
53 |
1 |
... |
3 |
74 |
... |
... |
... |
... |
... |
... |
2017/1/2 23:59:59 |
67 |
0 |
... |
2 |
86 |
Also, please add the date to the end of the file name.
example)
LOG20170101.csv ・・・ [yyyymmdd]
Although files are usually divided by date, you can also view data stored in files for the following periods:
period |
example |
Yearly |
[head]yyyy.csv Example) LOG2017.csv |
Monthly |
[head]yyyymm.csv Example) LOG201701.csv |
Hourly |
[head]yyyymmddhh.csv Example) LOG2017010100.csv |
Minute |
[head]yyyymmddhhmm.csv Example) LOG201701010000.csv |
Although the graph display function will work even if all data is saved in a single file, it is not practical because the processing load increases as the number of data items per file increases. |
ms field (millisecond field)
You can also specify historical data that includes the ms field (in milliseconds; 1000ms=1 second) as follows:
time |
ms |
DATA00 |
DATA01 |
... |
DATA98 |
DATA99 |
2017/1/1 10:12:00 |
100 |
23 |
0 |
... |
2 |
75 |
2017/1/1 10:12:00 |
200 |
44 |
1 |
... |
3 |
34 |
2017/1/1 10:12:00 |
300 |
|||||
... |
・・・ |
... |
... |
... |
... |
... |