Collector Function

Simulation VI and Function

Collector Function

Owning Palette: Utilities Functions

Installed With: Control Design and Simulation Module

Collects a signal at each time step of the simulation and returns a history of the signal value and the time at which this function recorded each value in the history.

Details  Example

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs
 Place on the block diagram  Find on the Functions palette

Dialog Box Options

ParameterDescription
Polymorphic instanceSpecifies whether this function is Scalar or Vector. The default value is Scalar.
ParametersLists all the parameters associated with this function. Select a parameter from this list to configure the parameter. When you select a parameter, the parameter and its associated Parameter source control appear in the Parameter Information section of the configuration dialog box.
PreviewDisplays a graphical preview, if available, of the function output or configuration.
Parameter InformationContains the parameters you can configure for this function. You must select a parameter from the Parameters list to make that parameter and its associated Parameter source control visible in the Parameter Information section of the configuration dialog box.
Parameter sourceSpecifies whether you configure this parameter using the Configuration Dialog Box or a Terminal on the simulation diagram. The default value is Configuration Dialog Box. If you select Terminal, LabVIEW displays an input for that parameter on the simulation diagram, and you can wire values to that input to configure this function programmatically. If you select Configuration Dialog Box, LabVIEW removes that input from the simulation diagram. You then must set the value for this parameter inside the configuration dialog box.
history lengthSpecifies the time interval of the history to store, in seconds. If t is the current simulation time, this function stores the signal values for the time interval from thistory length to t. The default value is Inf, which stores the entire history.
decimationSpecifies the value the function uses to determine when to record a value. If you set the value of decimation to 1, this function records a value every time step. If you set the value of decimation to n, where n > 1, this function plots a value once every n time steps. The default value is 1.
execution typeSpecifies when this function updates. You can choose from the following options:
  • Continuous
  • Continuous(include minor time steps)
  • Discrete
sample period (sec)Specifies the length of the discrete time step, in seconds, of this function. If you enter a value of –1, this function inherits the discrete time step you specify for the simulation diagram. Otherwise, the value of sample period (sec) must be a multiple of the discrete time step you specify for the simulation diagram. The default value of sample period (sec) is 1.
sample skew (sec)Specifies the length of time by which you want to delay the execution of this function. The default value is 0. The value of this parameter must satisfy the following relationship:

0 ≤ sample skew (sec)sample period (sec)

Block Diagram Inputs

ParameterDescription
history lengthSpecifies the time interval of the history to store, in seconds. If t is the current simulation time, this function stores the signal values for the time interval from thistory length to t. The default value is Inf, which stores the entire history.
decimationSpecifies the value the function uses to determine when to record a value. If you set the value of decimation to 1, this function records a value every time step. If you set the value of decimation to n, where n > 1, this function plots a value once every n time steps. The default value is 1.
execution typeSpecifies when this function updates. You can choose from the following options:
  • Continuous
  • Continuous(include minor time steps)
  • Discrete
sample period (sec)Specifies the length of the discrete time step, in seconds, of this function. If you enter a value of –1, this function inherits the discrete time step you specify for the simulation diagram. Otherwise, the value of sample period (sec) must be a multiple of the discrete time step you specify for the simulation diagram. The default value of sample period (sec) is 1.
sample skew (sec)Specifies the length of time by which you want to delay the execution of this function. The default value is 0. The value of this parameter must satisfy the following relationship:

0 ≤ sample skew (sec)sample period (sec)
input signalSpecifies the signal from which to collect a history.

Block Diagram Outputs

ParameterDescription
signal historyReturns the history of the signal value and the time at which this function recorded each value in the history as a cluster of time-signal arrays.

Collector Details

This function operates like an auto-indexing output tunnel of a While Loop or For Loop but ensures that the simulation data is correlated to the simulation time correctly.

Feedthrough Behavior

All input/output pairs of this function have direct feedthrough behavior.

Example

Refer to the collector VI in the labview\examples\Control and Simulation\Simulation\Utilities directory for an example of using the Collector VI.

 Open example  Browse related examples