Article translated with the assistance of AI tools. Images and parts of the content will still be reviewed.
In this tutorial, you will understand how the LIN_TRAFO Function Block works.
1. DEVELOPMENT
First, it is necessary to add the Útil library, as this is where the block is stored. Click on Library Manager >> Add library >> Application >> Common, scroll down the list until you see the word Útil, select it and click OK, or double-click it.
Add an empty Block in the desired row, and in the question mark, type LIN_TRAFO
Parameterize the block by clicking OK in the next window that appears.
This Function Block transforms a REAL value located in an interval defined by an upper and lower value, into a REAL value located in another interval, also defined by an upper and lower limit. The equation below is the basis of the conversion:
(IN - IN_MIN) : (IN_MAX - IN) = (OUT - OUT_MIN) : (OUT_MAX - OUT)
INPUT VARIABLES:
OUTPUT VARIABLES:
2. CONCLUSION
This is a converter block where you enter the maximum value (IN_MAX) and the minimum value (IN_MIN) that the input can take, and in OUT_MAX and OUT_MIN you must enter the maximum and minimum value that you want your output to take.
3. APPLICATION EXAMPLE
A temperature sensor provides values in Volts (IN input). These must be converted to temperature values in degrees Celsius (OUT output). The input value range (Volts) is defined by the limits IN_MIN = 0 and IN_MAX = 10. The output value range (°C) is defined by the limits OUT_MIN = -20 and OUT_MAX = 40.
Thus, an input of 5 V would result in a temperature of 10 °C.
4. VIDEO
Comments
0 comments
Please sign in to leave a comment.