Non-linear Analog Input Scaling

joshC

Member
Join Date
Mar 2012
Location
Melbourne
Posts
4
Hi, I'm working on the RSLogix5000 and come across a case where I need to break a range of inputs into different ranges as they seem to be non-linear. Here are some detail:

- Measuring tank level off a level transmitter 4-20mA to 0-10,000Ltrs.
- Initially I assumed it's linear and I was using a AOI to compute the raw input and scale it accordingly.
- Later work out the tank is in irregular shape and gives non-linear in different section of tank.
- Planning to break the range into 10 sections of 1000Ltr and scale them according to a 'wet calibration' result.

My questions are:
- Does RSlogix 5000 has a function to achieve this easily? Like plotting a XY-table?
- I've heard about using a 'FGEN' Function Block, but I think i have a license limitation to use this.
- Can anyone provide more information about these if you ever come across?

Thanks Heaps.
 
You could try either CPT on each section and "compile" the results or FGEN if running RSLogix Full or Professional editions.
 
-I've used a homebrewed multipoint interpolator in the past. Basically in this case you need ten separate scale equations and a different one is used based on the analog in value.
-FB programming requires the "Pro" license. (another RS p@#s-off)
 
One compute block will not work.

If there are irregular sections then there will need to be a compute block for each section. I would ask the designers for the equation for volume vs level for each section. This should provide the most accurate option. How, accurate must this be? Linear interpolation is a simple method but not as accurate. Cubic interpolation is also possible if extra accuracy is required.
 
FGen is the fastest to implement
Or Get someone to write an AOI to expose the values or write your own AOI from the formula's in the help file
Another method is to use a CAM table and then use MCCP, X axis is analog in and Y axis is volume

I have done all three
 
Last edited:
some non linear tank shapes are actually ISO defined shapes and in some cases the level indicator can be set to read directly the particular shape.

I have seen this several times.

If you can get the transmitter to do the scale for you, then you are back to scaling the 4-20 in in engineering units and you could use a linear scale for that.
 
Perhaps a multi-degree polynomial is the answer.
To figure out the factors, get the raw data, and put it in an Excel spreadsheet.
Then, open up a plot (graph).
Excel will allow you to 'smooth' the curve right on the graph, and you might just get lucky enough to find an equasion that fits.
Then, use a CPT to write the polynomial.
I'm pretty sure Excel goes up to 6 degrees.
 
Thanks for the suggestions guys. (y)

FGEN is out of the story because of license limitation.
I'll have to try to DIY the AOI which I was initially planning to do, but trying to look for more option.

Mike, would you mind to explain more in the CAM table method that you've mentioned? (Excuse me for my ignorance)

FYI, the 'irregular shapes' actually comes from a result of poor welding, but funny enough that the accuracy somehow does matter o_O
 
Use 10 points on the level, however make the variable as the output is more imortant. So make a reading at 1000 liter, 2000, 3000 etc.
you have 10 readings for this.
now ask if reading is within point 1 and point 2 if not skip to point 2 and 3, if yes do an linear interpolation and you will have your volume.
 
Use 10 points on the level, however make the variable as the output is more imortant. So make a reading at 1000 liter, 2000, 3000 etc.
you have 10 readings for this.
now ask if reading is within point 1 and point 2 if not skip to point 2 and 3, if yes do an linear interpolation and you will have your volume.
Thanks, this is exactly what I'm doing for the job now as the function block is not an option.
 

Similar Topics

Hi, i have a pressure sensor (range 0-10 bar) and its output is 0-20 ma. but the current vs pressure curve is non linear such as. pressure...
Replies
3
Views
2,050
I am in need of creating a Non-linear analog output based on a linear (0-100%) input signal. I have an old version of programming software (A/B...
Replies
7
Views
4,157
Greetings! I have a assignment where i have to solve a non-linear level measurement with the use of trend line. I have a tank table showing...
Replies
24
Views
6,600
Hi All, Has anyone any experience in controlling a non linear valve with a PID? Traditionally this valve is controlled on flow but would like to...
Replies
36
Views
11,019
Hi guys and gals I have a severely non linear system that i am trying to develop a controller for. The non linear curve can be broken down...
Replies
8
Views
2,689
Back
Top Bottom