Scaling

DaveyT

Member
Join Date
Aug 2002
Location
44.94 deg N, 93.63 deg W
Posts
8
I have been working with a programmer for a while, and the problems is with RSView32 works (my lack of understanding is the actual problem). Tags have been scaled with an expression for displaying values inputted from a control card. We have rectifiers for plating that have a control card that send back 0-10VDC analog signals. Our programmer has set up some expressions that he says are in the y=mx+b format, and I am having a hard time understanding.

When I re-calibrate the rectifier cards, the scaling is off and the actual amps sent back for display are off, so I have to change the expression to match the actual amps displayed. I want to do this myself, since the outsoure person showed me how to access RSView32Works.

Is there a universal scaling formula(s) out there? I am not sure of the bit count of the AB anolog module, but I assume it is 14 bit. I suppose scaling is different for each manufacturer...
 
I try to scale everything I display on an OI in the PLC. It just makes it easier to change. I have some displays that must be re-scaled when calibrated. It's easy to put the scaling factors in the OI, too. That way you can scale the OI display through the OI.
 
Keep the HMI SCADA logic simple and use one-to-one scaling. Do all of your scaling in you ladder program. The SCADA should display the final engineering units that you are actually using in your program. This makes debug & troubleshooting much easier.

There are a number of simple techniques depending on what your machine, transducer, process etc, are capable. If you have the ability to put the transducer at two distinct known values (the farther apart the better) and the raw input data for these values, you can write some simple logic to calculate the slope and y-intercept, and then apply these scaling values to your raw data to determine your final scaled engineering values. We typically provide a 'calibrate' pushbutton with some type of 'confirm statement to trigger the initial calculation. Your HMI will require displays for raw counts, actual engineering units, and screen entries for raw counts at low and high readings, and screen entries for actual engineering units at those readings, plus a calibrate button.

An easier method of scaling if you have the ability to put the transducer in a zero state AND at some know value is to note the raw data value from the transducer while at a 'zero' state and enter this value as an offset (simple integer math). Next, put the transducer at a known value and adjust your scalar (typically a floating point value) until the displayed value = actual known value.

Your HMI will require displays for raw counts and actual engineering units, and screen entries for offset and scalar.

I like to use the second method for hydraulic pressure transducers. Typically the zero state can be determined by mechanically disconnecting the transducer from the system so it is reading zero psi (gauge). From this the correct offset value can be determined.

Next, I replace the transducer and pressurize the system to some known pressure (determined from a calibrated gauge) and I adjust my scalar until my displayed engineering units agrees with the gauge.

My experience with pressure transducers is that over time, they typically exhibit a slight shift in the offset value (the slope of the line doesn't change, but moves sideways). This makes it simple to periodically spot check and recalibrate by just checking and adjusting the zero offset.
 
BTW, some people might wonder why I would prefer to perform my own scaling in ladder logic (roll-yer-own scaling?) as opposed to using some built-in function block do the work for me.

#1 Not all PLC's have scaling functions. Most however, do have enough basic math functions and support the data types required to perform the simple algerbra for scaling.

#2 Some of these functions are very restrictive in how they work, and it may not be convenient for me (or the machine) to put the transducer thru its paces that might be required to obtain the correct values to enter into the function. When I write my own, I can take into account how the machine works and devise a calibration scheme to suit each transducer.

#3 The biggy...In some cases 'roll-yer-own' code is much more efficient and executes much quicker than a canned scaling function block. This is important if I have a lot of transducers, and I am using a timed interupt file to perform high speed scaling and decision making i.e. programmable pressure switches using several pressure transducers located on a hydraulic press. The stripped down code for pressure transducers becomes:
Actual Value = (Raw Data - Offset) * Scalar. Pretty simple.
 
BTW Davey,

y = mx + b is the formula for getting from here to there in the shortest distance... it's the formula for a LINE.
 
This should work for any linear scaling application.

Scaled value = (input value x rate) + offset
(look familiar?... Y = mx + b)

Rate = (scaled max. - scaled min.) / (input max. - input min.)
Offset = scaled minimum - (input minimum x rate)
 

Similar Topics

Hi all. I'm working on a rehab and I'm trying to figure stuff out. See screenshot at the bottom. Local:5:I.Data[6] in BTD instruction is a...
Replies
6
Views
672
Hello all, First post here. Hitting a wall with finding info on this topic online, and none of my coworkers have a clue. I have a PanelView...
Replies
10
Views
1,291
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
5069 IF8 with a 4-20ma 0-100psi, sealed fixed, no calibration, transducer attached. IF8 is scaled 4ma= 0 psi, 20ma=100psi. If over time the...
Replies
12
Views
2,485
I have 1769-IF4 module and 1766 micrologix 1400 series B controller, when connecting Analogue input in module it's showing maximum values of...
Replies
4
Views
1,629
Back
Top Bottom