Hello all.
I'm useing a Simatic S7-313C-2 DP station, with an extra analog input module 8x AO's.
The situation:
I have 2 analog measurments that measure level of the gas in a gas tank. There are 2 ultrasonic level meters installed on the top of those 2 gas tanks, and in each gas tank is a ballon wich is inflated by the bio gas.
The problem:
When the outside temperature falls below 2°C the measurments start hoping all over the place... for instance the right level of the gas is 80% and then it falls to 30% back to 80%, to 45% and back to 80% <--- of the top of my head but it's a very similar patern. If tha outside temeperature is above 5°C the measurments are fine no deviation what so ever.
The whole automation process is based on these values beacouse there are certain limits to when the gas tank is being filled and when it starts to share it's gas with a gas generator wich makes electrical energy.
And when these fluctuations couse that sometimes the gas generator is left whitout gas and it stops. This must never happen.
The solution:
So I thought that I would calculate an average value of the measurment. Which wouldn't have those kind of fluctuations. But now what would be the best way to do this. With cyclic interupts(I'm allready useing it for PID regulation and is set to 50 ms), or is it possible to do it some other way...
I have also thought about that if the values falls below the limit it should be present at least 5seconds, before the valves start to open/close...
I hope I have explained it clearly...
Regards
Aleš
I'm useing a Simatic S7-313C-2 DP station, with an extra analog input module 8x AO's.
The situation:
I have 2 analog measurments that measure level of the gas in a gas tank. There are 2 ultrasonic level meters installed on the top of those 2 gas tanks, and in each gas tank is a ballon wich is inflated by the bio gas.
The problem:
When the outside temperature falls below 2°C the measurments start hoping all over the place... for instance the right level of the gas is 80% and then it falls to 30% back to 80%, to 45% and back to 80% <--- of the top of my head but it's a very similar patern. If tha outside temeperature is above 5°C the measurments are fine no deviation what so ever.
The whole automation process is based on these values beacouse there are certain limits to when the gas tank is being filled and when it starts to share it's gas with a gas generator wich makes electrical energy.
And when these fluctuations couse that sometimes the gas generator is left whitout gas and it stops. This must never happen.
The solution:
So I thought that I would calculate an average value of the measurment. Which wouldn't have those kind of fluctuations. But now what would be the best way to do this. With cyclic interupts(I'm allready useing it for PID regulation and is set to 50 ms), or is it possible to do it some other way...
I have also thought about that if the values falls below the limit it should be present at least 5seconds, before the valves start to open/close...
I hope I have explained it clearly...
Regards
Aleš