05-24-2007 01:50 PM
Ben,
What you propose to do sound extremely promising, however i do not see how to attack the task. please guide me trough this
.
the thing is that its what i was trying to do before getting into this mess. i will give you an idea of the process:
i have several timed waveforms, from which i create a data point using an action engine (thanks to you). the waveform is stored in the AE, while i get a new point every time i ask it, if the step size of the waveform is adequate.
meanwhile, some other AE creates other data points at specific request times.
if at time t no waveform is supposed to release info, then i create a 'wait' array, where every point represent a time step.
all those datasets are then picked up together to be sent elswhere. BUT, every one of the AEs are sending out actually not only 1 element, but sometimes up to several hundreds (for example the waveform AE can send info related to several waveforms that give a certain data point out, or some other AE sends up a lot of data for the specific time t).
It would not be too bad just to add the arrays one after the other, as long as they all are very short. but as they get lengthy, some elements that should occur at time t, are actually accessed for at time t+delta t, which becomes non- negligible.
a very simple solution would have be "interleave", to allow same priority for all datapoints of a specific time t.
A related problem is of course memory management: since all the arrays created in the AE are variable in size, and change every time i call them, i get 2 problems:
1) - assembling all the arrays together i need to allocate in advance an array size, that i resize once i know the output array length
2) same inside of the AE, where i create on the fly my data arrays. i need to initialize an array size, and to resize it outside.
the whole thing takes almost as much computation time as not allocating any memory for the arrays, and let LV take care of that. not to say, it is still about 20 times too slow...
on a side note however: the AE solution is one of the greatest i ever had in labview. you reinvented my way of thinking. i am now using it to the limit, with AE inside AE inside AE...![]()
05-24-2007 02:40 PM
05-24-2007 03:39 PM - edited 05-24-2007 03:39 PM
Message Edited by Matt W on 05-24-2007 03:42 PM
05-29-2007 04:01 AM
Sorry for not having reponded before, i was totally ill.
thanks Matt for the interleave. however i have decided not to use it, as it takes too much computation.
i am trying now to pick up the data "on the fly", without creating any array in advance. will see where it goes.
05-29-2007 04:07 AM
Jarrod,
thanks for your advices. i am not yet sure it will work for me, as the result of my operations actually lead to tranfering all the time data between different arrays, and i fear that it actually induce enormous computation.
if i would just have pointers...