LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intergral ptbypt

Hello everyone,

 

I have a difficulty understanding how integral x(t) ptbypt works.

I have a DAQ which feed me one data of analog input value at a time. Therefore it should be logical to use the integral ptbypt function.

However, upon the trial process, I found the function gave me a wrong value, or probably I implemented it wrong.

For example,

I feed the integral function with the array of 1,2,3,4,5 with dt = 1. it should give me the integral result of 12.

in the top part of the snippet, I used numeric integration which gives me correct value.

The bottom part gives me the wrong value, which I dont know why

1.PNG

Please help.

0 Kudos
Message 1 of 3
(2,422 Views)

Hi rio³,

 

you can look inside that PtByPt-Integral function to understand how it calculates its output value. The LabVIEW help says "this VI is similar to Integral x(t)", it doesn't claim to give "identical" results!

 

(It uses the formula (x(t) + 4*x(t-1)+x(t-2))/6 inside the FALSE case…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,413 Views)

okay, it seems the function used different approach.but it should give the same result, doesn't it?

0 Kudos
Message 3 of 3
(2,370 Views)