03-31-2008 09:13 PM
04-01-2008
01:18 PM
- last edited on
09-30-2025
11:46 AM
by
Content Cleaner
Hi Miaa,
In general, you want your acquisition to be about 10 or more times the frequency of your signal. So if you have a 100Hz signal, you'll get a good picture of it sampling at 1000Hz or more. For the samples to read, you'll want to keep that around 10% of your sampling rate. Your Acquisition mode depends on your application: do you need to acquire a set number of samples and then end the task or do you need to continuously take in samples? Your For Loop surrounds your entire DAQmx code instead of just the DAQmx Read. This will reconfigure your board every iteration and clear the resource which will give you poor performance. You also don't need to open any of the DAQmx VIs so don't worry about the Task/Channels control.
National Instruments provides some great resources for succesfully programing your DAQ device. First, the example finder (Help\Find Examples...) has great examples for many analog, digital and counter applications. Look under "Hardware Input and Output\DAQmx\" There's also an excellent tutorial on our Developer's Zone entitled "Getting Started with DAQmx" Please follow the links below.
Getting Started with NI-DAQmx: Main Page
https://www.ni.com/en/support/documentation/supplemental/06/getting-started-with-ni-daqmx--main-page...
Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications
https://www.ni.com/en/support/documentation/supplemental/06/learn-10-functions-in-ni-daqmx-and-handl...