Tag Scaling Properties

Configuring a Tag's scaling properties will condition the data for use within the Ignition Designer. Scaling will take the raw value driving a Tag, and scale the value. For example, if the capacity of a tank is 5250 Gallons but the tanks fill level is better represented in the Designer as percentage of 0 through 100, configuring the Tag's scaling property will result in the Tag displaying 0 through 100 while the actual tank fill moving is between 0 and 5250 Gallons.

Scaling is not available on Memory Tags: Memory Tags are not driven by an external source such as a PLC or SQL query, so scaling will never be applied. In these scenarios, it is recommended to scale the mechanism that is writing to the Memory Tag instead.

Numerical properties of Tags can be scaled allowing automatic bi-directional conversion outside of the PLC. Scaling types include Linear scaling, Square Root scaling, and Exponential Filter scaling.

The numerical properties are available to OPC, DB, and Client Tags whose data types are numeric.

Property
Binding
Name Description

Scale mode

ScaleMode

If and how the Tag value will be scaled between the source, and what is reported for the Tag.

Raw Lo

RawLow

Start of the raw value range.

Raw Hi

RawHigh

End of the raw value range.

Scaled Lo

ScaledLow

Start of scaled value range. Raw low will map to Scaled low for the Tag.

Scaled Hi

ScaledHigh

End of scaled value range. Raw high will map to Scaled high for the Tag.

Clamp mode

ClampMode

How values that fall outside of the ranges will be treated. "Clamped" values will be adjusted to the low/high scaled value as appropriate.

Scale Factor

ScaleFactor

For single parameter modes (currently only for Exponential Filter), the factor parameter for the equation.

Deadband

Deadband

A floating point value used to prevent unnecessary updates for Tags whose values float by small amounts.

Deadband Mode

DeadbandMode

There are two modes to choose from: Absolute or Percentage.

Linear Scaling

The value will be scaled linearly between the low and high values, and clamped as appropriate.
The linear equation is:

ScaledValue = ΔS * (Value-RL)/ΔR + SL

Square Root Scaling

The equation for square root scaling is:

ScaledValue = ΔS * √((Value-RL)/ΔR) + SL

Where:

ΔS = (ScaledHigh-ScaledLow)
ΔR = (RawHigh - RawLow)
RL = RawLow
SL = ScaledLow

Exponential Filter Scaling

This mode implements a simple linear recursive filter to smooth values. The scale factor corresponds to the weight of the smoothing effect, and is a value between 0.0 and 1.0. The smaller the factor, the greater the degree of smoothing.

The equation for the filter is:

y(t) = (1-f)*y(t-1)+f*x(t)

Where:

y(t) = the output at time t
y(t-1) = the previous output
x(t) = the input value (current value)
f = the scale factor, with 0.0<=f<=1.0

Note: Only good quality values are considered for the filter. Bad quality values are ignored.

Similar Topics ...