Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Retrigger AI With Synchronized Counter in a Loop?

Hello everybody,
 
 
Having Labview 7.1, I would like to frequency sweep a counter pulse by changing its frequency with a property node in a 'for loop'. I would also like to synchronize this counter pulse with an analog input that reads a set number of samples for each frequency. After the samples specified are read, the frequency in the counter property node would be incremented and the for loop would iterate again to acquire a new set of samples in AI. Can I do this by using a re-triggerable AI and 'Is Task Done' function to know when the samples are read? Or should I put a flat sequence structure in the for loop with the first sequence incrementing the frequency of the ctr pulse FIRST and then the second reading the AI later? Any help would be greatly appreciated here!
 
-David F.

Message Edited by dfd on 07-31-2006 03:04 PM

0 Kudos
Message 1 of 4
(3,416 Views)
Hello?
0 Kudos
Message 2 of 4
(3,394 Views)

Hello David,

How many counter output pulses do you need per group of analog input samples?  If the number of pulses is the same as number of AI samples, you can use that counter as the sample clock for AI task and very easily achieve what you are trying to do. 

If you only have one pulse per group of AI samples, you are correct in thinking that you need to do a retriggerable AI measurement.  Retriggerable analog input requires the use of the counter to create the sample clock signal for the analog input.  However, setting up a counter output task to be retriggerable uses 2 counters, one to create the pulses and the other to count them so you do not have enough counters on an MIO board to do both retriggerable AI and a frequency pulse generation.

If you expect the time between sets of AI samples to be somewhat long, you could simply stop the AI task and restart it in software, using the first counter output pulse as a trigger.

I hope this helps you with planning how your operation needs to work.  Please let us know if you have additional questions.

Regards,
Laura

0 Kudos
Message 3 of 4
(3,389 Views)
Thanks Laura!
0 Kudos
Message 4 of 4
(3,366 Views)