LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How come I do not get the same signal in LabView??

Basically, I want to reproduce a force curve on Nanoscope program into Labview, since labview has faster aquisition rate.

Anyways, since there are two voltage signals, I wanted to plot XY graph of them. However, I get a wierd signal that is not quite close to what I am supposed to get.

I am thinking about maybe there are some noise problem, or there is a little delay in getting the two signals (ex, the two signal is not in sync)

If anyone has similar experience or tried to the same experiment, please let me know. It would be really helpful.

Thanks.
Download All
0 Kudos
Message 1 of 9
(3,621 Views)
When you use the XY-Graph, you bundle the x-value array together with the y-value array. This creates a a list of x,y pairs according to the index in the arrays.

In your case, you're using the "Extract Waveform Graph" as the x-array, and the "Extract Waveform Graph 2" as the y-array. If the x-array was a ideal triangle curve, the XY-Graph would plot the y-values from the lowest x-value to the highest and back again.

In your case the y-values would all be in the range -0.025 - 0.1. The signal that you expect to get would only be achieved with y-values that have two significant peaks (sawtooth style).

Best regards,
Philip C.
National Instruments
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 2 of 9
(3,621 Views)
Your XY graph pretty much shows what you would expect if you plot the data seen in "Extract waveform Graph" as X and "Extract waveform Graph 2" as Y. It seems to me that your raw data is incorrect. Especially the Y data looks suspect, because it is basically constant within noise. It almost looks like your X data contains the sum of the desired x and y data (ramp-up, ramp down, resp, PLUS the peak, while the current y data contains only noise. Is it possible you have some wires crossed?

Could you show us the code? How is the data acquired?
0 Kudos
Message 3 of 9
(3,621 Views)
Mr. Philip,

Thanks for the advice; however, on the XY graph in LabView, Y-values are actually opposing sawtooth style. I am not sure it's due to the accuracy of the measurements. For some reason, I could not display less than 1/1000 in the XY graph.

Also, I tried to use filter to get a better looking graph (option - smooth, since I do not know exactly what frequency I need to use to filter the noises) but it didn't produce the graph that I am looking for. It did look better though. ;]

I'll try to scale up the voltage signal (I think the nanoscope program uses some kind of convertion from voltage signal to distance) and let you know if there is any improvements.

Thanks.


Mike.
0 Kudos
Message 4 of 9
(3,621 Views)
Hi,

I am just getting two voltage signals, though I am not sure whether their ranges are within the measurable values by LabView.

Anyways, here is my block diagram. Let me know if I did something wrong. ;0

Oh, also I added a filter before plotting the XY graph. The graph looked a bit better but I could not get the shape I wanted.

Thanks.

Mike.
Download All
0 Kudos
Message 5 of 9
(3,621 Views)
The question is how you are acquiring the data. LabVIEW will handle any level of data since it's using floating point datatypes.

How do you acquire the signal? What hardware do you use? To me, the y-signal looks like pure noise. The XY-Graph will not give you the expected signal until you are able to acquire a cleaner y-signal (sawtooth peaks).

Best regards,
Philip C.
National Instruments
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 6 of 9
(3,621 Views)
Hi Mike,

It's up to the data acquisition to get the right signal - LabVIEW can handle any signal.

If you are using Virtual Channels, make sure that you specify the correct range - not the default "-10 to 10 volts". When your signal is small, the resolution will get higher with decreasing range (the same number of bits to cover a smaller range).

If you are not using Virtual Channels you can use the "high limit" and "low limit" inputs on the "AI Acquire Waveform.vi" to define the range.

Depending on your signal level, you might consider using signal conditioning. It would be able to boost the signal strength and filter out the noise.

Read more about Signal Conditioning her
e
and here.

Best regards,
Philip C.
National Instruments
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 7 of 9
(3,621 Views)
Hi,

I just wanted to filter the y signal. Tried using smooth filtering, but didn't work well. Now, I am trying the Lowpass with 30Hz cutoff frequency; however, when I run my VI, it give me this error message

"Analysis: The following conditions must be met: 0 < f_low <= f_high <= fs/2."

If I can get better signal for y axis, I might get a better graph, as you said.

Thanks and if you know what that error is for and what to do to make it run, please let me know.

Mike.
Download All
0 Kudos
Message 8 of 9
(3,621 Views)
What needs to be checked here is your sampling frequency compared to your upper and lower cut off frequency.

For instance, I was able to recreate this error when

sample rate=50hz
Upper cut off freq.=400
Lower cut off freq.=100

Therefore looking at the condition in the error code my situation was...

0 < 100 <=400 <=50/2

We can see that I have not met this condition therefore the error has been thrown.

Finally, be careful of the obvious, make sure that your upper cut off freq. is not less then your lower cut off freq.

Hope this helps, let me know if there is any more information you need.

good luck,
Allan S.
Applications Engineering
National Instruments
0 Kudos
Message 9 of 9
(3,621 Views)