LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling by encoder pulse

Hi all,

 

I'm very new to LabView and setting up measurement equipment. I have searched the forums and if there was a solution posted, I couldn't find it.

 

I'm using a PCI 6602 to collect data from both a linear and a rotary encoder. I've been able to set up the data collection rate based on an internal time signal. What I would really like to do is collect the data at every encoder pulse. Is this possible?

0 Kudos
Message 1 of 4
(2,706 Views)
Set the sample clock to the pulse output (if you can -- not sure about the 6602).  You may need to make an internal connection to do that -- I have an example, but not here.
-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




Message 2 of 4
(2,701 Views)

Thanks for the quick response, Matt. I've made the changes and it appears that my data is sampled every encoder pulse. This has lead to another question: How do I get the time stamp for each data point? When I write the data to an LVM file, the data points are sequentially numbered. Since the speed of the motor is changing, I need to know the time between data points so that I can get back to the velocity. Ultimately I'm trying to get my data organized in a spatial domain for frequency analysis. The spatial domain will be cleaner than the temporal domain because there is only one frequency present in the spatial domain.

 

Thanks again for your help.

Stan Kulikowski

0 Kudos
Message 3 of 4
(2,685 Views)

Stan,

 

So if I understand correctly, you want to being collecting data with the 6602 when you receive an external trigger? Then once you receive the trigger you want to take collect data from the rotary and linear encoder. You might also look through the LabVIEW Example Finder (Help>>Find Example...), you will also notice that in the bottom left of the Example Finder that you can limit examples to a specific piece of hardware. If you use the drop-down box below "Hardware" it will let you add a device. You could add the 6602 and then check "Limit Results to Hardware" this will show you all the examples for that specific device. 

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 4 of 4
(2,662 Views)