LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

differentiation of an analogue signal

Hi all,

 

I am using Labview 8.5 along with a USB 6008 DAQ to acquire an input signal from an LVDT. The output from the LVDT is 0 - 10V which corresponds to a total displacement of 50mm. My job is to acquire the input signal(displacement) and differentiate it twice to get both velocity and acceleration. I have managed to acquire both the displacement and velocity signals but the acceleration graph is very distorted. Finally i need to acquire data for all three signals for a certain length of time and write the data points to an excel file where they can be graphed. I am struggling to find an example of writing the data from a waveform graph/chart to file. Does the data logging need to be done in signal express or can it be done with the VI? I have attached the VI which i have written. Any help with the VI would be much appreciated. I am new to the software.             

0 Kudos
Message 1 of 8
(3,404 Views)

Hi,

 

"...i need to acquire data for all three signals for a certain length of time..."

Go to LabVIEW>Help>Find examples, then search for "analog", navigate to "Acq&Graph Voltage-Int Clk.vi" and open it. This example illustrates a finite acquistion for one or more channels you specifiy with DAQmx Low-Level functions.

Acquiring for a certain time means "number of samples" multiplied with "sample rate. E.g. 1000 Samples with a rate of 1kHz gives you 1s of your signal.

 

"...and write the data points to an excel file..."

Again use Example Finder and "file" as a keyword to search. There are some Examples showing how to write a tab-deliminated textfile, which will be accepted by Excel. If it's not time critical and you can directly wire the 2D array from your acquisition to the "Write to spreadsheet file.vi" which you will find in the FileI/O Palette.

 

Hope this helps,

Christian

0 Kudos
Message 2 of 8
(3,364 Views)
Thanks alot for your help the program is working well now. I have one question though the signal coming into the DAQ is a 0-10V signal where 0 is the point at which the LVDT shaft is in and 10V volts is where the the LVDT shaft is pulled out to its fulls length, in my application i just want it the opposite way round 10V when its in and 0V when its out. I've tried to switch the input voltages but an error keeps popping up saying i can't have a min larger than a max do you have any suggestion?? Again any help would be much appreciated.     
0 Kudos
Message 3 of 8
(3,339 Views)

The DAQ measures a voltage.  Of course 10 can't be min and 0 can't be max.  If you want to inverse the meaning of it, then that is scaling.  The easiest is to subtract the input from 10V.  So 10V - x = new value.

 

 

0 Kudos
Message 4 of 8
(3,326 Views)

Hi,

 

I have tried to invert the scale of the y-axis on the waveform graph and this has changed my output waveform to increase in the way i need it only in does the exact same for the scale on the y-axis. The waveform graph now reads 0 at the top of the axis and ten at the bottom of the axis i need to change this to 0 at the bottom and 10 at the top without effecting my waveform.I have also tried to to assign my input voltage as 0max and -10min but it still makes no difference. Do you have any more suggestion or am i doing something wrong? Thanks!

      

0 Kudos
Message 5 of 8
(3,311 Views)

Hello ,Please I am having issue differentiating an analog signal.The signal output from the time domain math function(dx/dt) fluctuates within a wide range for a particular signal input.Please i need help in resolving this.Thanks.

0 Kudos
Message 6 of 8
(2,976 Views)

This is an old thread, with a completely different, unrelated question.

 

You need to post a new thread with your question.  Also post any VI that you have already tried to work with, and perhaps some data saved in the graphs as default so it can be seen what your waveform looks like.

0 Kudos
Message 7 of 8
(2,968 Views)

Hello,

I have to solve almost the same problem like you, but i have still some problems in my VI whitch i don't knouw how to figure out. Could you please show me your final VI and let me to check it? I would appreciate your help.

0 Kudos
Message 8 of 8
(2,895 Views)