Industrielle styresystemer - Wiki
The Code is implemented in accordens to the requirments given in the function description. Quickly summerized it describes the following,
The Code for the Temperature sensor is based on its technical data, where 0v = 0ppm[NOT VERIFIED] which linearly scales to 10v = 4000ppm[NOT VERIFIED]. This means that linear interpolation is utilized to scale the input voltage too an output in ppm.
Linear interpolation is performed with the following function,
This means that the inputs needs to be,
And the outputs needs to be,
With the following internal variables,
The coded implementation looks like this,
Visually the function block looks as following,