Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

using hardware-timed DI as trigger to start the counter on USB-6221

I am using the M series USB-6221 to try to synchronize 3 TTL input signals - 1st one as counter source (s), 2nd one as counter's sample clock (c), 3rd one as arm start trigger (t). I put the counter in a loop so the counts will be added to give a spectrum, timed by (t) as a start of every time.

 

However, this buffered edge counting cannot be realized, mostly in my opinion due to the (t) that cannot be fast enough if it is software timed. (Am I right?)

 

I am wondering how I can start the counter with the rising edge of the (t) signal every time with USB-6221 (suppose to have hardware timing DI) ?

 

I really need help on this since I have tried a lot in different ways. One way is to use (t) as another counter source - so when it changes from 0 to 1, it starts the 1st counter. But I guess this is not precise in timing. I attached the vi I made inside the loop. Please give suggestions!

 

Many thanks!!

0 Kudos
Message 1 of 7
(4,337 Views)

Hey Lewistan,

I have a question for you, What are the frequency of Source inpu, Smaple clock and the trigger. I assume you are setting up counter as an arm trigger. i.e. when you receive the trigger pulse you start counting your source signal between every sample clock cycle. If you are doing that and you are getting error the possible reason is the onboard buffer overflowed, which means you are not being able to read the data fast enough. hence what you can do is to reduce your sample clock. 

Thanks

 

-nAyer

0 Kudos
Message 2 of 7
(4,318 Views)

Thank you very much for your reply nAyer. You are absolutely right about what I intend to do.

 

I forgot to mention this but I think this is critical: the sample clock (c) TTL signal is a pulse train with a frequency about between 100 kHz - 25 kHz adjustable. The trigger TTL signal is about between 100Hz and 25Hz. I am trying with the "arm trigger property node", but this trigger seems not very accurate. I do not know if the speed of the signal transferring is fast enough?

0 Kudos
Message 3 of 7
(4,316 Views)

It is very strange. It should do correctly, but adding up counts on every channel does not give the correct spectrum. I am sure the detector and other parts are working right.

I can make the labview program run, but still the timing seems not right. also, the first channel always gives 0 counts in accumulation.

0 Kudos
Message 4 of 7
(4,306 Views)

Hey,

Try attached program which does buffered Digital count with trigger and ext clock. 

Thanks

 

-nAyer

0 Kudos
Message 5 of 7
(4,295 Views)

Hi aNyar, I was trying to open this vi but it says my LabView 8.5 cannot open this 8.6 file. Can you let me know what to do to open it? Or probably you can just give a snapshot of the block diagram?

Thanks!

0 Kudos
Message 6 of 7
(4,290 Views)

Hey, 

Here is the VI for LV 8.5

Thanks

 

nAyer

0 Kudos
Message 7 of 7
(4,279 Views)