buhnen
Member
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,
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,