Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: how do I send a digtal pulse at a .9ms rate without comprimising my programs speed?

1 view
Skip to first unread message

ewong

unread,
Aug 13, 2008, 4:10:08 PM8/13/08
to

Jaime F

unread,
Aug 14, 2008, 3:40:06 PM8/14/08
to
Hi,

The approach you are taking right now although it may work you are depend on your OS also the DAQ assistant is intended for easy, quick code that are by no means optimal depending on your application. Which card do you have?

If you have and M series you can set a correlated Digital output where you use the counters as the sample clock, this will allow you to send the triggers exactly at .9 ms and pause the generation after the triplet. If you have a static digital input output card then you have no options for setting determinism on your generation and will always be depended on your operating system. I will suggest opening and play around with the shipped example: “Correlated Dig Write with Counter.vi” also start digging into the DAQmx low level VIs (right click the DAQ assistant and select generate code).

I hope it helps

Jaime F

unread,
Aug 15, 2008, 3:40:18 PM8/15/08
to
Hi ewong,
I'm sorry I forgot to attach the example I built with your first post. Is not a very clean code but it might help you get started. First task: (easy one)
is to generate two pulses at the same rate. Copy the same code you have for one pulse train in parallel with the first one (no wires dependency). Second with
want those to start at the same time, for that you will use the trigger capability of a counter. After you have accomplish this we will change the rate by making the
second counter output a pulse every time it counts 2 high ticks and to low ticks of the first counter.

I hope it helps


40mhz_pulse_train.vi:
http://forums.ni.com/ni/attachments/ni/170/349705/1/40mhz_pulse_train.vi

0 new messages