04-11-2011 05:09 AM
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.
Solved! Go to Solution.
04-11-2011 06:07 AM
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.
04-11-2011 07:56 AM
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
04-11-2011 10:07 PM
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.
04-11-2011 11:17 PM - edited 04-11-2011 11:24 PM
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.
04-12-2011 09:06 AM
sorry....not really understand. Can u give me a example?
04-12-2011 09:29 AM - edited 04-12-2011 09:29 AM
@chuah wrote:
sorry....not really understand. Can you give me an example?
04-12-2011 11:24 AM
It's what your mean?
Sorry, i am poor in labview.But i need your help.
Thanks.
04-12-2011 12:06 PM - edited 04-12-2011 12:08 PM
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.
04-15-2011 09:30 AM
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.