DAQmx Create Timing Source (VI)

DAQmx - Data Acquisition VIs and Functions

Edition Date: January 2019

Part Number: 370469AP-01

»View Product Info
Download Help (Windows Only)
Owning Palette: DAQmx Timed Loop VI and Function
Installed With: NI-DAQmx

Creates a timing source for a Timed Loop. The timing source is based on signals a device generates. The instances of this polymorphic VI correspond to the type of signal to use for the timing source. Wire the timing source out output to the source input of the Input Node of a Timed Loop to use this timing source with that Timed Loop.

Timing sources send ticks to a timed loop. Those ticks determine when the Timed Loop executes. By default, the Timed Loop executes each time it receives a tick from a timing source, but other Timed Loop settings can affect when it executes. For example, if you set period in the Loop Configuration dialog to 2, the Timed Loop executes on every other tick the timing source sends.

Refer to NI-DAQmx 7.4 and Later Single-Point Real-Time Applications for an overview of real-time architectures and applications.

The DAQmx Timing Source properties include additional timing source configuration options.

Use the pull-down menu to select an instance of this VI.

Control Loop From Task

Creates a timing source that uses a combination of the sample clock and the specified sleep time to determine when to send ticks to a Timed Loop. You must create an analog input task that uses sample clock timing and wire that task to the task/channels in input of this VI. Do not use the DAQmx Start Task VI to start the task. The Timed Loop starts the task automatically. National Instruments recommends that you use this instance instead of the Signal From Task instance for best performance with Timed Loops.

DAQmx Create Timing Source (Control Loop From Task)

/images/reference/en-XX/help/370469AP-01/civrn.gif

task/channels in is the name of the task or a list of virtual channels to which the operation applies. If you provide a list of virtual channels, NI-DAQmx creates a task automatically.

/images/reference/en-XX/help/370469AP-01/cdbl.gif

sleep time (us) specifies in microseconds the amount of time the Timed Loop sleeps after each sample clock pulse. The default sleep time is 0. This input is ignored on all OSes other than Pharlap or NI Linux RT.

/images/reference/en-XX/help/370469AP-01/cerrcodeclst.gif

error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. If an error occurs while this VI or function runs, the VI or function runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

/images/reference/en-XX/help/370469AP-01/cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

/images/reference/en-XX/help/370469AP-01/ci32.gif

code is the error or warning code. The default is 0. If status is TRUE, code is a negative error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370469AP-01/cstr.gif

source identifies where an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

/images/reference/en-XX/help/370469AP-01/cstr.gif

timing source name is the name to assign to the timing source this VI creates.

/images/reference/en-XX/help/370469AP-01/iivrn.gif

task out is a reference to the task after this VI or function completes execution.

/images/reference/en-XX/help/370469AP-01/istr.gif

timing source out is the name of the timing source this VI creates. Wire this output to the source input of the Input Node of a Timed Loop. If you specified a name for the timing source in the timing source name input, this output contains the same name. If you did not specify a name for the timing source, NI-DAQmx creates a name and sets this output to that name.

/images/reference/en-XX/help/370469AP-01/ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, error out describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

/images/reference/en-XX/help/370469AP-01/ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

/images/reference/en-XX/help/370469AP-01/ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370469AP-01/istr.gif

source identifies where and why an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

Frequency

Creates a timing source that sends ticks to a Timed Loop at a constant frequency. NI-DAQmx uses the counter you specify to generate the signal for the timing source.

DAQmx Create Timing Source (Frequency)

/images/reference/en-XX/help/370469AP-01/civrn.gif

counter specifies the name of the counter to use for the timing source. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system. You also can wire a string that contains a name of a counter to this input.

/images/reference/en-XX/help/370469AP-01/cdbl.gif

frequency specifies in hertz the frequency at which you want to send ticks to the Timed Loop.

/images/reference/en-XX/help/370469AP-01/cerrcodeclst.gif

error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. If an error occurs while this VI or function runs, the VI or function runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

/images/reference/en-XX/help/370469AP-01/cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

/images/reference/en-XX/help/370469AP-01/ci32.gif

code is the error or warning code. The default is 0. If status is TRUE, code is a negative error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370469AP-01/cstr.gif

source identifies where an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

/images/reference/en-XX/help/370469AP-01/cstr.gif

timing source name is the name to assign to the timing source this VI creates.

/images/reference/en-XX/help/370469AP-01/istr.gif

timing source out is the name of the timing source this VI creates. Wire this output to the source input of the Input Node of a Timed Loop. If you specified a name for the timing source in the timing source name input, this output contains the same name. If you did not specify a name for the timing source, NI-DAQmx creates a name and sets this output to that name.

/images/reference/en-XX/help/370469AP-01/ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, error out describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

/images/reference/en-XX/help/370469AP-01/ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

/images/reference/en-XX/help/370469AP-01/ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370469AP-01/istr.gif

source identifies where and why an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

Digital Edge (Counter)

Creates a timing source that sends ticks to a Timed Loop on rising or falling edges of a digital signal. NI-DAQmx uses the counter you specify to detect the edges of the digital signal. Use this VI to base a timing source on an external digital signal or on an internal digital signal not included in the Signal From Task instance of the DAQmx Create Timing Source VI.

DAQmx Create Timing Source (Digital Edge using Counter)

/images/reference/en-XX/help/370469AP-01/civrn.gif

source specifies the terminal to which you connect the digital signal you want to use for the timing source. A DAQmx terminal constant lists all terminals available on devices installed in the system. You also can specify a source terminal by wiring a string that contains a terminal name.

/images/reference/en-XX/help/370469AP-01/civrn.gif

counter specifies the name of the counter to use for the timing source. The DAQmx physical channel constant lists all physical channels, including counters, for devices installed in the system. You also can wire a string that contains a name of a counter to this input.

/images/reference/en-XX/help/370469AP-01/ci32.gif

edge specifies on which edges of the digital signal you want to send ticks to the Timed Loop.

Falling (10171)

Send ticks on falling edges.

Rising (10280)

Send ticks on rising edges.

/images/reference/en-XX/help/370469AP-01/cerrcodeclst.gif

error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. If an error occurs while this VI or function runs, the VI or function runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

/images/reference/en-XX/help/370469AP-01/cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

/images/reference/en-XX/help/370469AP-01/ci32.gif

code is the error or warning code. The default is 0. If status is TRUE, code is a negative error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370469AP-01/cstr.gif

source identifies where an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

/images/reference/en-XX/help/370469AP-01/cstr.gif

timing source name is the name to assign to the timing source this VI creates.

/images/reference/en-XX/help/370469AP-01/cu32.gif

edge count specifies the number of edges of the digital signal that must occur for the timing source to send a tick to the Timed Loop. For example, if you set this value to 3, the timing source sends a tick to the Timed Loop on every third edge of the digital signal.

/images/reference/en-XX/help/370469AP-01/istr.gif

timing source out is the name of the timing source this VI creates. Wire this output to the source input of the Input Node of a Timed Loop. If you specified a name for the timing source in the timing source name input, this output contains the same name. If you did not specify a name for the timing source, NI-DAQmx creates a name and sets this output to that name.

/images/reference/en-XX/help/370469AP-01/ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, error out describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

/images/reference/en-XX/help/370469AP-01/ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

/images/reference/en-XX/help/370469AP-01/ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370469AP-01/istr.gif

source identifies where and why an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

Digital Change Detection

Creates a timing source that sends ticks to a Timed Loop on rising and/or falling edges of one or more digital lines. You can use this instance of this VI only with devices that support digital change detection. Use the Digital Edge (Counter) instance of the DAQmx Create Timing Source VI with other devices. That instance uses a counter and cannot detect edges on multiple lines.

DAQmx Create Timing Source (Digital Change Detection)

/images/reference/en-XX/help/370469AP-01/civrn.gif

rising edge physical channels specifies the names of the digital lines or ports on which to detect rising edges. The DAQmx physical channel constant lists all lines and ports for devices installed in your system. You also can wire a string that contains a list or range of digital lines or ports to this input.

/images/reference/en-XX/help/370469AP-01/civrn.gif

falling edge physical channels specifies the names of the digital lines or ports on which to detect falling edges. The DAQmx physical channel constant lists all lines and ports for devices installed in your system. You also can wire a string that contains a list or range of digital lines or ports to this input.

/images/reference/en-XX/help/370469AP-01/cerrcodeclst.gif

error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. If an error occurs while this VI or function runs, the VI or function runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

/images/reference/en-XX/help/370469AP-01/cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

/images/reference/en-XX/help/370469AP-01/ci32.gif

code is the error or warning code. The default is 0. If status is TRUE, code is a negative error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370469AP-01/cstr.gif

source identifies where an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

/images/reference/en-XX/help/370469AP-01/cstr.gif

timing source name is the name to assign to the timing source this VI creates.

/images/reference/en-XX/help/370469AP-01/istr.gif

timing source out is the name of the timing source this VI creates. Wire this output to the source input of the Input Node of a Timed Loop. If you specified a name for the timing source in the timing source name input, this output contains the same name. If you did not specify a name for the timing source, NI-DAQmx creates a name and sets this output to that name.

/images/reference/en-XX/help/370469AP-01/ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, error out describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

/images/reference/en-XX/help/370469AP-01/ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

/images/reference/en-XX/help/370469AP-01/ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370469AP-01/istr.gif

source identifies where and why an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

Signal From Task

Creates a timing source that uses the signal you specify to determine when to send ticks to a Timed Loop. You must create a task that can generate the signal and wire that task to the task/channels in input of this VI. Do not use the DAQmx Start Task VI to start the task. The Timed Loop starts the task automatically.

DAQmx Create Timing Source (Signal From Task)

/images/reference/en-XX/help/370469AP-01/civrn.gif

task/channels in is the name of the task or a list of virtual channels to which the operation applies. If you provide a list of virtual channels, NI-DAQmx creates a task automatically.

/images/reference/en-XX/help/370469AP-01/ci32.gif

signal is the signal to use for the timing source.

Change Detection Event (12511)

Send a tick to the Timed Loop each time the Change Detection Event occurs.

Counter Output Event (12494)

Send a tick to the Timed Loop each time the Counter Output Event occurs.

Sample Clock (12487)

Send a tick to the Timed Loop on each active edge of the Sample Clock.

Sample Complete Event (12530)

Send a tick to the Timed Loop each time the Sample Complete Event occurs.

/images/reference/en-XX/help/370469AP-01/cerrcodeclst.gif

error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. If an error occurs while this VI or function runs, the VI or function runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

/images/reference/en-XX/help/370469AP-01/cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

/images/reference/en-XX/help/370469AP-01/ci32.gif

code is the error or warning code. The default is 0. If status is TRUE, code is a negative error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370469AP-01/cstr.gif

source identifies where an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

/images/reference/en-XX/help/370469AP-01/cstr.gif

timing source name is the name to assign to the timing source this VI creates.

/images/reference/en-XX/help/370469AP-01/iivrn.gif

task out is a reference to the task after this VI or function runs. If you wired a channel or list of channels to task/channels in, NI-DAQmx creates this task automatically.

/images/reference/en-XX/help/370469AP-01/istr.gif

timing source out is the name of the timing source this VI creates. Wire this output to the source input of the Input Node of a Timed Loop. If you specified a name for the timing source in the timing source name input, this output contains the same name. If you did not specify a name for the timing source, NI-DAQmx creates a name and sets this output to that name.

/images/reference/en-XX/help/370469AP-01/ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, error out describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

/images/reference/en-XX/help/370469AP-01/ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

/images/reference/en-XX/help/370469AP-01/ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/370469AP-01/istr.gif

source identifies where and why an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

WAS THIS ARTICLE HELPFUL?

Not Helpful