Define the Interval Settings for a Logic Program
Logic programs have several Interval settings that can be used when the Execution Method is set to On Interval (see Define the Execution Method for a Logic Program). They allow you to define the time of a Logic program’s 'first' timed execution or value check, and how often subsequent timed executions and value checks take place.
The Interval settings are:
- Interval—Use to define:
- The amount of time between each execution of the program
- Whether the Logic program executes automatically. If you set the Interval to 0, the Logic program will not execute automatically - it can only be executed by the Execute method being called. The Execute method can be called manually or can be called by other Logic programs, Schedules, and so on.
When the Interval is set to a value other than 0, it will execute automatically at the defined interval. For example, if the Interval is 5H, Geo SCADA Expert will execute the Logic program at 5-hourly intervals, without the need for a Schedule.
When the Interval is set to a value other than 0 (zero), the Interval and Interval Offset together determine the first execution of a Logic program. The Interval alone determines the subsequent executions.
- How frequently the program checks the value of the Trigger item (this only applies to programs that have an Execution Method of On Interval and are configured to use a Trigger—see Associate the Execution of a Logic Program with a Property in the Database)
- How frequently the program checks changes to its inputs (this is only applicable if the Input Change Detection setting is enabled—see Define whether a Logic Program Executes when the Value of an Input Changes).
If a Logic program has a Trigger and Input Change Detection enabled, it will check the value of the Trigger and the value of its inputs according to the defined Interval. The program will execute if either the Trigger item value has changed or a change to an input has been detected.
Enter the required interval in the OPC Time Format. You can enter the value directly in the field, or use the Interval window (accessed via the field's browse button) to specify the required value.
By default, the program will execute, check the value of its inputs, or check the value of its Trigger when the Logic driver starts and then will continue to be execute or check the values every second (as the default Interval Offset is NOW and the default Interval setting is 1S). (For ST programs, the Logic driver will execute or check the values every 10 seconds, as the default Interval setting for ST programs is 10S.)
By changing the Interval, you can alter the amount of time between each timed execution or check.
Manual executions have no effect on any timed executions. So, if the previous execution was at 13:10:05 and the Interval is 15S, the next timed execution would be 13:10:20, even if there was a manual execution between 13:10:05 and 13:10:20.
- Interval Offset—Use, in conjunction with the Interval (above), to define the start time for the first execution or value check for the Logic program. The 'first' execution or value check is the initial execution or value check after the Geo SCADA Expert server or the Logic driver starts, or after a change to the Interval Offset has been saved.
By default, the Interval Offset setting is blank which means that the default setting for the field is 'NOW'. This means that the first execution or value check occurs as soon as the Logic driver starts, with subsequent executions or value checks taking place according to the Interval setting.
To synchronize when each execution or value check occurs, specify the required value in the Interval Offset field. Enter the required offset in the OPC Relative Time Format. You can enter the value directly in the field, or use the Offset window (accessed via the field's browse button) to specify the required value.
We advise that you specify Interval and Interval Offset values that are fully divisible, so that the execution or value checks occur at readily recognizable times.
Example:
A Logic program has been configured to have the following settings:
Interval: 15M
Interval Offset: H+5M ('5 minutes past the start of the current hour')The settings will cause the Logic program to execute at 15-minute intervals, offset to 5 minutes past the hour (rather than on the hour).
So, if the Logic driver started at 12:23:19, the 'first' execution or value check would take place at 12:35:00 (the time of the next 15-minute interval following on from 5 minutes past that hour). Subsequent executions or value checks would take place at the frequency defined by the Interval setting (that is, at 12:50:00, 13:05:00, 13:20:00, 13:35:00, and so on).
If the Logic driver is already running when you make an Interval Offset change, the time of the configuration change replaces the time of the Logic driver starting.
- Interval Offset Time Zone—Use to define the clock that is used when calculating the time for the Interval Offset. You can choose from:
- Coordinated Universal Time (UTC)
- Local Time without Daylight Saving Time
- Local Time with Daylight Saving Time (for regional variations to the local Standard Time, such as British Summer Time).
Geo SCADA Expert uses the time zone to calculate the current time which is then used during the application of the Interval Offset and Interval settings.
To change the Interval, Interval Offset, or Interval Offset Time Zone of a Logic program, display the Logic Program Form, select the Logic tab, then configure the relevant fields in the Execution section of the tab.
Further Information
Display the Logic Program Form: see Configure an ST Program, Ladder Diagram, SFC or FBD.