11-30-2005 10:39 PM
12-01-2005 06:34 PM
Hi Margaret,
12-01-2005 11:51 PM
12-02-2005 05:10 PM
Hi Margaret,
The for loop is not going to help you with the rates of the acquisition. I recommend going back to the original example program. With counters, the acquisition rate is going to depend how fast the while loop executes. You can use a couple of tick count functions to see how fast the while loop executes and apply that to your program. For example, you can have one tick count outside the loop connected to a shift register and one inside connected to another shift register and you can simply subtract the two values. However, this is not going to be 100% accurate. I would post an example of what this would look like, but you would not be able to open it in LabVIEW 5.1. Let me know if you would like a screenshot. I hope that you find this information helpful.
Regards,
Hal L.
12-02-2005 10:59 PM
12-05-2005 03:36 PM
Hi Margaret,
I think that there is one way to obtain a count every 20ms. What you will need to do is:
1. Generate a 50 Hz pulse train
2. Connect your signal to the a counter source
3. Connect the 50 Hz pulse train to the counter gate
4. You will obtain a series of counts over a 20ms period and you will be able to determine the frequency of the signal using post processing by dividing the count # by 0.02.
I noticed that you are using LabVIEW 5.1. This version of LabVIEW is no longer supported. I highly recommend upgrading to a newer version of LabVIEW. This will allow you to program with the DAQmx driver and creating your application with this driver would be significantly simpler and take a lot less time.
If you do not want to try this method, then I am attaching the screenshot for measuring the time the while loop takes to execute. I want you to know that the overall time will not have an effect measuring the signal's frequency. There really isn't anything you can do to decrease the execution time for the counter. I hope that you find this information helpful.
Regards,
Hal L.
12-21-2005 07:58 PM
12-22-2005 01:03 PM
Hi Margaret,
As I've said before, the versions of LabVIEW and DAQ that you are using are no longer supported. I checked the AT-MIO-16F-5 specifications and you can use DMA transfers with this board. DMA is the default transfer method for the current DAQ drivers. So you would not have to change anything to use DMA transfers with the latest versions of LabVIEW and the DAQ drivers.
There is not VI that obtains more specific time than the tick count.vi. The clock on the computer that the tick count.vi obtains the time from only has 1ms resolution. So, this isn't a limitation of the VI itself, but of the clock on the computer. I hope this helps.
Regards,
Hal L.