Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

titleTable Of Contents

...

Table of Contents
maxLevel3
minLevel3
typeflat
printablefalse
separatorpipe

Overview

All protocol modules support the scaling of item values. This allows client applications to view or change data based on calculated formula instead of raw device data. Any item can be scaled, with the exception of Boolean (bit) and String items. After scaling the original item data type will be changed to Double.

To apply scaling to an item, use the following syntax as the OPC item name:

Linear Scaling

ItemName{SL:LR:HR:LE:HE}
LowRaw, HighRaw, LowEGU, HighEGU in "{SL:LR:HR:LE:HE}"

...

Example: Device1.40001{SL,:0,:4095,:0,:100}

If device returns raw value 1000 the scaled value should be:

...

Example: Device1.40001{SL,:0,:4095,:0,:100}

If a scaled value of 60 was written to the device then the actual data written to the device will be:

...

Info
titleNote

It is possible to lose data precision due to data type conversion.

Square root Scaling

ItemName{SQ:LR:HR:LE:HE}
LowRaw, HighRaw, LowEGU, HighEGU in "{SQ:LR:HR:LE:HE}"

...

Example: Device1.40002{SQ,:0,:4095,:0,:100}

If device returns raw value 1000 the scaled value should be:

...

Example: Device1.40002{SQ,:0,:4095,:0,:100}

If a scaled value of 60 was written to the device then the actual data written to the device will be:

...

Info
titleNote

It is possible to lose data precision due to data type conversion.

Gain/Offset Scaling

ItemName{SG:Gain:Offset}
Gain, Offset in "{SG:Gain:Offset}"

...

Example: Device1.40003{SG,:2.5:1}

If the device returns raw value of 1000 the scaled value should be:

...

Example: Device1.40003{SG,:2.5:1}

If a scaled value of 60 was written to the device then the actual data written to the device will be:

...

Info
titleNote

It is possible to lose data precision due to data type conversion.

Inverse Scaling

ItemName{SI:Inverse} or {SI}
Inverse in "{SI:Inverse}" or “{SI}”

...