04-06-2011 10:35 AM
is it possible to reset integral function?
04-06-2011 01:59 PM
Hi edek,
can you please give some more information? Can you post the part of your code?
Mike
04-06-2011 02:58 PM
There is vi that calculates integral, derivative etc it's called time domain math or something. It calculates continuously and i want to restart it.
04-06-2011 03:05 PM
You're using the Time Domain Math Express VI?
There's an option in there that is called Calculation Mode. It has a Continuous Calculation mode and a Per Segment Calculation mode. Does setting this to Per Segment Calculation mode give you the restarting effect you are asking for?
04-06-2011 03:21 PM
No, I want continuous calculation, but i need that it calculates some stream of data then stop and calculate another stream of data separately not using value calculated from previous data.
04-06-2011 03:24 PM
Can you change it to Per Segment Calculation and divide the segments up into array subsets and then feed the express VI those segments?
Or do the same thing with one of the other integration VIs if you are having trouble with this one?
04-06-2011 03:48 PM
it's rather hard to divide data in arrays, because it's one stream of data from a/d converter and i'm not quite sure how to put it into arrays
04-06-2011 03:49 PM
Is the stream a waveform data type? If so, that has the array information in it.
If its not a waveform data type, what data type is it?
04-06-2011 04:12 PM
dynamic data
04-06-2011 04:21 PM
Convert the dynamic data to an array or waveform using the Convert from Dynamic Data express VI in the Express->Sig Manip palette. Array will give you just the Y axis values, and single waveform will give you Y axis data, dt and to.
Either way, you can use the array . For the waveform data type you'll need to unbunble the array from the waveform cluster. Then use array subset to select the pieces you want and integrate those pieces in a for loop. Shouldn't be that bad.
If you are really opposed to that, you could also try the Extract Portion of Signal in Express->Sig Manip, but I don't have experience with that.