Designing schedules

This topic explains the issues you need to consider while you are designing schedules. When creating schedules, there are two types of entries that you can select: event-based entries and time-based entries. This section describes both types of entries and the triggers that can be used by each.

Note

You must copy the schedule file (*.EVS) from the ProfessionalPLUS workstation to those Operator Stations that require that schedule.

Event-Based Entries

Event-based entries are created using the Add Event Entry dialog box. Event-based entries can use any data source available to the system to trigger an action. To select a data source, you can either enter the data source in the Data Source field or click the Browse button to access the Expression Builder.

Five event types are available to trigger an action based on the value of a data source. For example, you may want to have a certain action occur when an alarm equals HIHI. By tying the value of the alarm field to the OnTrue event type, you can trigger an action when the value of this field becomes equal to HIHI.

The following table lists the event types that are available and when they trigger:

The event type...

Triggers...

OnDataChange

When the expression changes.

OnTrue

When the expression resolves to a non-zero value.

OnFalse

When the expression resolves to zero.

WhileTrue

At the specified interval as long as the expression evaluates to a non-zero value.

WhileFalse

At the specified interval as long as the expression evaluates to zero.

Time-Based Entries

Time-based entries are created using the Add Timer Entry dialog box. Time-based entries trigger at a scheduled time and are not tied to a data source. The following table lists the time triggers that are available and when they trigger:

The time type...

Triggers...

One Shot

Once at the specified date and time. For example, you can schedule an entry to trigger at 5:00 p.m. on 7/4/98.

Continuous

Continuously at the specified interval, starting at the specified time. For example, you can schedule an entry to trigger every eight hours.

Daily

On the scheduled days of the week at a particular time. Optionally, you can specify an end time and interval. For example, you can schedule an entry to trigger Monday through Friday, at noon, or every hour from noon until 6:00 p.m.

Monthly

On the scheduled days of the month at a particular time. Optionally, you can specify an end time and interval. For example, you can schedule an event for the 15th of the month, at 9:00 a.m., or every hour from 9:00 a.m. until 5:00 p.m. You can also schedule an event for the end of the month at a particular time. This setting determines the last day of the month for you.

All time-based entries run the script tied to the OnTimeOut event procedure.

Script Authoring Experts

When you select an action in the Operation field of either the Add Timer Entry or Add Event Entry dialog box, DeltaV Operate asks you whether or not you want to run the Script Authoring Expert now. If you select Yes, it automatically runs the Script Authoring Expert associated with that action. If you want to run the Script Authoring Expert at a later time, you can modify the entry and click the Run Expert button. After you have provided the Expert with the required information, the Expert generates a VBA script tied to the appropriate event.

For example, the Replace Picture Script Authoring Expert asks which picture you want to display and, once you have provided it with a picture name, generates a script to replace the picture. Once the script is generated, you can edit it by re-entering the Expert or by accessing it directly using the VBE.

In addition to the Script Authoring Experts provided in DeltaV Operate, you can write your own custom scripts for frequently-performed tasks. Refer to Writing Custom Scripts for the Scheduler for information on how to create your own custom scripts for the Scheduler.

Creating and Editing Schedules and Entries

The Scheduler allows you to create multiple schedules which help you to easily organize and maintain events. When you create a new schedule, you can control it's properties from the Scheduler Properties dialog box.

The following table lists the tabs on the Scheduler Properties dialog box and the properties that can be controlled from each:

Tabs

Properties

Run Time State

Run in Foreground

Run in Background

Window Properties

Window Height

Window Width

Window Styles

Stats Refresh

Timer Statistics Refresh Rate (in seconds)

Event Statistics Refresh Rate (in seconds)

Background Files

Lists all schedules running in the background. No changes can be made from this tab.

You can create new schedules when DeltaV Operate is in the configuration environment.

Once you have created a schedule, the schedule and all its entries appear in the Schedules folder of the system tree. You can open a schedule and view or edit it's properties at any time by double-clicking the schedule name in the system tree.

Once you have created a schedule, you can add new entries to it using the Script Authoring Experts in the Scheduler category or by writing your own custom scripts. You can edit an existing entry by selecting the entire entry or a particular cell within the entry. Once created, entries can be easily copied or moved from one schedule to another.

Sorting the Spreadsheet

You can sort Scheduler entries in ascending or descending order by clicking the heading of the column you want to sort. For example, if you want to sort entries alphabetically by name, click the Name column's heading. The entries will appear in ascending order. To sort them in descending order, click the Name column's heading again.

Note

Sorting is only available in the configuration environment. In the run-time environment, entries appear in the order they were added to the schedule.

Viewing and Controlling Entry Diagnostics

The Scheduler allows you to view and control entry diagnostics in the run-time environment. If you open a schedule in the run-time environment, you can view the status of entries, the number of times they have been fired, and the time when they were last fired. You can also:

  • Start or stop an entry from executing.

  • Reset the statistics (number of times it has been fired and time when it was last fired) of the entry.

  • Trigger an entry to fire on demand.

If you have loaded a schedule, but the scripts are not firing, you need to determine whether the problem is caused by the firing mechanism or by the script itself.