PDA

View Full Version : citectSCADA Accumulator problems


Piannazzone
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 ??

Dua Anjing
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

Piannazzone
August 29th, 2010, 06:44 PM
What is the cicode for it ?

zankorel
August 29th, 2010, 07:05 PM
i dont trust citect accumulators. better to do it in a plc.

Dua Anjing
August 29th, 2010, 07:12 PM
from online help..
AccControl
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.

Syntax
AccControl(sName, nMode [, ClusterName] )

sName:
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.

nMode:
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

ClusterName:
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 "".

Return Value
0 (zero) if successful, otherwise an error is returned.

Example
! Reset all accumulator variables for accumulator "MCC123".
AccControl("MCC123", 3, "ClusterXYZ");

See Also
Miscellaneous Functions

Piannazzone
August 29th, 2010, 07:26 PM
Thanks alot

Piannazzone
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 ??

Piannazzone
August 30th, 2010, 02:56 AM
also where do i write the cicode in ??