DAQmx Counter Output:Pulse Done PropertyHardware: 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.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]: 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 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
