Selecting a Timing Source for a Timed Structure (Real-Time, Windows)

A timing source controls the execution of a timed structure. You can select from three types of timing sources:

Internal Timing Sources

Internal timing sources for controlling a timed structure include the 1 kHz clock of the operating system and the 1 MHz clock of a supported real-time (RT) target. Use the Loop Timing Source or Sequence Timing Source section of the Configure Timed Loop, Configure Timed Sequence, or Configure Timed Loop with Frames dialog boxes to select an internal timing source.

Software-Triggered Timing Sources

You can create a software-triggered timing source to trigger a timed structure based on a software-defined event. Use the Create Timing Source VI to create a software-triggered timing source. Use the Fire Software-Triggered Timing Source VI to programmatically trigger a Timed Loop controlled by a software-triggered timing source.

You can use a software-triggered timing source as an RT-compatible event handler or to notify a consumer Timed Loop when new data becomes available in a producer-consumer application. You also can use software-triggered timing sources for discrete event simulation. Use the number of ticks input of the Fire Software-Triggered Timing Source VI to specify the number of ticks that elapse between each discrete event. The internal tick counter of the timed structure advances by number of ticks when the Fire Software-Triggered Timing Source VI executes. If the internal tick counter jumps past one or more Timed Loop periods, the Timed Loop regards those periods as missed periods. If you want to trigger multiple Timed Loop iterations with a single call to the Fire Software-Triggered Timing Source VI, you can remove the checkmark from the Discard missed periods checkbox in the Configure Timed Loop dialog box.

External Timing Sources

You can create external timing sources for controlling a timed structure with NI-DAQmx 7.2 or later. Use the DAQmx Create Timing Source VI to programmatically select an external timing source. You also can use several types of NI-DAQmx timing sources, including frequency, digital edge counters, digital change detection, and signals from task sources, to control timed structures. Use the DAQmx - Data Acquisition VIs to create the following types of NI-DAQmx timing sources to control a timed structure.

Refer to the NI-DAQmx Help, available by selecting Start»All Programs»National Instruments»NI-DAQ»NI-DAQmx Help, for information about using NI-DAQmx VIs and functions to control timed structures.

You can use a secondary timing source to control the execution of the frames of a timed structure. For example, you can use a 1 kHz clock to control the iterations of a Timed Loop and use a 1 MHz clock to control the timing of the frames in every iteration.



Timed Structures Home