Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: DRMartin on June 18, 2019, 11:14:28 AM
-
I am trying to upgrade a design I have for a wastewater dosing system. I was using pH/Conductivity/Turbidity sensors with an external transmitter. The output of the transmitter is 4-20mA. All the calibration was done at the transmitter and the BRX would just scale 4-20mA to 0-14pH (for example). I would like to get rid of the external transmitter and use sensors with built in transmitter. The challenge is the sensors with the built in transmitter do not have provisions for calibration. The output signals are linear, however, the calibration slope changes as the units age. Once the slope reaches a certain value, the sensor needs replaces. This goes for the offset as well.
So what I am wanting to do is setup an HMI screen where I can enter calibration values and calculate slope and offset, save, repeat every 3 months. For example, on pH I use calibration standards of 4 and 10.
Immerse the pH probe in the 4 solution.
Display XX.XXXmA
Wait for stabilization
"Enter"
Immerse the pH probe in the 10 solution
Display XX.XXXmA
Wait for stabilization
"Enter"
BRX to calculate new slope and offset. Compare these values with "dead" criteria and alert user if replacement needed.
Otherwise use these new calibrations to scale the WX0 input to display proper pH reading.
This final reading is then used as PV for a PI+Time proportioning output.
So I am wondering what is better, crunch all this with math instructions or can I use LERP? or SLOPE commands to get this done more elegantly.
Darrin
-
I always just used Y-MX+B for PH probes which is what SLOPE uses.