Analog scaling equation for error and calibration

fuffet

Member
Join Date
Jan 2015
Location
Australia
Posts
4
Hi, I have been performing some scaling recently and had trouble finding the equations to perform the tasks I needed.

I found these on another forum:

Typical scaling formulas:
For analog inputs:
Eng_Out = (Raw_In-Min_Raw)*((Max_Eng-Min_Eng)/(Max_Raw-Min_Raw))+Eng_Min

For analog outputs:
Raw_Out = (Eng_In-Min_Eng)*((Max_Raw-Min_Raw)/(Max_Eng-Min_Eng))+Min_Raw


Subsequently I managed to transpose this equation so that I could perform a calibration function for low level (i.e. scaled output should be 0) in the PLC when it is not 0. The output from the equation (Error) needs to be added to the Raw Minimum that is used in the scale instruction. The upper value (100%) should be calibrated first with a move analog input to Max Raw instruction.

I am pretty sure I would have used too many parentheses...I am always extra careful with my equations.

(Error) x = ((((ScaledMax-ScaledMin)/-ScaledMin)*Actual Raw) - (((ScaledMax-ScaledMin)/-ScaledMin)*Min Raw) - Max Raw + Min Raw)/(ScaledMax/-ScaledMin)


The equation below may be easier to use if the scaled max 100 and scaled min -25 are fixed and will never be changed, it is the one I am using for tank level. It obviously uses less instructions/data file.

(Error) x = (5*Actual Raw - 5*Min Raw - Max Raw + Min Raw)/4

Hope this could be useful for someone.
 
I have always found it helpful to use excel and actual values to come up with the formula. It is easy then to replace the values with the variables. This way I always know that the formula is correct.
Just a thought,
Garry
http://www.accautomation.ca
 
Thanks Garry,

Yeah I did the same with Excel but as I am the only electrician on site that has any PLC experience I wanted the calibration to be simple for the other electricians through a panelview (30 electricians on site overseas none with PLC training...yet). The level transducers have been swapped and replaced many times, fortunately I have been here for most.
 
should you not be calibrating your level transducers instead?
 
What PLC are you using?

The divide operand is a "|" bar for AB's PLC5, SLC500 and Micrologix series of controllers.
 
Micro 1400, yeah needs to be a "|"...took me a search to find that out.

Can't calibrate the level sensors - some are fixed pressure sensors and the others are Rosemount ultrasonics and we don't have the gear to modify them here. I am using about an eighth of the ultrasonics 4-20mA resolution which sucks but they seem to work ok.
 
Last edited:
I have done logic that actually is used for correcting Thermocouple (TC) readings.
It has the ability to compensate for system calibration error (Low, Mid, High) and TC certification break points (10) for TC error at each break point.
The calibration and cert error is actually linearized between break points. So....if the correction at 1000F is +1 degree and 1500F is +2 degree, at 1250F +1.5 is added to the TC reading.
A lot of Array work....
 

Similar Topics

Hello, We monitor the temperature of a pipe via a 4-20mA temperature transducer. This goes into DB135(Read Analog Inputs). The issue I have is the...
Replies
0
Views
615
Hi all! I have a question about RSLOGIX and Analog input/output scaling So we have an existing controller with an IF8I and OF81 card. My...
Replies
3
Views
913
I’m trying to perfect the HMI interface for analog configuration. I’ve provided the user the same options for all analog inputs, as follows...
Replies
10
Views
1,643
Hi I have a modicon 984 with proworx 32 that is scaling an analog input, and I need to adjust the scaling. I have new analog input values and %...
Replies
3
Views
1,706
Hi, i've write this AOI to send a ControlValue comes from pid and control a valve. this valve is controlled through analog output. the rang of...
Replies
0
Views
1,008
Back
Top Bottom