LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Local variable of Array of custer value increases

Hi All,

I am working in a two camera based  vision inspection system with report generation. For report generation we are taking data (Cluster of Numeric and strings in a Array). In every day there are around 50,000 data.(i.e. Index of the array reached upto 50,000). I am rotating this data by Local variabe and Built array. Every iteration I am appending the data to that array.

                    I want to know that : What is the capacity of local variabe that we are using to save the report.

                                                     :  Is it affect the other processes which are working parallely. ( Is it take more time to apend after certain size of array)

 

Actually I am faching a problem that after >=30,000 iteration some time one of the camera get disconnected.

                                     And "Remove camera" error get poped.

 

Regards...

Prakash Mahar 

0 Kudos
Message 1 of 3
(3,457 Views)

Your memory use is incredibly inefficient.

Firstly, using the build array function on such a large data set is a bad idea. The function creates a copy of the data in memory and then appends the new element.

Second, a local variabel is a data copy of the original data, so you have 2 instances of the same data in memory at the same time. Why can you not use the original data set?

 

You say you are cycling the collected data, does this mean you are writing a buffer to disk?

If you are not releasing memory, then the problem you are facing with 30,000 data points being collected will probably be related to running out of virtual memory.

 

Could you elaborate more on your architecture?

_____________________________
- Cheers, Ed
Message 2 of 3
(3,447 Views)

Why are you using a Local Variable in the first place?  You should avoid it by writing directly or by using a more suitable architecture such as a State Machine and use shift registers to pass the value to other areas of the code.  Of course I'd have to see the code before commenting, but it is likely you are using a Local Variable to receive the data in another area of the code, otherwise why would you ever use it..??..

 

R

Message 3 of 3
(3,433 Views)