Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006

Enable Digital Filtering for M Series

0 ratings | 0.00 out of 5
Print

Downloads

Filename: 3900.vi
Requirements: View

I. Description:
Digital filters are not supported for PFI Lines by NI-DAQmx as of version 7.4. Filtering is only supported for counter inputs. However, a workaround to enable a digital filter for a PFI line is to create a dummy counter task for that PFI line and enable the filter on it.

Thus, this example demonstrates how to acquire a continuous amount of data (Waveform) using the internal sample clock, started by a digital edge. The digital edge is filtered by committing a counter task.

II. Instructions for Running:
1. Select the physical channel to correspond to where your signal is input on the DAQ device.
2. Enter the minimum and maximum voltage ranges.
Note: For better accuracy try to match the Input Ranges to the expected voltage level of the measured signal.
3. Set the Rate of the Internal Clock. Also set the Samples to Read control. This will determine how many samples are read each time the while loop iterates. This also determines how many points are plotted on the graph every iteration.
5. Select a source for the digital edge start trigger.
6. Select the edge, rising or falling, on which to trigger.
7. Select the counter that will be used to commit a PFI line. This is necessary to allow the digital filtering on the PFI line.
8. Select whether the digital filter will be enabled or not.

III. Block Diagram Steps:
1. Create an analog input voltage channel and a count edges task.
2. Setup the timing for the acquisition. In this example, the Sample Clock is generated internally by the board. Rate specifies the rate of the internal clock. The sample mode is set to be continuous.
3. Set the parameters for a digital edge start trigger. Also, setup the input terminal of the counter to be the same as the trigger source. Then, create the control to enable/disable digital filtering on that trigger source.
4. Call the Start VI to start the acquisition. Also, commit the counter task so that the specifications that were made will apply to the counter input, without actually starting the acquisition.
5. 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.
6. Call the Clear Task VI to clear the Task.
7. Use the popup dialog box to display an error or warning if any.

IV. I/O Connections Overview:
Make sure your signal input terminal matches the Physical Channel I/O control. Also, make sure that your digital trigger signal is connected to the terminal specified in Trigger Source. For further connection information, refer to your hardware reference manual.


Related Links:
Digital Filtering for M Series

Requirements


Filename: 3900.vi

Software Requirements


Application Software: LabVIEW Base Development System 7.0
Language(s): LabVIEW

Hardware Requirements


Hardware Group: Multifunction DAQ (MIO)
Hardware Model: PCI-6221, PCI-6222, PCI-6224, PCI-6229, PCI-6250, PCI-6220, PCI-6254, PCI-6259, PCI-6280, PCI-6281, PCI-6284, PCI-6251
Driver: NI-DAQmx 7.3

 
0 ratings | 0.00 out of 5
Print

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/).