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


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

M Series Correlated Digital Input with Counter Clock Generation in ANSI C

2 ratings | 5.00 out of 5
Print

Downloads

Filename: 4672.zip
Requirements: View

/*********************************************************************
*
* ANSI C Example program:
* Correlated DIO Counter Gen Dig Start.c
*
* Example Category:
* DI
*
* Description:
* This example demonstrates how use any M Series MIO card to acquire
* a finite amount of data using a digital start trigger and hardware
* timing provided by an onboard counter.
*
* Instructions for Running:
* 1. Select the Physical Channel to correspond to where your
* signal is input on the DAQ device.
* 2. Select how many Samples to Acquire on Each Channel.
* 3. Set the Rate of the Acquisition.
* 4. Select the Source and Edge of the Digital Start Trigger
* for the acquisition.
*
* Steps:
* 1. Create digital input and counter output tasks.
* 2. Create a digital input channel and a counter output channel.
* 3. Define the parameters for an External Clock Source from the
* internal counter output channel. Additionally, define the sample
* mode to be Finite.
* 4. Define the parameters for a Digital Edge Start Trigger.
* 5. Call the Start function to begin the acquisition.
* 6. Use the Read function to retrieve the waveform. Set a timeout
* so an error is returned if the samples are not returned in
* the specified time limit.
* 7. Call the Clear Task function to clear the tasks.
* 8. Display an error if any.
*
* I/O Connections Overview:
* Make sure your signal input terminal matches the Physical
* Channel I/O Control. Also, make sure your digital trigger
* terminal matches the Trigger Source Control. For further
* connection information, refer to your hardware reference manual.
*
*********************************************************************/

Requirements


Filename: 4672.zip

Software Requirements


Language(s): C
Additional Software: Visual C++ 6.0

Hardware Requirements


Hardware Group: Multifunction DAQ (MIO), Multifunction DAQ (MIO)
Hardware Model: PCI-6221, PCI-6221 (37-Pin), PCI-6222, PCI-6224, PCI-6225, PCI-6229, PCI-6230, PCI-6250, PCI-6251, PCI-6254, PCI-6259, PCI-6280, PCI-6281, PCI-6284, PCI-6289
Driver: NI-DAQmx 7.5

 
2 ratings | 5.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/).