02-19-2014 03:02 PM
Hi I am using PXIe 6368 DAQ. Could you please let me know how should I set the divisor and Meas time to have a accurate reading for frequency reading from 160kHz to 5Mhz.
Is there a relation between eastimated frequency and divisor and Meas time? How can I set resolution?
02-19-2014 03:08 PM
sorry I forgot my other question. How can I meas frequency of multiple lines at the same time?
For example can I use the frequency of PFI0 and PFI1 if I output PXI1Slot2/PFI0,PXI1Slot2/PFI1 to the CI.Freq.Term
Thanks
02-19-2014 03:51 PM - edited 02-19-2014 03:52 PM
The X Series user manual has a good section describing the various counter frequency measurement methods and their accuracy (see Choosing a Method for Measuring Frequency here).
I would suggest to use the sample clocked method instead of the large range method for consistent accuracy and measurement times across your range of frequencies. The biggest downside is that if the input signal drops below the frequency of the sample clock this results in a hardware error and you must restart the task (this shouldn't be an issue for you since you said 160 kHz minimum, but some people get the idea that they want to measure from 0 Hz on up and don't understand why measuring 0 Hz isn't possible).
To measure multiple inputs you will need to use one counter for each input. You can do this by creating a separate task for each counter. If you use the sample clocked method you might need to use a third counter to generate the sample clock at the desired rate (or if you have a sample clock available from the AI subsystem for example and want to sync the measurements you could do that instead).
Best Regards,
02-19-2014 07:33 PM
Hi John, than you for your help.
Unfortunately all the DAQ lines are accupied and I don't think I can use any of the lines as an External clock for sample clock method
The other problem is each PFI line supposed to measure frequency of 1 DUT and 6368 just has 4 counters . Does it mean that I can max meas frequency of 4 PFI lines? I need to be able to measure frequency of all 16 DUTs ( connected to 16 PFI lines ) at the same time?
02-20-2014 05:28 AM
A quick lock at the spec told me that you migth be able to stream your 16 channels with 10MSPS ...
Critical @5MHz 😉
but with a more envolved algorythm than just counting the pulses .....
02-20-2014 09:19 AM - edited 02-20-2014 09:20 AM
The sample clock may be routed internally so that's not a dealbreaker.
@ethen99 wrote:
I need to be able to measure frequency of all 16 DUTs ( connected to 16 PFI lines ) at the same time?
People always mean different things when they say this. If you are OK with stopping/starting the tasks and stepping through each PFI line then you could use the counters (the wiring wouldn't have to change at all since you may specify the input terminal for each counter measurement). The measurements wouldn't be taken "at the same time" but within a few hundred ms or so of each other. It sounded like each input has a continuous frequency source attached to it so if this is true then it seems that sampling each input sequentially (in groups of 4 most likely) would be perfectly acceptable.
While the 6368 can accomodate up to 32 digital input lines at a 10 MHz sample rate, you'll have a rough time measuring your 5 MHz signal with any degree of accuracy using the DIO.
Best Regards,
02-20-2014 10:36 AM - edited 02-20-2014 10:39 AM
Hi John, could you please show me how can I implemnet the averaging method? I searched for it but I couldn't find any example
I might be ok with Large range method but then for any frequency value I need to change my meas time and divisor value but sounds like using averaging I don't need to change anything and I still have the least error
For example I see when the frequency is 50k then the divisor is 50 and when it is 5Mhz then the divisor is 5000. So I thought maybe I can use the following rule
frequency less than 1000---------->Low frequqncy with 1 counter
1000 to 5000..................> Large range with 2 counters ...divisor=5
5000 to 50000..................> Large range with 2 counters ...divisor=50
50000 to 500000..................> Large range with 2 counters ...divisor=500
500000 to 5000000..................> Large range with 2 counters ...divisor=5000
Could you please let me know if you think I can use these values ?
Thanks
02-20-2014 01:38 PM - edited 02-20-2014 01:54 PM
The two counter methods have generally fallen out of favor now that the sample clocked method is available with newer STC-3 based devices (though certain specific circumstances might still dictate their use). This is the sample-clocked method I was talking about (adapted to run on all 16 input terminals, averaging is on by default):
The sample clocked method does not require setting a divisor--it will give you good accuracy and a uniform sample rate at all mesaurement frequencies.
A lower sample clock rate would give more accuracy, but at the cost of an increased measurement time. In the example above I used freqout to generate the sample clock which has a minimum rate of 6250 Hz--you could use one of the other counters and go lower if you wanted to (accuracy calculations are in the X Series User Manual linked in my earlier post), iterating through all 16 channels only took about 50 ms total on my PCIe X Series.
Best Regards,