# ClockedSum

Keeps the running total of the specified value over an infinite interval. The function Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications. returns the current accumulated total.

The ClockedSum function sums the referenced value before that value is updated by the function specified in Event.

Note:

The functionalities of the Accumulate and ClockedSum functions are reversed in In-Sight Vision Suite compared to In-Sight Explorer.

The Job A job is a user-configured program in In-Sight Spreadsheet consisting of functions and designed for specific applications. You can create and edit jobs using the In-Sight Spreadsheet interface, and load them on a vision system for deployment in a live environment. Converter tool still converts these functions correctly. This means that if there is a ClockedSum function in In-Sight Explorer, after the job conversion, it shows up as an Accumulate function in In-Sight Vision Suite. Therefore, Cognex strongly recommends using the Job Converter tool to convert jobs from In-Sight Explorer to In-Sight Vision Suite, especially if the In-Sight Explorer job uses the ClockedSum function or the Accumulate function. For more information, see Convert In-Sight Explorer Jobs into In-Sight Vision Suite Jobs.

Inputs

The ClockedSum function has the following syntax:

ClockedSum(Event, Value, Reset, Preset)

See the table for a description of the available parameters.

Parameter | Description
Event | Specifies the event on which to read the specified Value. This parameter needs to refer to any event with a timestamp, for example, one of the following: A cell containing an Event function. A cell containing a Button function. Note: The ClockedSum function buffers the state of a referenced value before that value is updated by any other function that depends on the specified Event.
Value | A reference to the cell containing the source of the data stream to be accumulated between the values of -9999999 to 9999999. The default value is 1.
Reset | Forces the accumulator to reset to the Preset value.
0 = OFF (default) | The accumulator continues to sum the specified value indefinitely.
1 = ON | The accumulator resets immediately.
Preset | Specifies the minimum value to which the accumulator is reset when Reset is ON between the values of -9999999 to 9999999. The default value is 0.

Outputs

Returns | A value representing the summation of the data stream over a time interval since the last Reset.