Group Update Rate
Groups generally work on a timer. They are set to run at a certain rate. As they are running at that certain rate, they then check the rest of the settings. If the trigger conditions pass, the group is executed fully.
The Execution Schedule controls the rate at which the transaction group executes. On the Action tab of a group you selected, under Execution Scheduling, there are two options: Timer and Schedule. Timer, executes the group at a certain rate. Schedule, executes the group at specific times. When the Schedule option spans across a period of time, you must specify the rate at which the group executes during that time.
The Timer acts as the heartbeat of the transaction group and is evaluated at the provided rate. It can run at millisecond, second, minute, hour, or day rates. The Timer specifies the OPC Tag subscription rate for the OPC Tags. When a Timer is running the transaction group it first analyzes the Tags inside the Basic OPC/Group Items section of the transaction group. Then it looks at the trigger configuration and evaluates for Tag changes. Then it evaluates the specific trigger conditions and decides to execute on a trigger. Depending on the trigger settings, full execution may not occur, but the trigger will at least be evaluated at this rate. If the triggered condition is true, the transaction group proceeds to the Triggered Expression Items section of the transaction group. Only after this flow is complete, will the transaction group interact with the database, and for example, insert the Tag values into the database.
An important difference between the Timer and the Schedule options is that the schedule option will automatically align to the specified start time on the update rate. With Schedule mode, you are providing a list of time (or time ranges) that the group should run at. If the pattern specified includes a time range, a rate must be provided, and the group will execute as in timer mode during that period.
The schedule is specified as a comma separated list of times or time ranges. You may use the following formats:
- 24-hour times. Ie. "8:00, 15:00, 21:00", for execution at 8am, 3pm, and 9pm.
- 12-hour with am/pm (if not specified, "12" is considered noon): "8am, 3pm, 9pm"
- Ranges, "8am-11am, 3pm-5pm"
- Ranges that span over midnight, such as "9pm - 8am"
When using ranges, the execution times will be aligned to the start time. For example, if you specify a schedule of "9am - 5pm" with a rate of "30 minutes", the group will execute at 9, 9:30, 10, etc., regardless of when it was started. This is a useful difference compared to the Timer mode, which runs based on when the group was started. For example, if you want a group that runs every hour, on the hour, you could specify a 1 hour rate with a range of "0-24."
All of the Transaction Groups follow a similar execution cycle. The core evaluation may differ, but the general cycle is the same.
- Timer executes, group enters execution
- Is the group paused? Break execution.
- Is the Gateway part of a redundant pair? If so, is it active? If not active, break execution. Groups only execute on the active node.
- Evaluate run-always items: OPC items, Tag references, and Expression items set to ignore the trigger (or items placed in the run always section of the Configuration window).
- Is trigger set/active? If there is a trigger defined, but it is not active, break execution.
- Evaluate "triggered" expression items.
- If applicable, read values from the database.
- Execute a comparison between items and their targets.
- Execute any writes to other Tags or the database that results from execution.
- Report alerts.
- Acknowledge the trigger, if applicable.
- Write handshake value, if applicable.
If an error occurs at any stage besides the last stage, execution will break and the failure handshake will be written if configured. The group will attempt execution again after the next update rate period.
If the group errors due to a bad database connection, it will need to be manually restarted once the database connection is brought back.