01-08-2008 11:48 AM
I am trying to read DAQ data from an external triggered events at 280Hz, and the data needed lasts about 2.8msec each evet, and I wish to analyze (average) the data at the same rate. The normal sequential Vi will spend about 1msec for average/analyze the data, and therefore I will be dropping events.
I wish to read the new data while analyze the previous data, so that I could achieve the full 280Hz rate. After consulting our regional NI engineer, I was referred to use the Producer/Consumer template.
Enclosed, I attached the Vi LIB that I did using Producer/Consumer template with LV7.1.
The DAQ is external triggered at 280Hz, and each DAQ last about 2.8msec. I wish to be able to read and average the DAQ at maximum DAQ rate of 280Hz.
I measured the time to finish 10K averages, and trying to see the time difference when I changes the content in the Producer/Consumer
I found that if I remove the Plot in the Consumer, the time to finish 10K averages dropped from 48 seconds to 38 seconds. If I also remove the “0 delay” in the Producer(not in this vi's producer loop now, but was there originally from the NI template), the time dropped from 38seconds to 36 seconds. So, looks like both Producer and Consumer are rate limiting factors in this design. But, suppose the Producer should keep on producing without considering the Consumer’s speed? I wonder if the Queue is set up correctly?
01-09-2008 05:57 PM
01-09-2008 09:02 PM
01-10-2008 02:02 PM - edited 01-10-2008 02:03 PM