Files posted by Bryll
I sometimes need to scale an analog value, so I had to do a function to better suit my needs than Siemes "Scale" function.
It has 5 inputs, all in integer format.
_In - The value to be scaled
_In_Min - Lowest value of the "_In" signal.
_In_Max - Highest value of the "_In" signal.
_Out_Min - Lowest allowed value of the scaled output.
_Out_Max - Highest allowed value of the scaled output.
The output "_Out" is the calculated value in integer format.
It's saved as a global library.
TIA Portal V13 SP1 Upd. 4
A simple Function Block used to scale and unscale values.
Input is in Integer format.
Output is in Real format and also in Integer Format.
Min and Max input values specifies the range of the input signal.
Min and Max output values specifies the range of the output signal.
We have a 0-10V input module with a 0-6V sensor connected to it for pressure measurement.
The sensors pressure range is -1,2 to 4,5 Bar.
The Analog raw value is 0 to 16000.
The settings should then be:
"MinLimit_In" = 0
"MaxLimit_In" = 9600 (60% of max input)
"MinLimit_In" = -12 (Assuming we shall use Integer output and use one decimal)
"MaxLimit_Out" = 45 (Assuming we .........).