01-20-2012 06:48 AM
I have a vi that acquire the signals of several pulse encoder and store it into a 1d array, and I want to move these data to a 2d array and fill it. I mean I want to acquire signal and store at line 1 of the 2d array, then acquire again and store at line 2 of the 2d array and keep going like this successively.
how can I do that?
Solved! Go to Solution.
01-20-2012 06:56 AM
Many ways... same result. The first and the last one are more efficient.
01-20-2012 07:58 AM
This and your other question leads me to ask: have you done any of the LabVIEW tutorials? To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. There are also several Technical Resources. You can also take the online courses for free.
01-20-2012 10:27 AM
@ManuSpadim wrote:
I have a vi that acquire the signals of several pulse encoder and store it into a 1d array, and I want to move these data to a 2d array and fill it. I mean I want to acquire signal and store at line 1 of the 2d array, then acquire again and store at line 2 of the 2d array and keep going like this successively.
You need to be careful with the terminology, because there are two very different scenarios:
If you know the final size of the 2D array, option 2 will be orders of magnitude more efficient, because it avoids constant memory allocations. Every time (almost) you grow an array, it needs to be recreated at a new memory location because arrays need to be contiguous in memory.
09-13-2013 04:27 PM - edited 09-13-2013 04:28 PM
sorry wrong post