09-17-2007 03:48 PM
Sometimes we need to have acquisitions (with different number of acquisition points) separated by a very short time (like several tens of micro-seconds). What I did now is to
for each of those "temporally-shortly-separated" acquisitions. The problem is it misses some (actually, many) of the hardware triggers and thus I lost some physical events like a free-induction-decay.
I guess my way of programming is very inefficient in the sense that it takes quite a bit of time to create the physical channels, read from them and then clear them for every single acquisition event I have. Is there a more efficient way to programme them? In particular, I would like to have it programmed in such a way that it could do the following:
Sorry for my very long question. But I hope it's clear enough to be understood. Thanks!
09-18-2007 09:21 AM
Hello tklui,
There is actually an example in LabVIEW that demonstrates this exact application. (Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Synchronization >> Multi-Function >> Multi-Function-Ctr Pulse Train Generation for AI Sample Clock.vi)
This example is going to use a finite counter task that is retriggerable as the sample clock for the analog input task. When the counter receives a trigger, it will then create a finite pulse train. This finite pulse train will be used by the analog input task to acquire data. Once the counter task is finished generating its finite pulse train, it can then be triggered again after a small rearm time. This rearm time is dependent upon your DAQ board.
09-18-2007 12:06 PM
Robert,
I've gone through the sample you mentioned. But I still don't understand how it would work out for me. Where should I hook the digital trigger to? Ctr0 source, Ctr0 gate or Ctr out? I'm sorry I don't quite understand the counters.
Thanks a lot!
09-19-2007 10:26 AM
Hello tklui,
We are using a counter to create a finite pulse train that can be retriggered. Then we are internally routing the counter output to be used as the sample clock of the analog input task. We are controlling when we acquire data on the analog input task by turning on and off the clock used for acquisition.
The clock source of the analog input task should be the counter internal output source. Then the samples per channel is going to identify how many finite pulses are created ever time your trigger is received. The Rate is going to identify how fast your clock is going to be generated. The source of the digital trigger is going to be a PFI line. When the PFI line receives either a rising digital edge it will trigger the counter to generate a clock signal. (You can go to the block diagram and change the trigger source to analog edge if that suits your application better.)
09-24-2007 12:10 PM
Hello Robert,
I finally figured out how the retriggerable pulse train generation as the sample clock works. Thank you very much for your help. The example I should have looked at is
Hardward Input and Output >> DAQmx >> Synchronization >> Multi-function >> Multi-function-Ctr Retrigg Pulse Train Generation for AI Sample Clock.vi
instead of
Hardward Input and Output >> DAQmx >> Synchronization >> Multi-function >> Multi-function-Ctr Pulse Train Generation for AI Sample Clock.vi
Now I have another question. It looks like the retiggerable pulse train generation is for repeated generation of pulse trains with the SAME number of pulses. What should I do if I would like to generate pulse trains with different number of pulses?
Thank you very much