LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help: Cannot filter a text based graph

Solved!
Go to solution

Hello everyone,

 

I have a text file which I am using to generate a graph and it works well. However, when I try to wire this array to a Build Waveform it shows a broken wire (as shown in the image below).

 

I added the Build Waveform because it didn't let me filter the signal directly from the array. I found that solution here http://goo.gl/wjacvO

 

How could I filter my signal using this function? Thanks in advance.

 

 

 

filter text based graph.JPG

0 Kudos
Message 1 of 10
(4,031 Views)
You can't wire a 2D array to the Build Waveform or to the filter function. You need to use the Index Array to get a specific row.
0 Kudos
Message 2 of 10
(4,016 Views)

@monkaren wrote:

 

 

filter text based graph.JPG


 

 

And please don't copy my code in the upper right. 😄

 

(If you don't understand what I mean, look here.) 😄

 

0 Kudos
Message 3 of 10
(4,001 Views)

I tried that, but then the error Analysis:  The following conditions must be met:  0 < f_low <= f_high <= fs/2. appears and it's not filtering anything. I already added t and dt, so it is supossed to be working well, right?

0 Kudos
Message 4 of 10
(3,990 Views)

Smiley Very Happy guilty! haha I'm a total beginner here, please bear with me. Great cartoons!

0 Kudos
Message 5 of 10
(3,987 Views)

You code doesn't have a t0 value written.

Your error has something to do with your filter settings. Right-click the filter to see what the settings are.

Supply us with some data so we can help more. Add another waveform graph to the output of the Filter express VI so you can see the filtered signal.

Filter Spreadsheet.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 6 of 10
(3,980 Views)
You have not attached your data file so it's impossible to say what might be wrong. Instead of the first row, you may need to index a specific column.
0 Kudos
Message 7 of 10
(3,962 Views)

I'm sending both the .vi and the text file I'm using.

 

Thanks guys.

Download All
0 Kudos
Message 8 of 10
(3,955 Views)
Solution
Accepted by topic author monkaren

FYI, you should set default values to where you have them working when you're sharing code. Your delimiter is "\s" and I have no idea what your dt value is.

You need to play with your cutoff filter to match your data rate. It was set to 100.

I made it work with 0.1 dt and 0.5 cutoff:

Read from text.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 9 of 10
(3,946 Views)

It works nicely! Thank you for your help James.

 

All I have to do now is to figure out why it works under these parameters.

 

Best regards.

0 Kudos
Message 10 of 10
(3,931 Views)