I/O Transformation with Linear Shift Defined by Two Points
Full Name
Lib.Mervis.v1_0.LinearWithShiftByTwoPoints
Required Project References
- Lib.Mervis
Implemented Directions
| Direction from User's Perspective | Direction from ITransform's Perspective | Input Data Type | Output Data Type |
| IO → ST | Forward | dint | real |
| ST → IO | Reverse | real | dint |
Parameters
Transformation parameters are always specified in the IO → ST direction!!!
| Name | Data Type | Retain | Meaning | |
| Shift | usint | No | Determines how many bits to shift the input variable to the right | |
| X1 | real | No | First point of the line | |
| X2 | real | No | Second point of the line | |
| Y1 | real | No | First point of the line | |
| Y2 | real | No | Second point of the line | |
| Min | real | No | Minimum possible output value | |
| Max | real | No | Maximum possible output value |
Parameters are applied in the following order (in the case of reverse transformation, everything happens in reverse):
- Clipping the input value to the range Min..Max
- Bit shift to the right
- Applying the linear transformation