Correlated Digital I/O Waveform Generation

Updated Jan 18, 2018

Reported In

Driver

  • NI-DAQmx

Issue Details

I want to generate digital data with a specific pulse width that is correlated to a specific timing signal, how would I do this?

Solution

To create a correlated digital I/O task, you will need a clock signal of some sort. For instance, you could use a counter output pulse train as the timing source for the digital task. This clock signal's timing will specify the pulse width of the digital waveform depending on the frequency of the counter pulse train, with the resultant pulse width being equal to the period of the pulse train or the inverse of the frequency.

To specify the pattern of the digital waveform, you must create a boolean array and convert it to a digital waveform using the Boolean Array To Digital VI.  This array will specify the high and low pattern of the digital waveform. The number of columns in the boolean array will correspond to the number of lines that you are outputting on.

You can consult this example for more guidance.

Additional Information

Not all DIO devices are capable of supporting correlated digital I/O tasks. See the Related Links for additional information on what devices do and don't support this functionality.

WAS THIS ARTICLE HELPFUL?

Not Helpful