LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I integrate with the limits I want?

I've tried your vi and i doesn't work good because i put to 32 to 77 and was the same area if i put 32 to 45

 

i add you the samples if you want to try it

 

thanks for the help 🙂

 

 

0 Kudos
Message 11 of 19
(873 Views)

Yes, you are right, (stupid error #49) I forgot we were thresholding on the X values, not the Y. X is always increasing so remove the array reversal and the logic for subtracting the index from the size of the array.

 

Mike...

 

PS: Don't lose the original code because you will need it someday when you are thresholding on the Y values. The issue is the way the threshold function is defined. It always looks for a point on a rising edge. Come to think of it, unless the pulse always occurrs in the exact same place in the dataset everytime you may end up needing to threshold on the y values anyway.


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 12 of 19
(855 Views)

Srry I'm spanish and my english is very bad... I did what you say now and I think it did bad the calculation of the integral

 

because if I put the limit 40 to 60 says a result 15.633 and with other program it's not labview I put this limits and is 12.205

 

I add the image what I did...

 

thanks a lot :)))

0 Kudos
Message 13 of 19
(849 Views)

you still need one subtraction. take the index coming from thresholding on the "b" value and subtract from it the index coming from thresholding on the "a" value. you need to calculate the number of elements to include in the output array. check the help on the array subset function.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 14 of 19
(840 Views)

If it's like this it happens the same error that I said 

 

:S

 

 

thanks

0 Kudos
Message 15 of 19
(837 Views)

 

I calculate an area of 14,588 within the range 40 - 60

 

0.PNG

 

 

 

and an arfea of 15,678 within the range 37 - 77

 

2.PNG

 

 

what kind of integration method does your other program use?

 

 

 

Regards,
Alex

Download All
Message 16 of 19
(822 Views)

First of all thank u for the help Mike and Alex,

 

I use an excel program which you can see the results that I add if I put 40 to 60 it's 12..the area ..

 

And I think it's a good result i couldn't understand.. lol

 

thanks 🙂

Download All
0 Kudos
Message 17 of 19
(819 Views)

I have been sitting here trying to figure out why my data didn't look as nice as yours or Alex's - an then I realized that being Spanish you are using a comma to delimit the decimal places... Serves me right for mot looking at the data before I plot it...

 

Something to remember about Excel is that it doesn't calculate in the exact same way that LV does, and typically gives you a lot less control over the process. So don't be surprised if values don't exactly match, especially when there are a variety of ways to do something - like integration.

 

So you are good now?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 18 of 19
(810 Views)

I think you're right....maybe this is the problem...because the excel calculates different the integration 

 

 

Mike ...alex thanks for your help now I give us some kudos Smiley Very Happy

 

0 Kudos
Message 19 of 19
(805 Views)