I'm strugling with developing an easy method to determine the volume of a product delivered to various tanks. I don't have a meter, but the tanks are fed (one at a time) from a fixed-displacement pump running at 16860 litres / hour (4.6833 litres / second). The logic is simple - XIC if the inlet valve to a particular tank is open and MUL 4.6833 by the number of seconds the valve has been opened. My problem is that the SLC 5/05 processor I'm using doesn't keep time very well. The RTC is great, but setting up a timer that starts once the valve opens tends to throw the calculation way off within an hour (or less).
I would appreciate your feedback because I don't want to invest a bunch of time into this if there's an easy solution I'm overlooking. Here is my preliminary plan on how to proceed:
Save the value S:40, S:421 & S:42 into N registers when the valve opens, subtract these values from the current values of S:40, S:41 & S:42 and convert to seconds to come up with a multiplier.
Of course, this can lead to troubles, especially if the timer rolls over @ midnight.
The ultimate objective is to calculate a virtual level for all four tanks by comparing what was delivered to them to what was drawn from them.
Thanks for your help.
I would appreciate your feedback because I don't want to invest a bunch of time into this if there's an easy solution I'm overlooking. Here is my preliminary plan on how to proceed:
Save the value S:40, S:421 & S:42 into N registers when the valve opens, subtract these values from the current values of S:40, S:41 & S:42 and convert to seconds to come up with a multiplier.
Of course, this can lead to troubles, especially if the timer rolls over @ midnight.
The ultimate objective is to calculate a virtual level for all four tanks by comparing what was delivered to them to what was drawn from them.
Thanks for your help.