Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring speeds of two shafts

I am looking for a way to measure in/out shaft speeds for a roller drive (~400 rpm) by counting pulses from 6000 line encoders (~40K pulses/sec). Because of "creep" the output speed will be ~1% less than the input, so I need to resolve better than 0.1%.

One way to do this would be to use two counter timer instruments (such as Fluke 1953A), count the encouder pulses over some time period (1 second), then import the counts via GPIB. However, I would rather use my AT-MIO-16E1 card and Labview.

My only previous counting experience with this card was a rough speed measurement on a 1/rev signal. Here I used the PFI0 input and counted with the Measure Frequency.vi. (I use a BNC-2020 board and wired PFI0 to the User1 BNC
connection.)

This example worked but I do not know how the proper counter input was selected in Labview. The E-Series manual says any PFI pin can be selected but how does one select? (Page 4-46 in May '95 manual under GPCTR0_GATE Signal.)

So I have three questions: 1) How to measure the two speeds, 2) How to understand selecting the various counters, and 3) Does this interfere with other data acquisition (measuring a couple voltage channels).
0 Kudos
Message 1 of 3
(3,818 Views)
There are several things that need to be specified here. I'll answer the last 3 questions, then go into a little more detail.

1) How to measure the two speeds?

Your MIO board contains two counter/timers, 0 and 1, which can be internally or externally clocked to 20 MHz. You can use the Measure Period VI, or count pulses VI, and configure and check each counter individually. I think that counting the number of pulses during a specific amount of time works the best. You specify which counter by wiring a 0 or 1 to the counter input. Configuring or running one counter has no effect on the other.

2) How to understand selecting the various counters?

As stated, there are only two, 0 and 1. The only designation you need in your code is to wire a 0 or 1 whenever th
e input "counter" is encountered.

3) Does this interfere with other data acquisition?

No. Analog output, analog input, and counter/timers all have separate hardware on the board, and are not effected by each other.

*Notes*

Different PFI lines can be used for counters. PFI, or Programmable Function Input, are lines that can be programmed to go to different signals as inputs, but have a defined output signal when configured as output.

Therefore, you can tell counter 1 to use PFI7 as its gate signal, rather than the default PFI4. (PFI4 defaults to counter 1's gate, but can be configured for something else). I don't see a reason why you'd need to do this, but there are examples (and I had one).

i.e. You have several signals in which you'd like to read the frequency, but the readings don't have to be high speed. You could put all the frequencies on the PFI lines, and then set the counter gate to PFI1, do a reading...then switch to PFI2, and do a reading....

Let me know if you n
eed more details.

Mark
0 Kudos
Message 2 of 3
(3,817 Views)
Would these counters be operating syncronously? I have a very similar application and I am finding that skew between the counters for each encoder(36000 pulses) is causing some eroneous results. I want to get the counters working in sync. How can I do this.... is my only option to make the measurement buffered as currently my system can do the measurement job without having to buffer the results, so I'd like to do this without adding an additional layer of complexity. Cheers...
0 Kudos
Message 3 of 3
(3,818 Views)