Hey guys, I've got a pH/conductivity transmitter and a 1762-IF4 A/D for my micrologix 1200. I'm using an SCP command with implied decimal places to turn the value into a scale for 0 to 1400 for pH (corresponding to 0.00 to 14.00 pH) and the conductivity is scaled for 0 to 100 for mS/cm (corresponding to 0.0 to 10.0 mS/cm ).
Now, to calibrate these two, it comes down to basically displaying the current sensor value on the screen and changing the offset or trimmer pots to set the sensor to the buffer solution currently being measured.
So I've got a couple questions, firstly can I have the SCP command run every loop through? I know that I've set the card to update without filtering for 130mS update so it probably won't be having a new value every loop but Im just concerned if weather the SCP command will take up significant processing time? I'm guessing not..
Now as for actually taking measurements, I'd imagine I'm going to want to take some averaged measurements over time.. So this brings up the question of whether there is a way to see if the measurement has updated....Here is an example, lets say I have measurement values of 5,3,6,2. Now the actual average of these should be (5+3+6+2)/4 = 4. However, if I just simply added it up every cycle I could end up with (5+5+3+3+6+6+2)/7=4.28 which would not be correct... So I'm wondering if there is a way to only update the average with new measurements?
Thanks!
Now, to calibrate these two, it comes down to basically displaying the current sensor value on the screen and changing the offset or trimmer pots to set the sensor to the buffer solution currently being measured.
So I've got a couple questions, firstly can I have the SCP command run every loop through? I know that I've set the card to update without filtering for 130mS update so it probably won't be having a new value every loop but Im just concerned if weather the SCP command will take up significant processing time? I'm guessing not..
Now as for actually taking measurements, I'd imagine I'm going to want to take some averaged measurements over time.. So this brings up the question of whether there is a way to see if the measurement has updated....Here is an example, lets say I have measurement values of 5,3,6,2. Now the actual average of these should be (5+3+6+2)/4 = 4. However, if I just simply added it up every cycle I could end up with (5+5+3+3+6+6+2)/7=4.28 which would not be correct... So I'm wondering if there is a way to only update the average with new measurements?
Thanks!