Transformations and scaling
- Last UpdatedSep 19, 2025
- 3 minute read
You can configure PI points so that PI Interface for OPC DA performs transformations and scaling. Transformation and scaling are applied before the value is compared to the exception parameters for the point, so that the exception parameters are applied to the value that is to be sent to Data Archive rather than the raw value.
Transformation
To transform the value to another scale of measurement, to apply an offset or conversion factor, or to perform bit masking, configure the settings as shown in the following table.
If squareroot is set to 1 or 2, the square root or square of the value is calculated first, then the formula is applied.
|
Convers |
TotalCode |
SquareRoot |
Dzero |
Operation Input points |
Operation Output points |
|---|---|---|---|---|---|
|
0 |
0 |
1 |
No effect |
(Value)2 |
(Value)0.5 |
|
2 |
No effect |
(Value)0.5 |
(Value)2 |
||
|
Non-zero |
1 |
0 |
Defined |
[ (Value – Dzero) / Convers ] * Span + Zero |
[ (Value – Zero) / Span] * Convers + Dzero |
|
1 |
Defined |
[ ((Value)2 – Dzero) / Convers ] * Span + Zero |
[ ((Value)0.5 – Zero) / Span] * Convers + Dzero |
||
|
2 |
Defined |
[ ((Value)0.5 – Dzero) / Convers ] * Span + Zero |
[ ((Value)2 – Zero) / Span] * Convers + Dzero |
||
|
2 |
0 |
No effect |
Value * Convers |
Value / Convers |
|
|
1 |
No effect |
(Value)2 * Convers |
(Value)0.5 / Convers |
||
|
2 |
No effect |
(Value)0.5 * Convers |
(Value)2 / Convers |
||
|
3 |
0 |
Defined |
(Value / Convers) – Dzero |
(Value + Dzero) * Convers |
|
|
1 |
Defined |
((Value)2 / Convers) – Dzero |
((Value)0.5 + Dzero) * Convers |
||
|
2 |
Defined |
((Value)0.5 / Convers) – Dzero |
((Value)2 + Dzero) * Convers |
||
|
4 |
0 |
Defined |
(Value – Dzero) / Convers |
(Value * Convers) + Dzero |
|
|
1 |
Defined |
((Value)2 – Dzero)/ Convers |
((Value)0.5 * Convers) + Dzero |
||
|
2 |
Defined |
((Value)0.5 – Dzero)/ Convers |
((Value)2 * Convers) + Dzero |
||
|
5 |
0 |
No effect |
Value + Convers |
Value – Convers |
|
|
1 |
No effect |
(Value)2 + Convers |
(Value)0.5 – Convers |
||
|
2 |
No effect |
(Value)0.5 + Convers |
(Value)2 – Convers |
||
|
6 |
No effect |
No effect |
Value AND Convers |
Value AND Convers |
|
|
7 |
No effect |
No effect |
Value OR Convers |
Value OR Convers |
|
|
8 |
No effect |
No effect |
Value = Value XOR Convers |
Value = Value XOR Convers |
Scaling
To configure scaling for an OPC-based PI point, set the totalcode and squareroot attributes of the point. The convers attribute specifies the span of the device. The exdesc attribute specifies the device zero (Dzero), where the format is "Dzero=nnnnn.nn", including the quotes, where nnnnn.nn is a number, e.g. "Dzero=20". Using these values, the interface can translate a value from the scale of the device to the scale of the PI point. Scaling is only supported for numeric points.
For simple square/square root scaling, set totalcode and convers to zero. To configure how the value is stored, set squareroot as follows:
-
To square a value before sending it to Data Archive, set squareroot to 1. For output values, the square root is calculated before it is written to the device.
-
To send the square root to Data Archive and the square to the device, set squareroot to 2.