I want to measure instantaneous angular speed using a quadrature encoder and a USB 6009. I have come across discussion threads on this question but no satisfactory answers. Request any possible assistance. Even if I can get angle measurements at regular intervals of time, that should solve the purpose. I am using a HEDS 5540 incremental encoder. Would appreciate an early reply..
Hi Vikrant and welcome to NI's discussion forums!
The 6009's counter does not natively support encoder measurements. This counter supports only basic edge counting (falling-edge) so you may be able to implement a scheme for measuring one direction angular position. Using two or three analog inputs, you could possibly create a bi-directional angular position application.
Neither of these implementations are recommended and I recommend using a device that is more applicable. These have counters with more functionality and which include native driver support for angular encoder applications. These devices include the M-Series line of products or the Counter/Timer boards.
KB 47B5TIMK: Can I Use an Analog Input for a Count Edges or Encoder Task Using DAQmx?
This document is about programming an FPGA but contains good information about the logic required in developting your own angular position app:
Quadrature Encoder Velocity and Acceleration Estimation with CompactRIO and LabVIEW FPGA
First of all, thanks for the prompt response. If it is not possible for me to get the angular speed from the set up, is it possible to get a time stamped angle measurement for rotation? is it possible for me to use the onboard clock for counting pulses? I was working on the PCI 6221 before this for speed measurements. I developed two VIs , one for generating the pulse train and the second for counting the pulses. I switched over to the 6009 for mobility...... as I had to carry out my expts elsewhere. What i did with 6221 was to get angle measurements at the sampling time that I wanted( I am looking at sampling frequencies in the range of 2000-3000Hz) and subsequently analyze the data in MATLAB 7. So even if i can get a reliable database of angle measurements at fixed periods of time(say every .0005 sec) i should be able to do the job. Please help me if you can on this aspect.
The USB-6009 is a very limited device and all angular measurements will be difficult to implement. Your technique on the 6221 will not pan over to the 6009 as it's a very different device. We do have a USB 6221 and also some bus powered M Series devices as well. The 6009 has one counter so generating a pulse train and counting it are not possible. You'll need to create the implementation for angular position yourself using the above ideas.
Been a while..... i had a few queries and was hoping you could answer them. I am now using a PCI 6221 M-series DAQ card with an HEDS 5540 encoder (500 counts/rev) for measuring the Instantaneous Angular Velocity. I'll explain the setup in brief....... I have connected counter1-out to counter0- gate and one channel of the encoder to counter0 - source. I am using the generate pulse train continuous.vi and the measure angular position buffered finite clk.vi from the Labview Examples, for measuring the angular positions at the specified sampling time. Now i'm writing the data from the second vi onto a spreadsheet file and manipulating this spreadsheet in MATLAB to give me the instantaneous angular velocity at the specified sampling time. Having found the frequency spectrum corresponding to this data, i found the results unsubstantiated and inconsistent. My questions are
a) Is this a correct and optimum method for measuring the Instantaneous angular velocity?
The answer to your questions are as follows:
a) Yes ,this is a correct and optimum method
b) It is being compared to onboard clock
d)If your sampling speed is not too high,it is a continous process.
d) Yes it is.
e) Yes ,these are the factors being affected.
every time I read these threads I cant help but nottice National instrument reps forcing users to buy another product / always trying to sell me something else and will not support a product unless you recently purchased it. A $20 arduino board and the world of arduino users are eager to see me get to the ends without spending on the means... NI needs to try to help people who already purchased thousands of dollarrs of equipment and update software repetadly or we will go elsewhere. all VIs that were contributed by users in the past are now becoming NI pproprietary VIs in new versions... thats theft!
Yes, you can, but using a cuadrature clock converter, as LS7084, that gives you a clock output that you can connect to NI6009 digital input (speed or count) and a UP/DOWN signal, to connect to other NI6009 digital input (increment/decrement counter or direction)