NI DAQmx: Downsample Analog Input Sample Clock
Downloads
Filename: downsample_ai_sample_clock.vi
Requirements: View
This example demonstrates how to acquire data continuously and simultaneously downsample the internal clock for the analog input by outputting a pulse for every 100 analog input samples.
This behavior is particularly helpful for applications such as sending a clock signal to a peripheral device once every N samples.
II. Instructions for Running:
1. Create an analog input voltage channel.
2. Set the rate for the sample clock. Additionally, define the sample mode to be continuous.
3. Create a counter output channel.
4. Make sure that the source of ticks is from the same device as the analog input channel.
5. Call the Start VI to start the acquisition.
6a. Read the waveform data in a loop until the user hits the stop button or an error occurs.
Note: This example reads data from one or more channels and returns an array of data. Use the Index Array function to access an individual channel of data.
6b. While the data is being read check for errors that may have occurred in the counter operation.
7. Call the Clear Task VIs to clear the Tasks.
6. Use the popup dialog box to display an error if any.
IV. I/O Connections Overview:
Make sure your signal input terminal matches the Physical Channel I/O Control. For further connection information, refer to your hardware reference manual.
Requirements
Filename: downsample_ai_sample_clock.vi
Software Requirements
Application Software: LabVIEW Base Development System 7.1
Language(s): LabVIEW
Hardware Requirements
Hardware Group: Multifunction DAQ (MIO)
Hardware Model: PCI-6220, PCI-6254, PCI-6221 (37-Pin), PCI-6222, PCI-6224, PCI-6225, PCI-6229, PCI-6250, PCI-6251, PCI-6255, PCI-6259, PCI-6280, PCI-6281, PCI-6284, PCI-6289, PCI-6221
Driver: NI-DAQmx 7.5
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
