It is possible to enter history to any point in your database. This can be done by using the "LoadDataValue" method of the Historic aggregate.
This method is of the form:
Some example code is shown below.
In this example 192 corresponds to a "Good" quality. ClearSCADA uses OPC standard quality definitions.
The parameter Reason determines the Reason For Logging field available in the historic database. The possible values for this field include:
- 0 - Current Data
- 1 - Value Change
- 2 - State Change
- 3 - Timed Report
- 4 - End of Period
- 5 - End of Period Reset
- 6 - Override
- 7 - Release Override
- 8 - Modified/Inserted
A "LoadDataFile" method is available that takes in a file name (String). This method allows entire files of information to be added into history for points in the database.
Each line of the file is required to be in the following format:
A "LoadDataValues" method is also available that allows arrays of times, values and qualities to be added to the historian. See the database schema CHistory class for more information (http://your-server-name/schema).
|Note that where possible, historic entries should be added into the database in time series order (oldest first) to reduce the load on the server as it sorts the data into time order.|
|Note also that all times entered through this automation interface mechanism are in UTC format.|
For internal points you can also use the mechanisms described in Adding Historic Data to Internal Points