Writing Buffered Tick Counts to a Counter Task in LabWindows™/CVI™

Updated Oct 9, 2018

Reported In

Hardware

  • PXIe-6612
  • PCIe-6612

Software

  • LabWindows/CVI

Driver

  • NI-DAQmx

Operating System

  • Windows

Programming Language

  • C

Issue Details

I am using LabWindows/CVI to try and write buffered ticks, pulses, or a variable pulse train to my NI DAQ hardware, such as an NI-6612 using DAQmx.

Solution

You can accomplish this using the DAQmxWriteCtrTicks function in LabWindows/CVI. Each highTicks and lowTicks pair corresponds to a single sample of the waveform, as shown in Figure 3-41 from the NI 6612 User Manual (below).

Additional Information

This function is different from DAQmxCreateCOPulseChanTicks in that it can accept arrays of uInt32 values which will define the number of high ticks and low ticks for each pulse in your pulse train, thereby allowing you to write multiple samples of digital data to a hardware buffer.

If you need to write multiple pulse trains or tick count values to multiple channels, you must use the dataLayout input to ensure your samples are written out correctly across the channels in your task. 

Please refer to the NI-DAQmx C Reference Help for more information on these functions and their inputs.

WAS THIS ARTICLE HELPFUL?

Not Helpful