Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

DAQmx Counter Output:Pulse Done Property

Hardware: Multifunction DAQ (MIO)>>E Series, Multifunction DAQ (MIO)>>M Series

Problem:
I am performing a finite retriggerable pulse train generation. Is there a way to get notification when each iteration/trigger cycle has completed?

Solution:
Yes! This can be accessed through different properties in LabVIEW, LabWindows CVI, Measurement Studio or the C API.

LabVIEW with DAQmx
The Counter Output : PulseDone Channel property returns a boolean value that indicates whether a finite pulse train generation has completed. This property can be accessed by placing down a DAQmx Channel Property Node on the Block Diagram and selecting Counter Output»General Properties»More»Pulse Done. The property only returns a TRUE value when a pulse generation cycle has completed. After it is read once, the property is automatically reset to FALSE.

Figure 1. DAQmx Channel Property Node

LabWindows CVI with DAQmx
In LabWindows CVI this can be acheived by using the DAQmxGetChanAttribute. The DAQmxGetChanAttribute is located under the NI-DAQmx Library»Channel Creation/Configuration»DAQmxGetChanAttribute. If you open up the Front Panel for the DAQmxGetChanAttribute you can set the Attribute for the function. By Changing the Attribute to Counter Output»General Properties»More»Pulse Done this property can be used to determine when the generation cycle has completed. The attribute help is listed below:

Constant:  DAQmx_CO_PulseDone
Data Type:  bool32
Description:  Indicates if the task completed pulse generation. Use this value for retriggerable pulse generation when you need to determine if the device generated the current pulse. When you query this property, NI-DAQmx resets it to FALSE.

Restrictions:  Not settable.

.NET with Measurement Studio
This property can also be accessed by using the Measurement Studio library. Just like with the other languages this value is reset to false when the user queries the property. Syntax is listed below:
[Visual Basic]:
Public Property ReadOnly PulseDone As Boolean

[C#]:
public bool PulseDone  {get;}

Text-Based with DAQmx
With text-based you can access this property by using the DAQmxGetCOPulseDone function. The syntax for the function is listed below and more details can be found in the NI-DAQmx C Reference Help.
int32 __CFUNC DAQmxGetCOPulseDone(TaskHandle taskHandle, const char channel[], bool32 *data);


Related Links:
NI Developer Zone: Generating a Pulse Train with a Counter
KnowledgeBase 3ZPA11IU: Using One Counter to Generate a Retriggerable Finite Digital Pluse Train with a PCI-6602 and DAQmx
KnowledgeBase 2XDHH7BG: Overview of Hardware and Software Supported in NI-DAQmx

Attachments:





Report Date: 01/24/2006
Last Updated: 05/18/2009
Document ID: 3TNBEMRM

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit