Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

data acquisition with encoder

I want to acquire the radial run-out of a rotating spindle using a capacitive sensor. To do so I will use the LabView v. 7.1. The PCI-6036E card from National Instruments (NI) will be used for data acquisition. The spindle turns at 100 rpm and a rotational incremental encoder fixed at rear of spindle provides 1024 pulses/rev. The encoder gives two types of digital pulses as follows: a) A-quad-B pulses (it will be used only one of them, i.e “A” or “B”); b) index pulse (one pulse per revolution). There are two methods to acquire the data through that card, namely: 1) Driven by encoder; 2) On the basis of time, by means of sampling rate of the card.

In case “1”, every 2 pulses type “A“ or “B” of the encoder, the card acquires one sample. This is the default behavior of the NI card. Thus, 512 data/rev are acquired. I want to sample 5 consecutive revolutions of the spindle. In order to start and end the sampling process at the same point, it will be utilized the index pulse of encoder. Thus, the VI of LabView should count this pulse by means of a loop so that the data acquisition finishes when the number of revolutions is equal to 5. By contrast, the programmer also can count the number of pulses “A” or “B” equivalent to 5 consecutive revolutions of the spindle. However, to start the sampling process, it is necessary to read the first index pulse of the encoder. This will mark the start point.

In case “2”, the data acquisition is based on the sampling rate of the card (Ksamples/s). So, let us suppose that I want to acquire 500 data/rev. As already said, the spindle rotates at 100 rpm. This means that the spindle takes 0.6 sec to complete one revolution. Thus, the required sampling rate is Fs = 500 samples/0.6 s = 833 samples/s. So, I should set the card through LabView (inside VI) so that it samples only 833 data/s. Therefore, I will have to reduce via LabView the sampling rate of the analog-input channels in use. For example, let us suppose that the card provides 100 Ks/s when operating in multiple channels. Let us admit that there are 4 analog-input channels in use. So, the scan rate per channel is 25 Ks/s. This is too much for this application. I only need 833 samples/s. So, I should program the VI so that the card provides that required sample rate. As said earlier, I need to start and end the sampling process at the same point. Thus, to do that the index pulse of the encoder will be used. Also, I want to sample during 5 consecutive revolutions of the spindle. So, by means of a loop in VI, I should count the index pulse of encoder until the number of pulses be equal to 5 (= number of revolutions). At this instant, the sampling process should be stopped.

In case “1” and “2”, firstly, the sampled data should be put in a buffer. After, the sampling process is finished, this data should be saved in a file of LabView.

Questions:

1)     Could you make a VI for case “1” and “2”, separately, please?

2)     How to program the NI card via LabView in order to sample data triggered by the rotative encoder (pulse “A” or “B”)?

3)     What should I do to stop the data acquisition at the end of 5 revolutions for cases “1” and “2” above?

4)     Could you send examples (VIs) similar to my problem above?

 

In anticipation, thank you very much for any help.

                                                                                      Marcelo

0 Kudos
Message 1 of 1
(2,934 Views)