07-20-2009 12:14 PM
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!!
07-21-2009 04:59 PM
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
07-21-2009 05:13 PM
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?
07-22-2009 01:09 AM
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.
07-23-2009 09:08 AM
Hey,
Try attached program which does buffered Digital count with trigger and ext clock.
Thanks
-nAyer
07-23-2009 12:14 PM
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!
07-24-2009 12:29 PM
Hey,
Here is the VI for LV 8.5
Thanks
nAyer