LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data filtering for temperature measurement

Solved!
Go to solution

Hi, need help here.

 

Before i add in the filter, i get the graph like the figure "graph-1.PNG".But it's wrong because impossible the temperature will go to 30 0 30 0 31 0......

 

After i add in the filter (as shown in the " filter n graph.PNG"), the graph is look like the figure "graph-filter.PNG'. The graph move in continuously but the scale of x-axis is changed.

 

So, how can I solve this problem in order to get the graph move in continuously (wont drop back to zero) and x-axis in the correct scale (like from 0 to 50 Degree Celsius). What kind of filter that i should use.

 

urgent help!!!

 

thx.

Download All
0 Kudos
Message 1 of 11
(3,494 Views)
Solution
Accepted by topic author chuah

Chuah,

           Upto my knowledge any instrument will not give this much difference temperature, let me know how u are measuring the temperature, before applying the filter check your labview code otherwise post your code here, I can help more.

 

Siva.

Sivaraj M.S
CLA
0 Kudos
Message 2 of 11
(3,492 Views)

Chuah,

 

It looks like your problem is in the way you acquire or accumulate the data rather than a filter.

 

1. You say that the process cannot change temperature that quickly.  It looks like you may be getting one valid reading every 14 seconds and default values of zero at other times.

2. The filtered data looks like the average of your occasional real data with the zeros between.  A dt of 5E-5 seems unreasonable for a temperature system.  Why did you use that?

3. As Siva indicated, posting your code along with more information about your system would be helpful.

 

Lynn

0 Kudos
Message 3 of 11
(3,485 Views)

The incoming data from the PIC is A030.0

  B029.1

  C030.1

 

So, i can remove the initial character by using match pattern and get the value such as (030.0, 029.1, 030.1)

The problem occur in my graph since it will return to ZERO.

 

Please help me.

 

Thx.

0 Kudos
Message 4 of 11
(3,465 Views)

Holy Crap!  You have a lot of repetitive code.  You really need to wrap that up in some subVI's.

 

The problem is that you are acquiring a piece of data at a time and queueing that up.  Let's say you get Adata.  In your dequeue loop, you are simultaneously looking for A, B, C, D ...  in Match Pattern. So you get data for A, but the matches for the other letters don't happen, so you get empty strings which then convert to the default data of zero.

 

You need to use some case structures so that you only update the array and waveform graph for that particular data point.

 

PS.  Don't use a shift register for the error wire in your upper producer loop.  If you ever get an error, such as something as mundane as a timeout error on your serial read, that loop will never execute correctly again because the error will be passed from iteration to iteration thus calling future serial reads and other functions to skip their execution.

 

PPS.  The word "I" should be capitalized.

0 Kudos
Message 5 of 11
(3,457 Views)

sorry....not really understand. Can u give me a example?

0 Kudos
Message 6 of 11
(3,433 Views)

@chuah wrote:

sorry....not really understand. Can you give me an example?


0 Kudos
Message 7 of 11
(3,429 Views)

It's what your mean?

 

Sorry, i am poor in labview.But i need your help.

 

Thanks.

0 Kudos
Message 8 of 11
(3,414 Views)

No, No, No.

 

Don't keep duplicating code.

 

What you want is a single case structure that has a case for A, a case for B, a case for C, .....  In each case you do whatever data manipulation and display for whichever piece of data you just got.

 

You may want to look at a better data structure than having 12-13 1-D arrays for each channel.  I would recommend a cluster that has an element for each 1-D array.  That way each 1-D array can be a different length, but you unbundle and rebundle whichever array you want in each case.  Then instead of a dozen wires, you will only have one.

 

What you need to do is delete all of the duplicate code and just get it to work for 2 different channels in a single case structure.  Ignore all the other channels for now.  Once you get that to work, it will be easy to add the other 10 or so channels.

0 Kudos
Message 9 of 11
(3,406 Views)

I think that is something wrong. But i do not know how to connect it to the input data.

Where should I put the cluster array?

 

Thanks for your patient.

0 Kudos
Message 10 of 11
(3,388 Views)