Software Tools

Problem

Customer wants a more precise definition of what is mean in the TelePACE manual when it describes the flow output of the totalizer getting large.

Customer has 60 Wells and each well has a totalizer that is continuosly running and totalizing flow.
He does not want to have to reset theses totalizers but has found that they stop calculating when the output gets up into the range of 170,000.

The Manual contains the following quote:

The accumulated value is a floating-point number. All floating-point numbers are approximations. If the accumulated value grows large, then low rate inputs will have little or no effect on the accumulated value and the accumulated value will not be accurate.

I Told the customer that I would try and define in a bit more detail what is meant by "Large"

Environment

TelePACE, ISaGRAF, Totalizer, Floating Point Math, SCADAPack

Fix

The problem you are encountering is being caused by the granularity of single precision floating point numbers.
This means that as Floating point numbers get larger, the spaces between the numbers get larger as well.

If we look at the number 170000.00, the next largest floating point number is 170000.01

This leads to errors being present in Floating Point math.

170000.00 + 0.04 = 170000.00

When applied to a totalizer, the above math means that when the gaps between the floating point numbers representing the output of the totalizer gets larger than the incremental amount being added to the total, the totalizer stops working.

There are two things you can do to get around this problem. This first is to increase the period of totalization. By totalizing every 10 seconds instead of every 1 second, you should be able to have the totalizer increment up to a much higher value without stopping. The problem with this however is that you are only delaying the inevitable.

A better solution is reset the totalizer regularly and keep a separate total.

If the totalizer gets reset every time it gets larger than 100,000 you could easily keep track of the running total with the following formula.

Total = Current Totalizer output + (Number of time Totalizer has rolled over X 100,000)