LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

precision not align with excel calculation

Solved!
Go to solution

haha. i have been thinking about it for a about a month.

i just joined a new company so i am getting all the things up and running.

i dont have labview installed till yesterday so i cant be trying out my ideas.

but anyways...

the ideas i came up with is to read the data 

of one column

if the temperature changes from 24 to 37 for instant...

24.6
24.6
24.5
24.4
24.4
24.5
27.7
29.4
30.5
31.4
31.9
32.1
32.6
33.1

 

step 1

(from element 100-300)

 

around 24.5 and 27.7 is when the temperature jumps about 3 degree....

so if you see a jump of >3 degree of the averages then you would take the data previous to it as the average?

 

 

 

but then i would run into another problem.

step 2

from element (1000-1200)

around

 

24.3
24.2
24.4
28.5
29.7
31.2
32.2
32.8

 

 

how can i tell labview to say..hey..give me the data of the previous averages before that jump?

 

 

Best regards,
Krispiekream
0 Kudos
Message 11 of 21
(1,315 Views)

Do you have the data all at the same time or doy ou only have one point at a time?

 

You can look through a lightly filtered data set for a certain jump and then record the index.  Values from that index-1 back to index -N are the data points you are looking for.  After that it's a case of "Array subset" and bob's your uncle.

 

Shane.

Message 12 of 21
(1,310 Views)

You can use the ptbypt linear fit with a length of e.g. 200 and detect when the slope is close to zero. The intercept will give you the local temperature average. Peaks in the slope will give you the temperature jumps. The midpoint would be half the history lenght back.

Message 13 of 21
(1,308 Views)

ideally, 

i would like to stream the data live and provide it live.

but i can wait till the test is over to calculate the averages when i have all the data at one time.

i just dont want to be restricted to 200 elements..

what if i want it longer...400 , 600, 1000, etc.

 

thanks for both sugguestions..i will look into the ptbypt linear fit function.

Best regards,
Krispiekream
0 Kudos
Message 14 of 21
(1,300 Views)

Untitled.png

 

i am using labview 2010.

the linear fit ptbypt.vi will not connect to my array?

 

Best regards,
Krispiekream
0 Kudos
Message 15 of 21
(1,287 Views)

Untitled.png

Best regards,
Krispiekream
0 Kudos
Message 16 of 21
(1,276 Views)

ptbypt VIs operate on singe points as they are measured and keep an internal history of recent points. read the help!

 

In the second image, the two array have different lenght and the error message tells you exactly that. No mystery there either. 😉

0 Kudos
Message 17 of 21
(1,271 Views)

Here is a way to do what I think you may be trying to do.  I saved this back to LV 2010 from a later version. I did not get any warnings or errors so it should work.

 

It finds the transitions or steps in the raw data. Then it extracts a segment of user specified length from the data before the step. For each segment it fits a straight line to the data. The slopes and intercepts of all the lines are listed and a plot shows the raw data and the fitted lines.

 

This does not do any error or sanity checking. For example if a step occurs very close to the beginning of the raw data, it may not handle that well. Try it with a segment length of 500!

 

Lynn

Message 18 of 21
(1,254 Views)

 

johnsold, 

thank you!! i think thats exactly what i am looking for!!

i am going to have to study this code because i i have no idea how you do it yet.

 

last question?

what if i dont know the segment leght, can it be done if it is unknown?

for now, its a known variable because i test it every 30 secs.

 

Best regards,
Krispiekream
0 Kudos
Message 19 of 21
(1,244 Views)

Krispiekream,

 

Yes, maybe. If your data is always nearly horizontal during the parts you want to analyze, you can vary the segment length until the slope changes beyond some limit. Depending on how much knowledge you have of the behavior of your system, this could be a relatively simple process or very difficult.

 

Lynn

0 Kudos
Message 20 of 21
(1,237 Views)