06-23-2009 09:31 AM
Hello:
I am using the PCI-6602 board and am somewhat new to using timer/counters. I am using the board to measure the position from a quadrature encoder.
I would like to use the 80Mhz internal timebase on the 6602 board but the LabVIEW examples will not allow that. In the example, it states:
2. Call the DAQmx Timing VI (Sample Clock) to configure the external sample clock timing parameters such as Sample Mode and Sample Clock Source. The Sample Clock Source determines when a sample will be inserted into the buffer. The 100kHz, 20MHz, and 80MHz timebases cannot be used as the Sample Clock Source. The Edge parameter can be used to determine when a sample is taken.
Is it possible to use the internal timebase for my application?
I have attached the example vi that I am using.
Thanks.
Pat
Solved! Go to Solution.
06-25-2009 10:43 AM
Hi, Pat.
The rate determines how fast the samples are acquired and put on the hardware buffer. This value is dependent on the timebase, which is specified by the source input of the DAQmx Timing VI. The default source on the PCI-6602 board is the onboard clock (80MHz). The rate must be a divisor of the source. For example, 80MHz, 40MHz, 20MHz, 10MHz, ..., would be acceptable values for the rate input.
So, the response to your question would be to remove the source input and make sure the rate is a divisor of the source. Leaving this input unwired will use the default onboard clock of the device, as shown in the screenshot below:
I hope this helps.
06-26-2009 08:48 AM
Hi, Pat.
I was mistaken in my prior post. I just realized that the counters on our 6602 devices don't have a sample clock, so you cannot use the onboard clock as the source. In order to use a clock, you will need to bring in an external clock or generate a clock from one of the other counters (this will require select the counter output signal as the sample clock source). The rate specified doesn't actually set the rate. The rate will be the actual rate of the external clock. The rate input to the DAQmx Timing.vi is simply used for the dt information when reading a waveform and setting up the input buffer size.
The Meas Angular Position-Buffered-Cont-Ext Clk.vi uses the sample clock to control the rate at which position samples are taken from the hardware and stored into the buffer on the computer. This buffer is read from when you call the DAQmx read function. If you don't configure a sample clock for a position measurement, the samples are taken "On Demand" when you call the DAQmx Read. This is explained a little more detailed in the PCI-6602 manual and I would highly recommend taking a look through this manual for more information.
Due to the fact that the 6602 has a very small onboard FIFO to store samples, the rates that you can get with a buffered position measurement may vary and are system dependent. In the above linked manual on page 2-8, you will find several benchmarks that you might find useful for an idea of the rates you might achieve with a buffered measurement. You might also take a look at the Benchmarks for Buffered Counter Input with M Series devices.