Scaling analog inputs with direct soft 32

CHAD

Member
Join Date
May 2002
Location
NORTH DAKOTA
Posts
1
I am familiar with RSLogix 500 and I have done multiple applications using analog. I have to do a project using Direct Soft 32. I am going to use an Automation Direct DL05 4-20ma input module to monitor water pressure from a 4-20ma 0-100psi pressure transducer. I want to scale the 4-20ma signal down to 0-100. This will be my pressure to be displayed on my OIT and I will also use it for some comparisons to start pumps. I have used an SCP function with RSlogix 500 before to do this but am unsure how to do it with my DL05 plc. Any input would be appreciated.
 
You are used to using the SCP, which does all the math behind the scenes. Using tags:

+------------------ SCP --+
----| Input: RAW |
| Input Min: RAW_MIN |
| Input Max: RAW_MAX |
| Scaled Min: SCALED_MIN |
| Scalde Max: SCALED_MAX |
| Output: SCALED |
+-------------------------+



<br>
<br>
The math behind it is:

(SCALED_MAX - SCALED_MIN)
SCALED = ( ------------------------- * (RAW - RAW_MIN) ) + SCALED_MIN
(RAW_MIN - RAW_MIN)



<br>
<br>
This formula can be used in any PLC. For the derivation, see www.plcs.net/dcforum/DCForumID1/2755.html

One important thing to note: the value of RAW_MIN and RAW_MAX have nothing to do with 4 and 20 mA, but the counts that the analog input module gives at those (or any other calibrated pair of) points. In your case, 0 and 4095, I believe. With RAW_MIN and SCALED_MIN both at zero, RAW_MAX at 4095 and SCALED_MAX at 100 (PSI), the equation reduces nicely to

SCALED = RAW / 40.95



<br><br>
 
If I can add a couple of things to Allen's reply. 1) There is a typo in the formula:
Code:
.        (SCALED_MAX - SCALED_MIN)
SCALED= ------------------------- x (RAW - RAW_MIN) ) + SCALED_MIN
.          (RAW_MAX - RAW_MIN)

2) You can get one decimal point of resolution if you wish by using an implied decimal point, and having your scaled value 0-1000, which represents 0-100.0 On your OIT you can scale or insert the decimal point as required, depending on the model and brand.

3) On the DL-05 the 4-20 mA input is automatically scaled 0-4095, so you don't have to worry about the offset in raw data. Also, the transmitter has no offset, so you can write the math as:

Code:
Comment: Assumes the raw data is in V2000
.        Assumes 0-4095 for 4-20 mA
.        Assumes engineering units 0-1000 f0r
.        0-100.0 psig stored in V3000
|
| Always_On
|   SP0
|---| |----------------+--|LD
|                      |  |V2000
|                      |
|                      +--|MUL
|                      |  |K1000
|                      |
|                      +--|DIV
|                      |  |K4095
|                      |
|                      +--|OUT
|                         |V3000

If the raw data is 2048, then the engineering units are 500, representing 50.0 psig
 
Well Tom
i would just like to correct the formula a bit

scaled= [[(scaledmax-scaled min)/(raw max-raw min)]*[raw max-raw min]]+
scaled min+ offset or constant

the constant should be calculated and it should be same for every specified interval of time.
 
Tom Jenkins said:
And exactly what does time have to do with the conversion?

hi Tom the time here i mean to say is first time with min counts and second time with max counts.that 2 times with min and max will give a same number that is called as constant and it has to be same for both valves or both times.
 

Similar Topics

I know this has been covered before, but I can't get this scaling to work in Logix Designer/CompactLogix 1769-L33ER project. I tried to: -...
Replies
4
Views
3,566
hi i am pretty good at programming ab plc . i have never had any experience with analog controls . i currently need to set up a slc 5/02...
Replies
15
Views
26,008
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
Back
Top Bottom