Scan class offsets for performance equations
- Last UpdatedDec 05, 2024
- 2 minute read
- PI System
- PI Server 2023
- PI Server
Performance equations (PE points) are calculated based on input data from PI tags. When multiple PE points share the same scan class, they are processed together at scheduled intervals. To ensure accurate results, dependent PE points must be calculated in a specific order. A scan class offset specifies a delay, allowing dependent equations to use the most up-to-date input data.
Why use scan class offsets?
Scan class offsets are critical when performance equations involve dependencies or complex mathematical operations, such as multiplication and division. These operations often rely on precise and updated inputs. By staggering calculations with offsets, you can ensure accurate sequencing and prevent outdated data from being used.
Scenario: Dependent performance equations with complex operations
Consider three PE points (A, B, and C) that depend on each other and involve multiplication and division:
-
Point A calculates the value of a PI tag called Sinusoid.
Formula: Sin(TagVal('sinusoid')).
-
Point B calculates the square of Sinusoid multiplied by a constant.
Formula: Sqrt(TagVal('sinusoid') * 5).
-
Point C combines the results of Points A and B in a more complex equation.
Formula: (TagVal('A') * TagVal('B')) / (TagVal('B') + 1).
Since all three PE points share the same scan class, their calculations are processed together. However, Point C depends on the results of both Points A and B, so it must wait until these are updated. A scan class offset ensures the calculations occur in the correct sequence.
Example: Configuring scan class offsets for advanced operations
The following table demonstrates how to configure PE points with scan class offsets for these complex equations.
|
Tag |
ExDesc |
Scan class |
|---|---|---|
|
A |
Sin(TagVal('sinusoid')) |
/f=01:00:00,01:00:00 |
|
B |
Sqrt(TagVal('sinusoid') * 5) |
/f=01:00:00,01:00:00 |
|
C |
(TagVal('A') * TagVal('B')) / (TagVal('B') + 1) |
/f=01:00:00,01:00:01 |
How it works
-
Point A and Point B are calculated together every hour on the hour.
-
Point C is calculated one second later, ensuring it uses the updated values of Points A and B.
By applying a one-second offset to Point C, you ensure its calculation reflects the results of the more advanced operations in Points A and B.
Key considerations for complex equations
-
Layered Dependencies: For equations with multiple layers of dependency (for example, Point D depends on Point C), apply additional offsets to maintain sequencing. For instance, Point D could use a /f=01:00:00,01:00:02 offset.
-
Testing: Always validate your configuration in a controlled environment to confirm that calculations occur in the intended sequence.
-
System Performance: More complex equations may require additional processing power. Monitor system resources to ensure calculations are completed within the configured intervals.