One of our OptoPals asked this question re: under/overrange. The main thing that popped in my brain to watch out for is qnans, as I mentioned in the “SANITY CHECKING” of this post on totalizing.
Anyway, here’s his whole question and his approach to solving it. Any/all ideas and comments appreciated, as always!
To monitor if an analog input is within an acceptable range we do one of the following:
- Bring in raw 4-20ma signal into the controller, measure if we are within acceptable range (ie. Bad if below 2ma and Bad if above 22ma) then scale the input into Engineering Units within the control system. Not a big fan of this approach since it eliminates scaling at the IO level.
- Bring in the scaled Analog Input and setup the allowable range that indicates the input is good / bad. (ie. 4-20ma is 0-100% so we would indicate Bad if our input is below –12.5% (2ma) and Bad if our input is greater than 112.5% (22ma))
Of course if the input is bad or module pulled, we see the large negative number which also tells us that the input is bad.
In the above cases, we need our logic to react to bad inputs to prevent process issues and/or provide an alarm that we have a bad input.
The problem with this approach is that we need to adjust our range for each input and in the case of a 4-20ma input the module doesn’t indicate a bad signal at 0ma (bad for a 4-20ma input) since the input module is setup for +/-20ma. This becomes a bigger issue when input ranges change (after installation) which requires additional logic modifications that always seems forgotten when our customers do it themselves. With thermocouples, RTD, etc. we will still need to setup a range monitor since a “good” input signal may actually be bad but once setup these ranges should never change.
Is there another way to “easily” monitor that the input is within acceptable range? Primarily for 4-20ma or 1-5v inputs.
Is there a way to setup the allowable range of individual inputs on the initial start of the system so we see the bad quality (large negative number) when we go outside the preconfigured range?
I thought about memory mapping and getting the actual counts but this seems like more work than doing what I’m currently doing.
…this may be a stupid question (either I’m missing something or I’m already doing it the correct way). I’ve been doing input monitoring as I noted above for a long time (and it works) but that doesn’t mean is the best way to do it.
Any insight or ideas would be appreciated.