Using System Clock as Sampling Clock in DAQmx

Updated Nov 27, 2018

Reported In

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

I am developing a data acquisition system in LabVIEW and I am acquiring an analog input signal at a sampling rate of 1 Hz. Can I use the Windows system clock to set the time interval between each acquisition?

Solution

LabVIEW timing functions use the operating system timer which works the same as the operating system clock.
What you need to do is to use software timing for your DAQmx task. You can refer to any DAQmx example in the NI Example Finder that contains "SW-Timed" in its name, and you will find a "Loop Time (ms)" setting on the front panel of the example as shown below in Figure 1.
Figure 1
By setting the Loop Time to the time interval you need, your DAQmx Task will run at the corresponding sampling rate controlled by the LabVIEW software.

Note: Software Timing has a limited timing resolution depending on what operating system your are using. For more information, please check the Accuracy of Software-Timed Applications in LabVIEW.

WAS THIS ARTICLE HELPFUL?

Not Helpful