#include <cogent.h>
ST_STATUS HI_Deadband(IP_hTASK historian, char* retbuf, int buflen, char* histname, char* flag| flagtype|type, double setting );
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.
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.
enable turns the deadband on and off without affecting its configuration.
![]() | In order for this flag to be set to true, at least one type must be set to a non-zero value. Otherwise, it will return false. |
prior records the value prior to any value that exceeds the deadband. If set to true (the default), when a value is encountered that exceeds the deadband, the value immediately prior to that is also recorded in the data set. This is done so that plotted data will be approximately correct. For example, if a value remains in a stable range for a long time, and then suddenly spikes to a large number, it is appropriate to keep the last known value within the deadband range before adding the spike value to the data set. When this data is plotted, the spike will actually show as a spike, rather than a gradual ramp.

![]() | 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-2012 by Cogent Real-Time Systems, Inc. All rights reserved.