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

Retentive Timer On Function Block

LabVIEW 2009 Real-Time Module Help

Edition Date: June 2009

Part Number: 370622G-01

»View Product Info

Owning Palette: Timer Function Blocks

Requires: RT Module

A timer that counts up to preset time (ms) while enable is TRUE. When enable is FALSE, this function block retains the accumulated time (ms) value. When accumulated time (ms) reaches preset time (ms), done returns TRUE until reset, but accumulated time (ms) continues to increment while enable is TRUE until reset.

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 change the Variable scope 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. 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.
  • 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 for every iteration of the function block.
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 change the Variable scope 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 node runs.
resetSets the value of accumulated time (ms) to zero.
preset timeSpecifies the amount of time for the function block to use in calculations.
enableDetermines whether to measure the cumulative time elapsed time between iterations.

Block Diagram Outputs

ParameterDescription
error outContains error information. This output provides standard error out functionality.
doneIndicates whether the latest count has finished.
accumulated timeReturns the accumulated time elapsed while enabled since the first call or last reset.

Retentive Timer On 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.


 

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