ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
08-31-2012 12:53 PM
I have a LVDT analog signal that I need to plot to a waveform chart for a test that is running at 5hz. The signal is very choppy and unreadable. If I slow it down to say 1hz or less the plot looks like a nice sine wave, which is what I am looking for. What can I do to acheive this at 5hz. Thanks in advance for help and advice.
08-31-2012 01:11 PM
What is the bandwidth of your signal? If it is choppy as a higher frequency, that either means you are missing parts of your signal or you have a lot of noise.
Implementing a simple moving average typically works for me, but it really depends on your system.
08-31-2012 01:17 PM
I am using a USB-9162 with a 9215 Analog input module. I am using a Daq assistant with continous sample at a rate of 10k and 1k samples.I played around with a simple moving average, doing a For loop average and doing a sample compression and collection but that made it worse. I'm not sure of the band width. It looks beautiful at a slower LVDT stroke rate. How can I buffer the signal at a higher hz to look the same?
08-31-2012 02:00 PM - edited 08-31-2012 02:04 PM
This doesn't make sense. If you're looking at the ANALOG output of an LVDT you should see the same frequency out as you used to excite the primary coil. It's the phase and amplitude that provide the positional information of the stroke. Are you sure your LVDT isn't demodulating internally? What kind is it? How are you exciting its primary?
Also post your code so we can look at your DAQ settings...
EDIT: BTW, you should need to do ANY kind of averaging or "sample compression and collection" (whatever THAT is ). LVDTs are inherently quiet and the output signal should be nice and clean if everything is hooked up right.
08-31-2012 02:00 PM
Ok, let me make sure I have this straight.
You have a LVDT sensor going into a DAQ board. You are sampling at 1kHz or 10kHz.
When the stroke rate is 1Hz, it looks good. When the stroke rate is 5Hz, it looks bad.
Is that correct?
Can you share what code you have?
08-31-2012 02:18 PM
Yes, in order to get enough data points to plot a nice readable chart in excel I am reading 2500 samples at 10000 samples per second.
08-31-2012 02:19 PM
Sorry forgot to attach vi
08-31-2012 02:43 PM
What is your frequency of the excitation? You should be sampling at well above twice that frequency.
I am noticing that you are only doing calculations on the first data point. Your conversion from the Dynamic Data should output an array of doubles.
09-04-2012 10:05 AM
I am not sure the frequency of the excitation but the trans tek power supply has a range to 400hz. Right now I am sampling 1500 samples at 100khz. The plot on labview is ok but when I write to file, I am only getting 65-70 samples per second. In order to plot the sine wave of the LVDT as it traverses in and out at 5hz, I need aboout 200 samples per second. How can I achieve this. And why should I be converting the Dynamic Data to an array of doubles, I am only reading a sinbgle scalar. I would have to index the array anyway wouldn't I?
09-04-2012 10:18 AM
@tavwtby wrote:
And why should I be converting the Dynamic Data to an array of doubles, I am only reading a sinbgle scalar. I would have to index the array anyway wouldn't I?
No you're not. Your DAQ Assistant is getting 1000 samples from 4 different channels. You are throwing away 999 samples from channel 0 and all of the other channels.