LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring two input signals simultaneously

Hello Dani,

I'm afraid I still don't understand what you mean by "phase difference" between your data. You mention that you want to acquire the data at the same time and compare the results to determine velocity. However, a linear encoder task will return data in terms of inches, meters or number of ticks; meanwhile, an angular encoder returns data in terms of degrees, radians or ticks. The number of rotations per second will give you an angular velocity (provided that you know something about the distance covered in one rotation. The linear encoder returns directional velocity based on movement in one direction or another versus time. This two are different phenomena as the angular velocity depends on the radius and measures the change in phase with respect to time. Linear velocity is merely a measure of distance versus time. I do not understand how to plan to compare the phase of the two?

One thing I would point out is that if you are trying to correlate measurements at all you will need to synchronize your operations to ensure that the data you compare is related. That means that you would probably need to share sample clocks (so that each sample is acquired at the same time) and share arm start triggers (so that the operations begin sampling at the same time). For an example of this operation I would recommend that you go to the NI Example Finder (Help>>Find Examples from the LabVIEW Toolbar) and browse to the example called Meas Angular Position-Buffered-Cont-Ext-Clk-Arm Start Trig.vi (Hardware Input and Output>>DAQmx>>Counter Measurements>>Position). This example shows how to import and external clock and use an arm start trigger to begin acquisition. If you use the same arm start trigger and sample clock source for you angular and linear position measurements, then the acquired data will be synchronized. The synchronization will allow you to correlate the data in any way that you need.

Matt Anderson

Hardware Services Marketing Manager
National Instruments
0 Kudos
Message 11 of 12
(760 Views)
Hi Matt,
 
Thank you for all your help. Now the problem looks easier for me.Smiley Happy
I don't use external clock matt but when i saw the example i have an idea to connect the task, use same timed loop and use same priority. The result when i runing the program it's look like the time also share and there are no errors. Smiley Happy
 
About the phase different that i want to measure your absolutly right. The first time i get this project i thougt about that also. How are different types of data can be compare. The result when measure the angle is sawtooth signal but when measure the linear is sinus signal. A little bit confused that time. But when i ask to my instructor, he told me the reason bla..bla..bla.. but i still don't understand. hehehe...
At the end he told me to do it first than i will understand. So sorry if i couldn't told you because this project isn't finished and i still don't know the answer...
 
Best Regards
 
Dani


Message Edited by St4mP on 04-23-2008 12:12 PM
-Keep Learning-
0 Kudos
Message 12 of 12
(732 Views)