# DelayLine

Implements a shift-register array, or data "stream", into which a cell's values are buffered after each event.

Note: After a reset, the first value that is read fills the shift-register.

## DelayLine Inputs

Syntax: DelayLine(Event,Value,Number of Steps,Reset)

Parameter | Description
--- | ---
Event | Specifies the event that forces an update.This parameter must be a reference to one of the following: The Image data structure in cell A1. A cell containing an Event function. A cell containing a Button function. Note: DelayLine 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 data (-16777216 to 16777216; default = 0).
Number of Steps | Specifies the number of values in the function's internal shift-register array. (default = 10)
Reset | Forces the function to purge itself of previously read values. The first value read after Reset will effectively "fill" the shift register.
0 = OFF (default) | The function will continue to read in values to the data stream.
1 = ON | The function will purge all values from the data stream.

## DelayLine Outputs

Returns | A Delay data structure containing statistics for the specified Value over an interval from Reset to current.
Results | When the function initially inserted into a cell, a result table is created in the spreadsheet.

## DelayLine Vision Data Access Functions

The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table.

Last | GetValue(Delay, Index) | The last value contained in the structure.
Mean | GetMean(Delay) | The mean of all the values in the structure.
SDev | GetSDev(Delay) | The standard deviation of all the values in the structure.
Min | GetMin(Delay) | The smallest value contained in the structure.
Max | GetMax(Delay) | The largest value contained in the structure.

Additional data elements can be accessed using the following Vision Data Access functions:

Count | GetCount(Delay) | The number of values contained in the structure.
Sum | GetSum(Delay) | The sum of all values contained in the structure.