02-25-2008 11:13 AM
Hello Mystery,
The terminal count for your counter is the maximum count of your counter before the counter rolls back over to zero. Since your counter could roll over to zero during one velocity interval, you would get an incorrect count during that measurement period if you did not keep track of the counter value rolling over. I asked because I thought it was strange your counter was rolling over at the same value as your counts per revolution value.
As the RPM value of the motor changes, does the count value change? If the count value does not change, then your VI will not note a change in velocity or acceleration.
This VI is ideal for fairly high speed applications because it is counting the number of edges that occur during a known period of time. If only a few encoder pulses occur during one period of time, large errors can result if an edge is missed or added. For example if you acquire 4 edges during a single measurement period and then the next measurement period you acquire 5 edges over that same period of time, you will have a 20% difference in velocity measurements. By increasing the RPM of the measurement, you will increase the timing resolution of the measurement. This VI will return the average of your speed over the velocity interval, so if the average speed during the velocity interval is not changing you will not see a changing velocity measurement.
02-25-2008 07:55 PM
02-26-2008
06:42 PM
- last edited on
10-28-2025
08:42 AM
by
Content Cleaner
Hello Mystery,
Does the counter count up when you rotate the encoder in one direction and count down when you move the other direction? If so, whenever you read the counter, this is the current position of the encoder. Each tick on the encoder will represent an angular position. If you sample at regular intervals (using a sample clock if hardware timed counting is possible), the difference between two counts will represent an angular velocity. The count change over a period of time will represent an angular velocity. This is still the same functionality from the devzone I sent you before. The equation will need to change to represent angular velocity (the tutorial goes over RPM). Please note that if the average velocity over the measurement period (from you VI it looks like 5 seconds) remains constant, the velocity measurement will not change.
Also, take a look at the Data Acquisition (DAQ) Hardware Page. On this page you can view many of the NI DAQ products. From there you can sort by measurement type and form factor. Converting a quadrature encoder input to angular position is built into the DAQmx driver and NI even has several examples on how to do this. With many of the devices you can enable a buffered position measurement (requires hardware timing) and use this to provide more accurate velocity and acceleration measurements.