LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cause/bottle neck of onboard memory overflow?

Hi

 

I am using C-daq 9178.

I am reading four thermocouples (using 9213) at 100HZ with 10 samples to read in a continuous mode.I am also reading a current measurement(using 9219) at the same measurement rate .Both these measurements are in one daq assistant.

This daq aassitant is within a while loop  which processes the acquired data and decides on the required boolean data to be generated to send to a digital output channel.

Since both these activities have to be executed in real time i cannot separate these two taks into two loops .

 

There is one separate parallel while loop which measures voltage (using 9225).(the attached vi for some reason does not show the device name,but my actual vi in the lab computer is properly configured and it shows the device as 9225)

 

9213 can read upto 1200samples/sec.I was able to read at that speed 1200hertz and 100 samples to read and it did work well for some time after that there was this onboard memorably overflow.

 

So my local application NI engineer suggested me to reduce the speed to 100 hz and then the problem still persisted .

 

Later my local application engineer sugested that i should rmeove the unused USB ,GPIB and RS232 cables to increase bus speed for data trasnfer.

After doing so the error subsided for some time.

But afte that now when reading at 100 hertz and 10 samples to read the error frequency has dropped ,but still persists some times randomly.

 

Every time before i run the vi ,i need to swithch off the cdaq and then run.doing so reduces the probablility of this error happening.

 

I did read the articles and discussions on the topic" overflow". in the ni website but still i am not able to figure out the exact problem in m y vi/set up.

 

If any body can tell me where exactly the problem lies i would be very grateful.

(PS:The main big while loop has the four thermocouple and one current reading ,the separate while loop on the top reads voltage,the device names are not shown currently in side the daq assistant in thepresent pgm)

 

regadrs

Siva

 

 

 

0 Kudos
Message 1 of 3
(2,386 Views)

 


@siva0182 wrote:

9213 can read upto 1200samples/sec.I was able to read at that speed 1200hertz and 100 samples to read and it did work well for some time after that there was this onboard memorably overflow.


How long is "some time"? How many iterations of the lower while loop are you typically running?

 

One problem I see is the fact that you are building 10 arrays at the loop boundary. How large do these arrays get? Since in a while loop the final array size is not known, you might cause a lof of memory reallocations. In any case, if you forget to stop the VI after some time, you will ultimately exhaust all available memory. That's not good.

 

You should measure the loop rate inside the loop in real time. Does the loop slow down with time? Does the memory footprint increase dramatically?

 

Why does the upper loop need to ru so fast? You are only actually collecting data at the rate of the lower loop  via the local variable.

 

(Are you aware that "index array" is resizeable? You only need one instance instead of five.)

 

Message 2 of 3
(2,373 Views)

 

My lower while loop iterates about 10 times per sec and i run for about 500 secs so the no of iteraitons is about 5000.
then i swithc off the vi.wait for few mins and then restart the vi.
75 % of the time the vi rund completely without any error and 25% of the times it stops after 100 or 200 secs saying onboard memory overflow.
the array that is building up is approximately 5000 by 10 -2D  array.
Yes as you said he size is big and memory reallocations might happen but is there any other alternative.
i will check the loop rate inside the loop tomorrow..but how is it possible to see the memory usage?is it through the task manager?
the upper loop is made to run so fast because the module 9225 voltage card has certain minimum frequency at which it can operate.
thanks for pointing out that the index array is resizeable.i will modify that.

 

0 Kudos
Message 3 of 3
(2,335 Views)