NI-DAQmx: Generating a 40 MHz Pulse Train with Counter Output
Overview
This example demonstrates how to generate a 40 MHz Pulse Train using any board that has an 80 MHz timebase (6602, 6608, M Series).
Downloads
Filename: 40mhz_pulse_train.vi
Requirements: View
I. Description:
This example demonstrates how to generate a continuous digital pulse train of the maximum possible frequency from a Counter Output Channel. In order to do this, we set the counter output behavior to "pulse." In this mode, the maximum frequency that can be generated is half the frequency of the source input clock. For boards that have an 80 MHz timebase (6602, M Series), this means that you can generate a pulse train up to 40 MHz.
II. Instructions for Running:
1. Select the Physical Channel which corresponds to the counter you want to output your signal to on the DAQ device.
2. Enter the Low Ticks and High Ticks to define the pulse parameters. You can also change the Idle State to determine the beginning and end states of the output. If the Idle State is High, the generation will use inverted logic. Additionally, you can set the Initial Delay (in seconds) which will delay the beginning of the pulse train from the start call; this is currently wired to 0 on the diagram.
Note: Use the Measure Period example to verify you are outputting the pulse train on the DAQ device.
3. Select the Source of Ticks. This is the terminal that will provide the clock signal for the source input of the counter. By default, this example uses the 80 MHz internal timebase.
4. Select the Output Terminal. This is the terminal that you want your output pulse train to be sent to.
III. Block Diagram Steps:
1. Create a Counter Output channel to produce a Pulse in terms of source clock ticks. If the Idle State of the pulse is set to low, the state of the line will begin low and remain low after the generation is stopped.
2. Set the counter output behavior to pulse. This allows you to divide the input signal by a minimum of two.
3. Use the DAQmx Timing VI (Implicit) to configure the duration of the pulse generation.
4. Call the Start VI to arm the counter and begin the pulse train generation.
5. Loop continuously until the user presses the Stop button. Check for errors every 100 ms using the Is Task Done? VI
6. Call the Clear Task VI to clear the Task.
IV. I/O Connections Overview:
The counter will output the pulse train on the output terminal specified in the Output Terminal control. Please see the note on page 4-12 of the 6601/6602 User Manual for information on how to do the cabling to achieve an output of 40 MHz.
For more information on the default counter input and output terminals for your device, open the NI-DAQmx Help, and refer to Counter Signal Connections found under the Device Considerations book in the table of contents.
Requirements
Filename: 40mhz_pulse_train.vi
Software Requirements
Application Software: LabVIEW Base Development System 7.1
Language(s): LabVIEW
Hardware Requirements
Hardware Group: Multifunction DAQ (MIO), Counter/Timers (TIO)
Hardware Model: PCI-6255, PCI-6254, PCI-6280, PCI-6281, PCI-6284, PCI-6289, PCI-6602, PCI-6608, PXI-6220, PXI-6221, PXI-6224, PXI-6225, PXI-6229, PXI-6230, PXI-6232, PXI-6233, PXI-6236, PXI-6238, PXI-6239, PXI-6250, PXI-6251, PXI-6254, PXI-6255, PXI-6259, PXI-6280, PXI-6281, PXI-6284, PXI-6289, PXI-6602, PXI-6608, PCI-6220, PCI-6221, PCI-6221 (37-Pin), PCI-6222, PCI-6224, PCI-6225, PCI-6229, PCI-6230, PCI-6232, PCI-6233, PCI-6236, PCI-6238, PCI-6239, PCI-6250, PCI-6251, PCI-6259
Driver: NI-DAQmx 8.3
Reader Comments | Submit a comment »
Is it possible to do the same thing as
this VI in DAQmx Base? I need to
produce an externally clocked pulse
train in DAQmx Base.
- Anant Agrawal, Food and Drug Administration. anant.agrawal@fda.hhs.gov - Mar 8, 2009
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/).
