05-19-2011 12:51 PM
Hi All,
I've gone through some discussions earlier and was not sure this reflected anywhere. Possibly due to the ease of carrying this out 😛
Now I have an Incremental Rotary Encoder coupled to a Motor. I want to measure the speed (or velocity every revolution).
I am using a NI USB 6211 for DAQmx. I have tried using CI Angular Encoder in DAQmx but the output doen't look good.
I think I am supposed to put the output to a DAQ Read and the n display the data bit. But no results.
I have also tried to divide the output by a Sampling Clock, elapsed ime, counter pulses, etc. But no satisfactory results.
Couls someone please help with a .vi of some sort?
Thanks a Lot!
Srisagar
05-19-2011 02:29 PM
You can create a timed buffer quadrature encoder task and then calculate the derivative to get velocity. Another
approach is to setup a pulse width measurement using just one of the encoder channels and convert to velocity in your code. Unfortunately DAQmx scales do not do reciprocal type scaling so you need to handle that yourself. One cool possibility is to write to a TDMS file which does support cascaded scales of this type.
http://zone.ni.com/reference/en-XX/help/371361G-01/glang/tdms_create_scalinginfo/
05-20-2011 03:35 PM
Would be you be kind enough to elaborate on the buffer-derivative method?
Thanks!
05-24-2011 08:50 AM - edited 05-24-2011 08:50 AM
Basically, you will sample the count at a constant rate and can then do post-processing to figure out your derivative. I've attached a VI that shows this. The idea is that we use one counter to generate a new sample clock so that we can control the rate at which we sample the position (Otherwise we are sampling using the internal clock, which is way too fast for this). You will probably want to smooth out the position signal you receive because the value will always be a whole number, so you'll never get a smooth derivative without some sort of filtering.
Jon S
05-24-2011 09:06 AM
Here is another example of buffered pulse width measurement
https://decibel.ni.com/content/docs/DOC-12399
If the velocity is stable then just do a best linear fit on a section of the data and use the slope as your derivative.
11-02-2024 04:51 AM
Hi
Now, this link does not work. Could you please show the example anagin? Thanks!
11-02-2024 09:11 AM
Hi Zhangfy,
@Zhangfy wrote:
Now, this link does not work.
After 13 years links tend to get broken.
(Even more so in the LabVIEW board due to several re-designs.)
@Zhangfy wrote:
Could you please show the example anagin?
Did you look for counter examples in the example finder? There are a lot of examples for DAQmx!
11-03-2024 04:52 AM
Hi GerdW
Thank you very much! I found the examples in the following link.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000004B6mSAE&l=de-CH
11-03-2024 03:59 PM
The Sound and Vibration Toolkit also ships these VIs:
If you have the SV Toolkit installed or your organization has a license for it, I would suggest using the toolkit VIs. They handle the basic calculation as well as common issues that arise when using counters (such as missing pulse or counter rollovers when using event count).
11-04-2024 02:40 AM
Hi dsb@NI
I have checked the Sound and Vibration toolkit in my NI packet manager. It has not been installed. I will try it.
Before I install it, I want to ask you.
Can I use it for the incremental encoder with Signal A, Signal B and Signal Z for the absolute position measurement?