LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does integral function sum all data in the buffer, or just the last point?

Hello,

 

My question is probably easily answered. I am using hardware timing on a cDAQ to measure analog data, and plotting the results on a waveform chart. Being that it is hardware timed, and set to "Continuous Samples" it is a buffered communication. The waveform chart displays all data in the buffer, but a number indicator seems to display only the last piece of data in the buffer (correct me if I'm wrong). That's all fine, but my question is, if I use the integral function to sum the data over time, will it integrate across all of the data points in the buffer, or will it use only the piece of data at the end of the buffer? I would hope not the later, as this would mean the integral function is dependent on the software loop time, and has much lesser resolution than if it uses all the data.

 

Thanks!

Ryan Kelly

0 Kudos
Message 1 of 7
(3,056 Views)
You are going to have to at least attach an image of the block diagram. How many samples are you requesting? What is the data type being returned? Hopefully not the evil dynamic data?
0 Kudos
Message 2 of 7
(3,051 Views)

Sorry, I have attached the VI. It is dynamic data..This VI was only made to test this concept. I currently have it set for 100 samples at 1kHz sample rate continuous. There is also a button to reset the integral to 0, which works fine, you can disregard that part.

 

Thanks,
Ryan

0 Kudos
Message 3 of 7
(3,037 Views)

Please attach the actual VI.  If you are using Express VIs (the big, blue, configurable functions), then a picture just won't work in telling us what is happening.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(3,033 Views)
One reason dynamic data is evil is that it allows you connect a chart and display an array and also connect a numeric indicator and display a scalar. This hides the actual underlying data type. The integral will process the 100 samples you pass it.
Message 5 of 7
(3,029 Views)

Where did that Integral Reset.vi come from?  Can you attach it as well.  It's really hard to figure out what is happening without all of the code.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 7
(3,020 Views)

Excellent I figured that it was, just thougt I'd make sure. I think I see why dynamic data could be evil.

 

The integral reset came from: http://forums.ni.com/t5/LabVIEW/reseting-integral-function/td-p/434517 so it's the normal time domain function, all i did was the right click, show front panel, and add the link on the connector pane.

 

Thanks guys, this was helpful.

-Ryan

0 Kudos
Message 7 of 7
(3,010 Views)