05-28-2007 01:57 AM
Thank you.
Elman Izia.
![]() |
001.jpg (78 kb) |
![]() |
Position capture.vi (171 kb) |
05-29-2007 05:04 PM
Hi Elman,
I am unsure want you would like to accomplish? Are you just trying to read in the value from an encoder?
There are some shipping examples that will help you read in the values from your encoder.
NI Example Finder >>Hardware Input and Output >> Counter Measurements >> Position >> Meas Angular Position-Buffered-Cont-Ext Clk.vi
If you are trying to read at a rate of 1.36533MHz, then you might want to use another counter to generate a sample clock. Otherwise you are limited to the 80 or 20MHz clocks. If you use a second counter, you will be able to generate the exact frequency that you would like.
Here is a document that will help you connect the differential outputs of your encoder to your PXI-6602.
05-30-2007 02:20 AM
Hello Rob,
Thank you for the reply.
The purpose of my test is correct measurement of the encoder, and the ability to aqcuire the measured data to the PC.
What is unclear to me, is why the 80Mhz frequency could be not enough to filter the 1.33Mhz pulse train? The minimal pulse width that i'm expecting is 1/(1.33MHz/2)=3.8e-7sec. According to the 6602 manual the minimum pulse width can be up to 1e-7sec.
There is a difference between filtering the input and sampling the data, filters should come before the sampling data. Please take a look at the attached vi.
Izia.
05-31-2007 11:59 AM
Hi Elman,
The filter clock is used to make sure that your signal has integrity and eliminates glitches. In order for signal to be counted, it must remain high for two consecutive periods of your filter clock. There are five time bases (5us, 1us, 500ns, 100ns and programmed) that can be used as your filter clock. The programmed clock can be created by another counter and this setting will let a signal be counted if it is at least twice times the filter period.
This is a great method to help eliminate errors that can be introduced by noise, crosstalk or transmission line effects.
The TimebaseSrc property is going to select a clock to be used as the source. In your example that property is correct, you would want to use the 80MHz clock. The TimebaseRate property is going to be used to divide the clock down to specific frequency. It will divide the master clock down by an integer value and round it to get a rate that is as close to the value entered. I would recommend leaving this number as 80MHz.
The MinPulseWidth property is going to determine the clock of the filter clock. This property is going to use the TimebaseRate property to create the predefined filter clock settings. If your signal stays high for two consecutive periods of the minimum pulse width, then it will be counted.
You need to determine the minimum pulse width that is acceptable for your application. Since your signal has a pulse width of about 360ns, you might want to use the predefined filter clock of 100ns.
In short, you are creating a digital filter that will only allow a signal to be recognized if it remains high for two consecutive pulses.
For further explanation, refer to the PCI/PXI–6602 User Manual page 3-20.
http://www.ni.com/pdf/manuals/322137a.pdf