DAQmx - Using Pre-scaling with TIO counters
Downloads
Filename: 3077.vi
Requirements: View
Filename: 3078.zip
Requirements: View
Filename: 3081.zip
Requirements: View
Configuring prescaling is very similar in DAQmx and Traditional DAQ. First we configure the counter for simple edge counting. We configure the counter, initial count, count direction and edge. We then use a DAQmx Channel Property Node to specify the prescaler value. There are three valid values: 1, 2 and 8. We then start the task and within the loop retrieve the current count. Just like in traditional DAQ this value has not been scaled. To determine the actual count you would need to multiply it by the prescaler you selected.
Steps:
1. Create a Counter Input channel to Count Events. The Edge parameter is used to determine if the counter will increment on rising or falling edges.
2. Configure the pre-scaling.
3. Call the Start VI to arm the counter and begin counting. The counter will be preloaded with the Initial Count.
4. The counter will be continually polled until the Stop button is pressed on the front panel.
5. Call the Clear Task VI to clear the Task.
6. Use the popup dialog box to display an error if any.
Requirements
Filename: 3077.vi
Software Requirements
Application Software: LabVIEW Base Development System 7.0
Language(s): C#, C, Visual Basic .NET, LabVIEW
Additional Software: Visual Basic
Hardware Requirements
Hardware Group: Multifunction DAQ (MIO), Counter/Timers (TIO)
Hardware Model: PCI-6624, PXI-6601, PXI-6602, PXI-6608, PXI-6610, PXI-6624, PCI-6220, PCI-6221, PCI-6222, PCI-6224, PCI-6229, PCI-6250, PCI-6251, PCI-6254, PCI-6259, PCI-6280, PCI-6281, PCI-6284, PXI-6220, PXI-6221, PXI-6230, PXI-6224, PXI-6229, PXI-6250, PXI-6251, PXI-6254, PXI-6259, PXI-6280, PXI-6281, PXI-6284, PXI-6289, PCI-6601, PCI-6602, PCI-6608, PCI-6610
Driver: NI-DAQmx 7.4
Software Requirements
Application Software: Measurement Studio .NET Support 7.1
Language(s): C, C#, LabVIEW, Visual Basic .NET
Additional Software: Visual Studio .NET 2003
Hardware Requirements
Hardware Group: Multifunction DAQ (MIO), Counter/Timers (TIO)
Hardware Model: PXI-6284, PXI-6289, PCI-6601, PCI-6602, PCI-6608, PCI-6610, PCI-6624, PXI-6601, PXI-6602, PXI-6608, PXI-6610, PXI-6624, PCI-6220, PCI-6221, PCI-6222, PCI-6224, PCI-6229, PCI-6250, PCI-6251, PCI-6254, PCI-6259, PCI-6280, PCI-6281, PCI-6284, PXI-6220, PXI-6221, PXI-6230, PXI-6224, PXI-6229, PXI-6250, PXI-6251, PXI-6254, PXI-6259, PXI-6280, PXI-6281
Driver: NI-DAQmx 7.5
Software Requirements
Application Software: LabWindows/CVI Full Development System 7.1
Language(s): Visual Basic .NET, C, C#, LabVIEW
Additional Software: Visual C++ 6.0
Hardware Requirements
Hardware Group: Multifunction DAQ (MIO), Counter/Timers (TIO)
Hardware Model: PCI-6601, PCI-6602, PCI-6608, PCI-6610, PCI-6624, PXI-6601, PXI-6602, PXI-6608, PXI-6610, PXI-6624, PCI-6220, PCI-6221, PCI-6222, PCI-6224, PCI-6229, PCI-6250, PCI-6251, PCI-6254, PCI-6259, PCI-6280, PCI-6281, PCI-6284, PXI-6220, PXI-6221, PXI-6230, PXI-6224, PXI-6229, PXI-6250, PXI-6251, PXI-6254, PXI-6259, PXI-6280, PXI-6281, PXI-6284, PXI-6289
Driver: NI-DAQmx 7.4
Software Requirements
Language(s): C, C#, LabVIEW, Visual Basic .NET
Hardware Requirements
Hardware Group: Multifunction DAQ (MIO), Counter/Timers (TIO)
Hardware Model: PXI-6224, PXI-6229, PXI-6250, PXI-6251, PXI-6254, PXI-6259, PXI-6280, PXI-6281, PXI-6284, PXI-6289, PCI-6601, PCI-6602, PCI-6608, PCI-6610, PCI-6624, PXI-6601, PXI-6602, PXI-6608, PXI-6610, PXI-6624, PCI-6220, PCI-6221, PCI-6222, PCI-6224, PCI-6229, PCI-6250, PCI-6251, PCI-6254, PCI-6259, PCI-6280, PCI-6281, PCI-6284, PXI-6220, PXI-6221, PXI-6230
Driver: NI-DAQmx 7.4
Software Requirements
Language(s): C, C#, LabVIEW, Visual Basic .NET
Hardware Requirements
Hardware Group: Multifunction DAQ (MIO), Counter/Timers (TIO)
Hardware Model: PCI-6602, PCI-6608, PCI-6610, PCI-6624, PXI-6601, PXI-6602, PXI-6608, PXI-6610, PXI-6624, PCI-6220, PCI-6221, PCI-6222, PCI-6229, PCI-6250, PCI-6251, PCI-6254, PXI-6254, PXI-6259, PXI-6280, PXI-6281, PXI-6284, PXI-6289, PCI-6224, PCI-6601, PCI-6259, PCI-6280, PCI-6281, PCI-6284, PXI-6220, PXI-6221, PXI-6230, PXI-6224, PXI-6229, PXI-6250, PXI-6251
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/).
