HI_Deadband

HI_Deadband -- sets the history value deadband.

Syntax

#include <cogent/cogent.h>

ST_STATUS HI_Deadband(IP_hTASK historian, char* retbuf, int buflen, char* histname, char* flag|type, double setting);

Arguments

historian

The task pointer to the Cascade Historian program.

retbuf

An optional buffer containing an error message.

buflen

The length in bytes of retbuf. If retbuf is non-NULL, this must be a valid non-zero length. If retbuf is NULL, this parameter is ignored.

histname

The name of a history.

flag

A deadband flag, any of: enable or prior, as described below.

type

A deadband type, any of: absolute, percent, timelimit, or countlimit, as described below.

setting

A setting (possibly optional) corresponding to the specified type or flag. Settings for flags are 0 (0.0) for true and any non-zero value for false.

Returns

ST_OK on success, and the retbuf may be parsed to extract the complete response from the Cascade Historian (see the deadband command). Otherwise ST_ERROR, and the retbufa will contain a NULL-terminated character string with an error message.

Description

This function sets a deadband on a history, such that new values falling within that deadband are not recorded.

A deadband is used to reduce the amount of data stored by only storing data if there is a significant change in value. This approach is superior to simply reducing the sampling frequency, which will lose information when data changes quickly, and will waste storage by saving the same values when data doesn't change. The deadband approach defines a resolution below which changes in data are deemed to be 'noise' and therefore ignored.

Flags

Types

Note

If absolute and percent are used together there is an AND relationship between them. The Cascade Historian will ignore any value falling within either deadband. Only those values falling outside all deadbands (or equal to the outermost) will be recorded.

This function corresponds to the Cascade Historian deadband command and the hist_deadband dynamic library function.

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.