From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Buffered pulse train generation with cDAQ-9181 and NI 9474

Hi,

I would like ask, is it possible to make a buffered pulse train generation application using cDAQ-9181 and NI 9474 as hardware?

 

I have an application, in which  approx. 18 bits are generated, with pulse width of ech bit varying approx. 300...500 us range. One microsecond resolution (at least 10 us) would be needed to adjust pulse width. According to specifications, NI 9474 should be capable to do it. The withd of the pulse high and low states should be varied independently. An example of the situation is shown in the figure below (figure was taken from daqmx help, Buffered Pulse Generation).

 

Buffered Pulse Generation figure.png

 

 

Is there some kind of software buffer in cDAQ-9181 orNI 9474, which could be utilized to first load this "waveform data" to DAQ memory, and the trigger it to execute to needed pulse pattern?

Do I have to use "Ready for new value"-propery to update pulse parameters on fly? I tried already this, but the result was not succesful.

Daqmx-help also mentions the use of two counters in some cases. Is this a potential solution for my case?

 

By this far, I have been succesful to produce single finite pulse (based on "Gen Dig Pulse Train-Finite.vi" LabView example in Generating digital pulses gategory) or series of identical pulses.

 

Best Regards,

Jukka

 

0 Kudos
Message 1 of 4
(6,171 Views)

Dear Jukka,

 

This should be possible, you have to take care about the different rate of array input and pulse train output.

A good design idea would be to use a "producer consumer loop" (http://www.ni.com/white-paper/3023/en/). You can find this in the template selection creating a new VI.

If you are just interested in the pulse train output you can take a look at "Counter (Buffered) - Continuous Output.vi" in the example finder.

 

Please let me know if I can help you further.

 

Regards,

 

Luigi

NINL

 

0 Kudos
Message 2 of 4
(6,123 Views)

Hi,

I was able to produce a buffered digital pulse pattern using digital waveform. See figures attached.

 

The problem in this solution is that only 10us resolution is achieved, when 1us is needed. So, 100k sample rate works, but 1000k seems not work.

 

Any suggestions for improvement?

 

Regards,

Jukka

Download All
0 Kudos
Message 3 of 4
(6,111 Views)

Hi,

I finally managed to create a satisfying solution.

 

Here's digital waveform creation (data is first Manchester coded).

 

Create waveform.png

 

Here's pulse train sending

 

send command.png

 

And front panel

 

front_panel.png

 

 

This code is used in application, in which control commands (DALI forward frames) related to lighting controls are tested (standard iec62386).

 

Regards,

Jukka

Message 4 of 4
(6,069 Views)