Non linear Tank volume

irshad
2023-04-24
2023-04-30
  • irshad - 2023-04-24

    Hello,

    Can you please help me to have volume of Non linear tank from 4-20mA ?

    Is there any tabular options in ladder logic>?

     
  • dkugler - 2023-04-28

    I think you will have to build this function by your self. I would try to use the FB LIN_TRAFO from the Util lib.
    Create a 2D array (table with 2 column) with sensor values and depending volume values.
    Set the min values of the input and output of the lin_trafo fb with the values from the array index next below the actual sensor value.
    Set the max input/output values of the lin_trafo fb to the values from the array index next above the actual sensor value.
    So your tank will be divided into several linear volume parts. Good luck!

     
  • fajean - 2023-04-30

    If the relationship between level and volume is amenable to it, one thing you can do is to use software that can perform a regression to get a a formula that approximates volume as a function of the level (Excel graphs can do that). Then, instead of a lookup table, you just perform a direct calculation. It makes for more concise code.

    Obviously, you need a different formula for each tank geometry, but the same is true with lookup tables (or at least their content).

     

Log in to post a comment.