OK who's the expert!! if I have a 4-20ma input based on a device that is sending feedback based on 0 to a 100% open how would I set this up in RSlogix 500...
The same deal with Analog out...
Thanks in advance,
You MOV from the analog in register to a SCP (scale with parameters) block with the count for 4 ma and 20 ma as input parms and 0 and 100 as output parameters. And it's pretty much the inverse for the analog out.
The function block you need is SCP (Scale with Parameters). This can be found in the Advanced Math tab of the instruction palette.
Assuming your analogue module is the first expansion module, you need to use the following settings:
Input: I:1.0 (for the first analogue input)
Input Min: 6240
Input Max: 31200
Scaled Min: 0
Scaled Max: 100
Output: N7:0 (or whatever integer you want to use)
To scale a 0-100% value back to the 4-20mA output, you need to do the exact reverse, e.g.:
Input Min: 0
Input Max: 100
Scaled Min: 6240
Scaled Max: 31200
(Before doing that instruction you should do a check to make sure your input is in a valid range (i.e. between 0 and 100).
Hope that helps.
Depending on what SLC 500 series you have, you may use direct SCP instruction to scale your 4-20mA to 0-100%. However, if the SLC can't directly perform the SCP, you may use the SCL instruction, where:
Equations used in calculating a linear relationship:
Scaled value = (input value x rate) + offset
Rate = (scaled max. - scaled min.) / (input max. - input min.)
Offset = scaled minimum - (input minimum x rate)
I hope this can help.
Analog inputs convert current and voltage signals into 16 bit twos complement binary values.
For 4mA to 20mA Current signal range the equivalent representation of this range in decimal by input module will be 3277 to 16384 (referenced from Allen Bradley Analog Module)
Now in SCP instruction,
input: I3:0/0 (address of this sensor)
Input min: 3277
Input max: 16384
Scale min: 0 (as you sensor represents 0to 100%)
Scale max: 100
output: N7:0 (internal file which can be used further
for math and compare ins)
I hope u got it.