Controls accumulators, for example, motor run hours. You can reset the values of Run Time, Totalizer Inc, and No. of Starts (defined in the Accumulator database), re-read these values from the I/O device, or flush pending writes of these values to the I/O device.
AccControl(sName, nMode [, ClusterName] )
The name of the accumulator or a mask for the names of accumulators. You can use the following wildcards:
This argument can be prefixed by the name of the cluster for example ClusterName.AccumulatorName.
The mode of the control:
1 - Reset Run Time and Totalizer value
2 - Reset No. of Starts
3 - Reset Run Time, Totalizer value, and No. of Starts
4 - Flush pending writes to the I/O device
5 - Re-read Run Time, Totalizer value, and No. of Starts from the I/O device
Name of the cluster in which the accumulator resides. This is optional if you have one cluster or are resolving the reports server via the current cluster context. The argument is enclosed in quotation marks "".
0 (zero) if successful, otherwise an error is returned.
! Reset all accumulator variables for accumulator "MCC123".
AccControl("MCC123", 3, "ClusterXYZ");