10-27-2014 07:31 AM
Hey,
Is it possible to allocate predefined RAM Memory and accumulate data's into it?
Before going in to detail – I am currently looking to write the inspection results in database for statistical analysis. I hope it will always consume some time to write it in database for each component / iteration. So decided to accumulate all the data in memory and write it at one shot.
In detail, user has to inputs the memory size via front panel control. Let us assume for writing 1 row of string information occupies “XX” bytes. (Not yet sure how to calculate memory size of 1D string array of 10 elements (max of 20 character in each string)). Dividing the user input memory size with 1 row of memory size will give how many rows we can write at maximum say “N”.
Use the for loop with “N” iteration and accumulates the 1D info to 2D array of information (auto indexing) and write it in Database at one shot.
Any help or direction may helps a lot.
Waiting for the reply
10-28-2014 06:10 AM
Hi,
Any replies on the previous post..
10-28-2014 06:25 AM
As far I know LabVIEW internally handles the memory allocation and we don't have any option to allocate it. There might be a way by using a windows dll but no direct function atleast.
As you said you are going to use the for loop, in this case LabVIEW pre-allocates the memory depending on the data type and you don't have to worry about that. For details about the memory according to the data type you can check this link.
10-28-2014 06:40 AM
Are you talking about pre-allocating for an array?
10-28-2014 07:39 AM
As mentioned, generally you dont have to manage memory in this way, but it sounds like what you really want is a simple Initialize 2D-array with some fixed string.
/Y
10-28-2014 07:01 PM - edited 10-28-2014 07:02 PM
Let see what you have.
Your discrption leaves me curios.