Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Elapsed Timer Function Block

LabVIEW 8.6 Real-Time Module Help
June 2008

NI Part Number:
370622F-01

»View Product Info

Owning Palette: Timer

Installed With: RT Module

Reports the elapsed time, in milliseconds, since the first call or previous reset of the function block.

If reset mode is TRUE on a reset iteration, elapsed time (ms) returns the time elapsed prior to the reset. Otherwise, elapsed time (ms) returns zero on a reset iteration.

Details  

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
InputsContains the following configuration options:
  • Terminal name—Contains the name of the block diagram terminal to configure.
  • Visible?—Specifies whether to display the terminal on the block diagram.
  • Variable scope—Specifies the availability and scope of the variable associated with the terminal. Select Single-process to use a single-process shared variable. Select Network-published to use a network-published shared variable. Select No Variable if you do not want to use a terminal variable. To minimize overhead, include function block terminal variables only when necessary. If you select a variable scope of No Variable for an input or output when you create a new function block instance, LabVIEW does not create a terminal variable for that input or output. If you change the value to No Variable after creating the function block instance, LabVIEW deletes the terminal variable.
  • Data source—Specifies the data source of the input. Select Terminal to wire the input value to the terminal on the block diagram. Select Variable to supply the input value to the function block through the associated terminal variable, if available. Select Default value to use the Default value as a constant value. The Variable data source option is not available if you select No Variable under Variable Scope. If you select Terminal as the data source and leave the block diagram terminal unwired, LabVIEW uses the Default value as a constant value.
  • Default value—Specifies the default value of the input. If you select Variable as the data source, LabVIEW uses this value as the initial value of the variable. If you select Default value as the data source, LabVIEW uses this value as a constant value.
OutputsContains the following configuration options:
  • Terminal name—Contains the name of the block diagram terminal to configure.
  • Visible?—Specifies whether to display the terminal on the block diagram.
  • Variable scope—Specifies the availability and scope of the variable associated with the terminal. Select Single-process to use a single-process shared variable. Select Network-published to use a network-published shared variable. Select No Variable if you do not want to use a terminal variable. To minimize overhead, include function block terminal variables only when necessary. If you select a variable scope of No Variable for an input or output when you create a new function block instance, LabVIEW does not create a terminal variable for that input or output. If you change the value to No Variable after creating the function block instance, LabVIEW deletes the terminal variable.

Block Diagram Inputs

ParameterDescription
error in (no error)Describes error conditions that occur before this function block runs. If an error occurs, the function block does not execute.
reset modeSpecifies whether to report elapsed time (ms) on reset iterations. When reset mode is TRUE on a reset iteration, elapsed time (ms) returns the time that elapsed prior to the reset. When reset mode is FALSE on a reset iteration, elapsed time (ms) returns zero.
resetSets counter value to zero.

Block Diagram Outputs

ParameterDescription
error outContains error information. If error in (no error) indicates that an error occurred before this function block ran, error out contains the same error information. Otherwise, it describes the error status that this function block produces. Right click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
elapsed time (ms)Returns the amount of time, in milliseconds, that has elapsed since the initial call or previous reset of the function block.

Elapsed Timer Details

The timing of this function block depends on the rate of the Timed Loop or While Loop in which you place the function block. For example, if you need the function block to update with millisecond resolution, you can place the function block in a Timed Loop configured to execute every millisecond.

The following timing diagram illustrates the behavior of this function block.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit