Scale and Offset Processor¶
The “Scale and Offset Processor” is installed with the Dataristix Application. The processor scales and/or offsets values as configured, retaining the data types and qualities of the input values. If the input value is a one-dimensional array, the scale and offset are applied to each element individually.
For integer-typed values (Byte, Int16, Int32, Int64 and their unsigned equivalents), the scaled and offset result is rounded to the nearest whole number and clamped to the valid range of the value’s data type when the calculation would otherwise overflow - for example, a “Byte” value of 200 with a “Scale” of 2 produces 255 (“Byte”’s maximum), not 400. The output quality is unaffected by clamping, and no error is logged. A target data type wide enough for the scaled result, or a Type Converter Processor inserted beforehand, avoids this clipping.
For floating point values (“Single”, “Double”, “Decimal”) the scaled and offset result is not rounded or clamped. Boolean, string, and date/time values are passed through unmodified - scale and offset are not applied to these types.
Add to Task¶
Add the “Scale and Offset Processor” to a task by dragging it from the “Build” panel onto the task’s “Task Builder” panel.
Configuration¶
Select the “Scale and Offset Processor” item in the “Task Builder” panel to view its properties.
You can change the following properties:
- Name
- The title of the “Scale and Offset Processor” as it appears within the task builder.
- Scale
- The value that incoming tag values are multiplied by before being passed on to the output stage.
- Offset
- The value that is added to the scaled tag value before being passed on to the output stage.
Press the “Apply” button to commit your changes.
Example¶
The following example shows a task that transfers data from OPC UA to an ODBC database. Tag values will be multiplied with 0.001 before storing the data into the database.