Scheduling Recalculation Tasks for Calculated Tags

In Hyper Historian, calculated tags are calculated in accordance with their triggers on an ongoing basis. There may be a time at which you will want to recalculate the calculated tags that are already stored in Hyper Historian, for example after new historical data is added or historical data has been updated. You can recalculate calculated tags by using the Calculation Tasks Management form (shown below), available in Hyper Historian under the System Administration node. You can schedule a task to run at a specific time in the future, or you can run it immediately.

Note.  Tasks are stored in a text file that you can update manually or by using an automated process; you are not required to use the Hyper Historian form provided for you in the GENESIS64 Workbench. For more information, refer to the Calculation Tasks File section at the end of this topic.

To set up a task for recalculating historical calculated tags, follow these steps:

  1. In Hyper Historian in the GENESIS64 Workbench, expand the active configuration database, then expand the System Administration node, and click on Calculation Tasks Management. The Calculation Tasks Management form displays, as shown below.

    Calculation Tasks Management

  2. To enable periodically polling the status of task processing, put a check mark in the Enabled check box; this allows the Processing Task bar to show you the current status of storage processing. If the Enabled check box is empty, the Processing Task status does not provide a monitor for task processing.

  3. To add a task for recalculating calculated tags, click the Add Task button []. This opens the Add Calculation Task dialog box shown below.   

    Adding a Calculation Task

  4. If you want timestamps to be in the client's local time, leave the check mark in the Times Are In Local Time check box. To use UTC times for the timestamps, remove the check mark from the box.

  5. In the Execution Time box, schedule a time for the recalculation to run.

    • To start the recalculation now (that is, as soon as you click the Okay button), put a check mark in the Now check box.

    • Alternatively, to execute the task at a specific date and time, leave the Now check box unchecked and enter the Date, Hour, Minute, and Second in the Execution Time box instead.  

  6. Next, in the Calculation Interval box, specify the historical time range for which calculated tags are to be recalculated.

    • To recalculate all calculated tag data stored in the Hyper Historian database, leave the Start Time and End Time check boxes empty. Be aware that doing this may take a significant amount of time and computer resources.

    • Alternatively, you can limit the time frame in which recalculations are performed. For example, you can check both Start and End Times and specify a limited time range so that only the calculated tag values that were stored during the specified time range are recalculated.

    • You can enter a Start Time and leave the End Time empty so that all values stored after the Start Time are recalculated; or conversely you can leave the Start Time empty and specify an End Time so that all values that were stored up until the End Time are recalculated.

  7. To stop the Performance Calculation Engine from doing routine calculations based on calculated tags' triggers while the recalculation occurs, put a check mark in the Exclusive Calculation check box. How you use this check box is determined by the volume of data to be recalculated and how quickly you want the recalculation to be done, and whether you are in a position to temporarily stop ongoing calculations. If you put a check mark in this box, when the recalculations are done, ongoing calculations of calculated tags will automatically resume.

  8. You can specify the tags to be recalculated by putting a check mark in the Use Tag Filter check box and entering a specific tag, or part of a tag using wild card characters that identify the tags to recalculate.

  9. When you are done, click OK to close the dialog box and add the task to the Storage Management form.

  10. To add another task, repeat steps 3 through 9.

  11. To be able to monitor the progress of recalculation tasks and to be able to see which task is being processed, verify that the Enabled check box has a check mark in it. If the Enabled check box is empty, processing will still occur but you will not be able to monitor it in the Processing Task bar at the top of the Calculation Tasks Management window.

  12. At this point you might notice the "plus sign" that appears in the left-most column. This icon identifies the new tasks that have not yet been saved. You can also edit and remove tasks by selecting the task and clicking the Edit Task[] and Remove Task [] buttons. Selected tasks marked as new can be edited. Once they are committed to runtime, they can only be removed. When you edit or remove a task, the icon in the left-most column changes. Any task that has been identified for removal has a large X in the left-most column, meaning that you can still cancel its removal by clicking the Cancel Remove [] button. Once you click the Apply button, though, all of your changes will be saved and the icons in the left-most column will disappear along with any tasks you marked for removal.

  13. When you are done, click Apply to save the tasks.

When a tasks runs, a progress meter appears in the Storage Monitoring section at the top of the window, and a timer shows how long the task has been running.

The Last Modification Time field at the top of the window displays the last time the task list was changed.

Calculation Tasks File

Tasks are stored in a text file that you can update manually or by using an automated process. You can use this file to schedule recalculation tasks instead of Hyper Historian's Calculation Tasks Management form in the GENESIS64 Workbench.

The Calculation Tasks file's default location is:

system:\ProgramData\ICONICS\HyperHistorian\Logger\CalculationTasks

This file is a text file with an INI file like structure, in that it contains a set of keyword=Value; sections.

Valid keywords for sections in the file are:

  • Begin=DateTime - Begin recalculation time

  • End=DateTime - End recalculation time

  • Exclusive=boolean - TRUE stops on-line calculations when the recalculation task has been processed

  • TagFilter="string"

The following is an example of recalculation task structure:

Begin=20110623T04-00-00;End=20110624T04-00-00;Exclusive=True;TagFilter="";

For additional descriptions of these values, refer to the discussions at the top of this topic.

See also:

Calculated Tags

Configuring a Calculated Tag

Creating a Calculation Trigger

Performance Calculation Functions