I am using cDAQ 9174 with a NI 9401 to measure period of an encoder. The attached vi measures period, and calculates an average value of 15 periods and writes the average to Excel so we can see the history of the motor movements. I am having a lot of trouble getting smooth data, and I see no reason why I should be getting all kinds of ups and downs in the data...the period should be very consistent, but, it is varying by as much as a few hundred per cent, so, clearly something is wrong. Our encoder is mounted on a carefully constructed bearing/axle that has less than 2/10,000 inch wobble, so, we believe that the mechanical system should be quite good, and the rpm is actually quite slow too, probably less than 100 rpm, so, the encoder is certainly not turning quickly, and neither is the axle, which is only 2mm diameter.
So, I decided to try an experiment and see what values I get for average encoder period with the motor OFF, and they are almost the same as what I get with the motor ON!!!! Is this the actual time of a WHILE loop in my VI? Is my encoder moving too slowly for the counter in the cDAQ chassis? I believe my encoder is 120 counts/revolution. See the attacahed .jpg of the two graphs. Can anyone offer some advice how to get reliable period values from this system? It is confusing me enormously. The Excel charts show the average value of period collected over time in units of seconds on the y-axis.
Thanks,
Dave