Totalizing with dataTaker DT8x Data Loggers

Utilizing dataTaker Intelligent Universal Input Dataloggers

CHESTERLAND OH—November 30, 2011

Systems integrators often receive requests for help with datalogging applications that require totalizing to get volume, event counts or the total energy produced or consumed. Using the internal channel variables and calculation capabilities of the dataTaker DT8x series of intelligent dataloggers, it is quite easy to capture cumulative totals as well as to total over a particular period of time such as a day, week or month. There are 2 types of signals that can be totalized: analog signals like a 4-20mA current loop from a device like a flow meter, and digital signals from a switch or pulse output meter. The technique to totalize each is slightly different.

When totalizing analog signals, a very common application involves reading a flow meter which provides a 4-20 mA output to display the instantaneous flow rate and then integrating this flow rate to get volume. dataTaker data loggers provide 2 built-in functions to automatically integrate measured values. The IB Data Manipulation function provides a simple 2 point integration by taking the average value calculated from the current sample and the previous sample and dividing by the time difference between the 2 samples. The INT Statistical function will sample the input at a rate determined by the statistical schedule and perform an integration using a trapezoidal approximation.

The main difference between these 2 techniques is how often the input is sampled to perform the integration. The IB function will only sample based on the main schedule rate, whereas the INT function samples at the statistical schedule rate. For example, if the main schedule was set for a 1-minute sample interval and the statistical schedule was set for a 10 second interval, the IB function would sample the input once every minute and integrate using just these 2 points while the INT function would sample every 10 seconds and return the sum of these 6 smaller integrations. While the INT function requires more resources and may not be appropriate for an application that requires low power, the advantage is obvious–it provides much better accuracy for situations where the flow could change rapidly–for example in a process machine that may be switching the flow on and off during different parts of the process cycle.

In either case, the function only provides the total over the sample interval, so it is necessary to use an internal variable to accumulate the total over a longer period of time. Using the += function provides a convenient way to do this. Simply pick a CV to use for the total, select the Assign to channel variable and then CV = CV + value, and you will now have a variable that contains the total value.
It’s also important to keep in mind the scaling with respect to these functions. Both functions work in units of seconds, so it may be necessary to adjust the scaling to get the returned value in the desired units. For example, if the desired units for the flow rate are in gallons per minute (GPM), then the value returned by either of the integration functions must be divided by 60 to convert from seconds to minutes to get the correct units.

In some cases all that is required is to accumulate the total since the start of the program, while other applications may require a daily, weekly or monthly total. In these cases, another schedule within the logger (in conjunction with an alarm if necessary) can be used to reset the total. For example, if only a daily total was required, a second schedule could be created to run once a day and within this schedule the CV containing the accumulated total could be set to 0.

For other reset intervals, the data logger also provides an internal channel for the day of the week (4ST) along with system variables for the day of the month (20SV) and day of the year (21SV). These can be used in an alarm statement to reset the channel variables containing the totalized data via the Action Command. Finally, it is also possible to use a manually triggered schedule to reset the counters. In this instance the schedule (triggered by an external switch or pushbutton) can contain the commands to reset the variables containing the accumulated total to zero.

Totalizing a device with a digital pulse signal output is easier than a sensor with an analog output. The dataTaker datalogger has 2 sets of counter inputs that can be used to count pulses. Any of the digital inputs 1D-8D (1D-4D for DT82 loggers) can be used as a low speed counter to measure pulses up to 25 hZ. Be aware, however, that these counters are not active if the logger is asleep, so they are not suitable for applications that require the lowest power consumption when the logger is allowed to sleep between samples.

If it is necessary to measure higher speed pulses, the loggers also provide 4 high speed counter inputs that can measure pulse frequencies up to 10 kHz. These counters can automatically accumulate the number of pulses, so that with the appropriate scaling they can provide a direct output of totalized flow. However, the counters are 32 bits wide, so it is possible for them to overflow and wrap back to zero. These counters also have a resetting mode whereby they are reset to zero after each time they are read. It is possible to combine the resetting mode with a channel variable that uses the += function to provides an accumulating counter in software. In this case, the counter is read, added to the totalized count that is contained in a variable, and then reset to zero to start the next count interval. Just like the analog counters, the digital counters can be reset by a schedule with an alarm command if necessary to periodically reset the total.

For further information on the dataTaker DT8X series of intelligent universal data loggers, other dataloggers in the highly successful dataTaker line, or to find the ideal solution for your application-specific needs, contact a CAS Data Logger Applications Specialist at (800) 956-4437 or visit the website at www.DataLoggerInc.com.

Contact Information:
CAS DataLoggers, Inc.
12628 Chillicothe Road
Chesterland, Ohio 44026
(440) 729-2570
(800) 956-4437
sales@dataloggerinc.com
http://www.dataloggerinc.com

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Leave a Comment

Your email address will not be published. Required fields are marked *