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

Document Type: Example Program
NI Supported: Yes
Publish Date: Feb 5, 2007


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

NI-DAQmx: Retriggerable Analog Output -- LabVIEW

1 ratings | 5.00 out of 5
Print

Overview

This example shows how to use the onboard counters available on a National Instruments Multifunction DAQ device to perform retriggerable analog output. The counters are used to generate a retriggerable finite pulse train that is used as the analog output sample clock since the onboard analog output sample clock cannot be retriggered directly.

Downloads

Filename: retriggerable_ao_0001.zip
Requirements: View

 I.    Description:
This example shows how to use the onboard counters available on a National Instruments Multifunction DAQ device to perform retriggerable analog output.  The counters are used to generate a retriggerable finite pulse train that is used as the analog output sample clock since the onboard analog output sample clock cannot be retriggered directly.

II.   Instructions for Running:
1. Select the Physical Channel to correspond to where your signal is output on the DAQ device.
2.  Enter the Minimum and Maximum Voltage Ranges
3.  Enter the Counter Channel to generate a pulse train for the sample clock
4.  Select the Clock Source to be the Internal Output of the counter chosen in the previous step.  If you cannot see this option, right-click on the control, choose I/O Name Filtering …, and select "Include Advanced Terminals" 
5.  Select the Trigger Source to correspond to the terminal on which the trigger will be received
6.  Select the Trigger Edge to be rising or falling
7.  Specify the Desired Frequency of the output Waveform
8.  Enter the Waveform Information.  See the documentation of the Waveform Buffer Generation SubVI for information on each parameter.

III.  Block Diagram Steps:
Steps:
1. Create an Analog Output Voltage channel and a Counter Output Frequency channel.
2. Use the Waveform Buffer subVI to create the waveform. 
3. Call the DAQmx Timing (Implicit) VI which sets the sample clock rate based on the frequency of the pulse train, and set the sample mode to finite.  The number of Sample per Buffer corresponds to the number of samples per channel the counter output channel will produce.  Set the DAQmx Timing (Sample Clock) VI to use the Internal Output of the counter as its Clock Source and set the sample mode to continuous.
4. Call the DAQmx Start Trigger VI to set the Source and Trigger Edge.
5. Write the waveform to the output buffer.
6. Use the DAQmx Trigger Property Node to allow retriggerable operation for the counter.
7. Call the Start VI for the Analog Output task.
8. Call the Start VI for the Counter Output task.
9. Loop continuously until the user presses the Stop button. Check for errors every 100 ms using the Is Task Done? VI
10. Clear the Task
11. Use the popup dialog box to display an error or warning if any.

IV.  I/O Connections Overview:
Make sure your signal output terminal matches the Physical Channel I/O Control. For further connection information, refer to your hardware reference manual.

Requirements


Filename: retriggerable_ao_0001.zip

Software Requirements


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

Hardware Requirements


Hardware Group: Multifunction DAQ (MIO)
Hardware Model: NI 9263, USB-6251, USB-6259, USB-6259 Mass Term, PCI-6221, PCI-6221 (37-Pin), PCI-6225, PCI-6229, PCI-6230, PCI-6232, PCI-6233, PCI-6236, PCI-6238, PCI-6239, PCI-6251, PCI-6255, PCI-6259, PCI-6281, PCI-6289, NI PCIe-6251, NI PCIe-6259, PXI-6221, PXI-6225, PXI-6229, PXI-6230, PXI-6232, PXI-6233, PXI-6236, PXI-6238, PXI-6239, PXI-6251, PXI-6255, PXI-6259, PXI-6281, PXI-6289, USB-6211, USB-6215, USB-6218, USB-6221, USB-6221 Mass Term, USB-6251 Mass Term
Driver: NI-DAQmx 8.3

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