Examples of Scheduling Polled Triggers

You can schedule calculations using polled triggers, as shown in the following examples.

Example 1: Scheduling a Trigger to Fire Once a Day

To schedule a trigger to fire once a day at 8:00 AM:
  1. Select the tagname to which you want to apply the trigger.
  2. In the Collection tab, select Polled from the Collection Type drop-down list.
  3. Set the Collection Interval to 24 hours.
  4. Set the Collection Offset to 8 hours.
  5. Click Update.

Example 2: Scheduling a Trigger to Fire on a Specific Day

The following is an example of how to schedule a trigger to fire one day a week, on Monday, at 5:00 PM:
  1. Select the tagname to which you want to apply the trigger.
  2. In the Collection tab, select Polled from the Collection Type drop-down list, and configure the time of day by setting the Collection Interval to 24 hours and the Collection Offset to 17 hours.
  3. Click Update.
  4. Click the Calculation tab.
  5. Monday is the second day of the week, so enter the following VBScript in the Calculation pane:
    Dim curDate curDate=CurrentTime
    IF (Weekday(curDate))=2 THEN
    Result=50 <Place your calculation here>
    END IF
  6. Click Update.

    Notice that the CurrentTime built-in function is used in this example instead of Now.

Example 3: Scheduling a Trigger to Fire on the First Day of Every Month

The following is an example of how to schedule a calculation to occur on the first day of every month:

Dim curDate curDate=CurrentTime
IF (day(curDate))=1 THEN
Result=50 <Place your calculation here>
END IF

Example 4: Scheduling a Trigger to Fire on the Last Day of Every Month

The following is an example of how to schedule a calculation to occur on the last day of every month:

Dim curDate curDate=CurrentTime+1
IF (day(curDate))=1 THEN
Result=50 <Place your calculation here>
END IF

Example 5: Creating a Controlled Sequence of Polled Tags Using a Collection Offset

A controlled sequence is a calculation that is based on the result of another calculation. The following is an example of how to configure a controlled sequence of polled tags by using the collection offset. The collection offset is greater than 0 in this example.

A tag named SumOfData has a Collection Interval of 60 seconds and the Collection Offset of 0 milliseconds.

SumofData performs the first calculation:
Result = CurrentValue("DataTag1") + CurrentValue("DataTag2")

Another tag, named CorrectedUnits, uses a Collection Interval of 60 seconds, but a Collection Offset of 1000 milliseconds.

CorrectedUnits fires and performs another calculation based on the output of the first calculation:
Result = CurrentValue("SumOfData") *.0001