7/8/2012 1:59 PM | |
Joined: 9/27/2006 Last visit: 8/23/2024 Posts: 12279 Rating:
|
Hello maher; If you are dealing with a non-linear signal, and you cannot use a linear section of the curve for your purposes, then you must use some form of linearization, or using a look-up table (for very non-linear curves). Linearization means approximating the curve as small sections of connected lines, for which you calculate the slope, which you then use to find the value of the point you want to evaluate. Siemens offers a solution (not free,but the principle is explained so you can use it as a template for your own program if need be): What should you watch out for when using a resistance thermometer that is not in compliance with DIN standards? With enough information from the sensor datasheet, you could use the technic=que described in this post from the Web to do your calculations: Non Linear Sensor, how do I make a conversion? The lookup table technique requires more work, but it is simpler: you have to create a table representing the (x,y) value for all points in the curve (you must determine the intervals acceptable to you) and use a loop compare instruction to locate the nearest x point, using then the linked y value as your scaled input. Hope this helps, Daniel Chartier |
Last edited by: dchartier at: 7/8/2012 4:03 PMCorrected the URL links |
|
This contribution was helpful to
4 thankful Users |
7/8/2012 3:59 PM | |
Joined: 10/7/2005 Last visit: 8/22/2024 Posts: 3017 Rating:
|
Hello mmaher you do know how to do a search, don't you? P.S: Your chances of receiving answers greatly increase when you extend a bit of courtesy to the users who spend their free time to help you. Something like "Hello dchartier, thank youfor the detailed reply, but the links are unfortunately not working, could you please check..." can work magic, I suggest yougive it a try for your replies here. |
Cheers |
|
This contribution was helpful to
3 thankful Users |
7/9/2012 8:49 AM | |
Posts: 137 Rating:
|
At the first of all, thank you Mr. fritz for your advice and i am so sorry for the previous replying because i have spent a lot of times to find out the answer a round this subject but i've failed so i was disappointed. |
7/9/2012 1:31 PM | |
Joined: 1/28/2009 Last visit: 8/5/2024 Posts: 6844 Rating:
|
Hello , Modular PID Control is a product and should be purchased separately.See section 2.1.16 of this manual for more information on NONLIN function block. http://support.automation.siemens.com/WW/view/en/1137082 Best regards Hamid Hosseini |
Last edited by: hdhosseini at: 7/9/2012 1:39 PM |
|
This contribution was helpful to
1 thankful Users |
7/9/2012 3:51 PM | |
Joined: 10/7/2005 Last visit: 8/22/2024 Posts: 3017 Rating:
|
and yet another solution: Do a search on the subject as suggested before and you come across free of charge blocks from Siemens as below: interpolating measured values with polygon and output of function values |
Cheers |
|
Follow us on