06-30-2009 06:37 AM - edited 06-30-2009 06:39 AM
Hi, Everybody!
I use USB 6008 to measure speed of a motor feedback encoder. I want to display velocity on labview. to do it I count pulse in a sample time (example 1 second). I wrote a code to test, but it has problem. Would you please see it and help me to do it. I used LabView 8.5. Thanks! Funny.
07-01-2009 09:35 AM
Hi aludlak,
What errors are you seeing when you run this code? You might try running the example program Count Digital Events.vi . This is located in the Example Finder at Help >> Find Examples. Once the Example Finder is open, select the Browse tab in the top left, then double click on Hardware Input and Output >> Counter Measurements >> Count Digital Events >> Count Digital Events.vi. Does using this example count the digital events from your encoder? This will allow you to count events up to 5 MHz.
07-02-2009 06:43 AM
Thanks jschwartz!
I can count pulse from encoder. My work, I have to convert mumber pulse counted to speed of motor. So now I want to take a quantity pulse in a sample time then convert them to speed of motor. For exsample: my encoder 100ppr, in 20ms I have count mumber pulse => convert to speed => and display speed on LabView, it will repeat that work after each 20ms. I hanven't any idea to do it. please give me some methos.I thinks you understand my problem I want say. Thanks all.
07-06-2009 02:11 PM
Hi aludlak,
If you count pulses for 20 ms, then the number of pulses you get will be X pulses/20 ms or X/20 pulses per ms. To get this in rotations per ms, you can multiply by 1 rotation/100 pulses. You now have rotations per ms. If you multiply by 1000 ms/s, you now have rotations per second. To get rpm, just multiply by 60 seconds/min.