August 29th, 2010, 09:28 AM
i made a accumulator for a motor and i want it to restart its run time counter everytime it is stoped but it goes on from the last run time conter how do i make it restart itself ??
August 29th, 2010, 04:28 PM
You will need to reset it whenever it is stopped. have a look at cicode functions relation to accumulators. sorry don't have citect installed on this pc
August 29th, 2010, 06:44 PM
What is the cicode for it ?
August 29th, 2010, 07:05 PM
i dont trust citect accumulators. better to do it in a plc.
August 29th, 2010, 07:12 PM
from online help..
Controls accumulators, e.g. 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:
matches all following characters, e.g. "Motor*"
? matches any character, e.g. "Motor?10"
This argument can be prefixed by the name of the cluster i.e. 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");
August 29th, 2010, 07:26 PM
August 30th, 2010, 02:34 AM
i got it working but only in a button i dont know how to make it so if the motor isnt running it restarts i tryed
if motor=0 AccControl("MOTORSTATS", 3)
i knew it was wrong but i dont know what to type anyone elp me ??
August 30th, 2010, 02:56 AM
also where do i write the cicode in ??