Create a function that scales, for example, an analog input
value (counts) to measured value. Mao. the function can, for
example, have 5 inputs and 1 output. The 5 inputs are then:
In_value, Inn_Min, Inn_Max, Ut_Min and Ut_Max. The function value
is then a scaled value.
Example: If the input value is from an analog input (counts) which
should correspond to a temperature between -20 and + 300 degrees
then Inn_Min = 0, Inn_Max = 32767 (WAGO analog in), Ut_Min = -20
and Ut_Max = 300. Test the function and reflect on why we can
realize this as a function and not have to create a function
block.
use e!CockPIT
Create a function that scales, for example, an analog input value (counts) to measured value. Mao. the function can, for
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am