LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform

Hi Markus,
it is like I assumed before; the append function works in the way that the output always is only one channel. Add a table indicator to the output which will make it more clear. If you want to append one row of data to an array during each iteration of the loop it might be more convenient to use the waveform datatype or even plain double values (Together with the function build array). Have a look at the example I posted before; it shows you how to do it.

Just one more remark to your program: In this vi you are increasing the size of an array inside a while loop. That means that the array is getting larger and larger - since the compiler does not know how often the loop is going to be executed, it cannot know how much memory must be allocated to store the complete array. This will lead to a slowdown in execution time if the loop will repeat very often. This is because if the memory LabVIEW allocated is not enough, new space needs to be reallocated during the execution of the loop, and the array has to be copied to the new memory area (array cannot be stored fragmented in memory). This can happen repeatedly, taking longer time with each run.
Possibly you are not going to notice that  - I am just mentioning it so you are aware of the situation in case you are wondering about a loss of performance. In this case consider using a for loop instead. Or initialize an array that is large enough to hold all values and instead of enlarging the array inside the loop, just replace one line after the other.

regards


Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 11 of 11
(473 Views)