symmetric positive-negative scaling in RSLogix

buhnen

Member
Join Date
May 2008
Location
Somewhereland
Posts
131
Hi again fellows,

I’m a bit confused about a matter regarding analogic input scaling in a RSLogix 5000 ladder routine. Hope you can help…
The analogic input gets sampling readings 4-20 mA covering a variable range -2000 to 2000 mV (this is the raw span my REDOX device can measure). I want to obtain finally those readings scaled from 0 to 10000.
What is blurring me is the minus sign: The operator will commonly enter setpoint values included among -230 and 380 mV through an HMI device (raw values).
Generally, when I work with a positive span of values I use the next formula for the scaling:
Scaled value = ( 10000* raw value) / highest value of raw span
And so far, so good.
But how to do when I get a symmetric -/+ span? I wonder whether I have to perform a bit more complex calculation or is there any other easiest way.
What is the common programming approach for this particular case?

Thanks in advance,
 
If its a 1756 Analog Input Module it will do the scaling to engineering units for you in the module, no need for any code.

Just go into the configuration for the channel and set your four scaling points and the input range
 
mmm...:-( nope, it is not a 1756. It is a 1769 IF8 so I can't define scaling span. For the rest of the analogic inputs I've been using in this project I've already choosen "Percent Range" which is giving the scaling between 0 to 10000
 
If its a 1756 Analog Input Module it will do the scaling to engineering units for you in the module, no need for any code.

Just go into the configuration for the channel and set your four scaling points and the input range
Setting up the module will allow you to enable each channel as well as selecting "engineering units" for each channel.
As Daba said, no code is required.
It can be done in the configuration window of the module.
 
Sorry fellows, I explained myself wrong:

Yes, of course, I get a 4-20 mA signal through the analogic input so I'll get it scaled once I set up correctly the parameters under the module configuration tab.

But still the reason why I need to know the relationship between the raw span and the scaled span is because the operator will enter in the HMI a setpoint value (in units of the raw variable, for this particular case, mV, as we are measuring REDOX-ph in a waste water process ). So I have to say to the PLC how to turn that entered setpoint into a scaled which can be used as a reference value for making calculations with it (for example, comparing such setpoint value with the current value read by the analogic input.)

Hope this time, I've explained right what is exactly my problem.
Thanks again.
 
Let me see if I understand correctly.
You have a field device that sends a 4-20ma signal to the PLC, the engineering units for the field device are -2000 to 2000 mV.
Your PLC input module is converting the 4-20mA signal to raw counts, with a range of 0-10000. In the PLC logic, you want to scale the raw counts back into Engineering units.

Assuming my understanding is correct, here is the formula you need:

((Raw Counts / Max Raw Counts) * (Eng. unit span)) + (eng. unit offset from zero)= eng. unit

Example1:

Field device is outputing 12mA, PLC raw counts is 5000

(5000/10000) * 4000 + (-2000) = eng. unit

0= eng. unit

Example2:

Field device is outputing 20mA, PLC raw counts is 10000

(10000/10000) * 4000 + (-2000) = eng. unit

2000= eng. unit

Example3:

Field device is outputing 4mA, PLC raw counts is 0

(0/10000) * 4000 + (-2000) = eng. unit

-2000= eng. unit
 
Last edited:
Sorry fellows, I explained myself wrong:

Yes, of course, I get a 4-20 mA signal through the analogic input so I'll get it scaled once I set up correctly the parameters under the module configuration tab.

But still the reason why I need to know the relationship between the raw span and the scaled span is because the operator will enter in the HMI a setpoint value (in units of the raw variable, for this particular case, mV, as we are measuring REDOX-ph in a waste water process ). So I have to say to the PLC how to turn that entered setpoint into a scaled which can be used as a reference value for making calculations with it (for example, comparing such setpoint value with the current value read by the analogic input.)

Hope this time, I've explained right what is exactly my problem.
Thanks again.

If you use the formula I posted, then all parameters will be in engineering units. You can then compare the setpoint in mV with the field input also in mV.
 

Similar Topics

Hi, I am connecting an Autonics make stepper driver type, MD5-ND14 to a Kinco PLC (K205 series) this has a sourcing output which cannot be...
Replies
2
Views
1,115
Hello I have got a problem with positive edge from "system clock memory byte" in Tia Portal. I would like to change byte"system clock memory"...
Replies
27
Views
3,601
Hey guys I have 2 numric inputs, from my PV, and I need to know the differens between them. I use a sub Eg 50-20 = 30 But if they input 20-50 =...
Replies
3
Views
1,118
Can anyone see why i am not getting an output on this? it is detecting a rising edge and saying that it is true but going any further to the...
Replies
5
Views
2,402
I have a CIP I am working on to acquire data about our oil consumption for our process, but also bearing oils. I wanted to make a flow totalizer...
Replies
3
Views
1,921
Back
Top Bottom