LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQ memory problem

I use the VI "AI One point" to measure some of my analog channels every
10 seconds. But after 5 or 6 hours of run, the system free RAM goes
extremly low and Labview hangs with an error message.

I expect that "AI One point" allocates memory at every call and doesn't
deallocate it after execution.

Does anybody have the same problem ?

Thanks for your answer.


Antoine Jacot
Engineer

Laboratoire d'électronique et d'informatique technique
Ecole d'Ingénieurs du Canton de Neuchâtel
Av. de l'Hôtel-de-Ville 7
CH-2400 Le Locle
0 Kudos
Message 1 of 3
(938 Views)
Make sure that you aren't constantly adding the new data to uninitialized
array and incrementing the size array each iteration of the loop. This
could cause the same type of behavior that you are describing.
-Tom

Antoine Jacot wrote in message
news:3A7ECE26.622DD622@eicn.nospam.ch...
> I use the VI "AI One point" to measure some of my analog channels every
> 10 seconds. But after 5 or 6 hours of run, the system free RAM goes
> extremly low and Labview hangs with an error message.
>
> I expect that "AI One point" allocates memory at every call and doesn't
> deallocate it after execution.
>
> Does anybody have the same problem ?
>
> Thanks for your answer.
>
>
> Antoine Jacot
> Engineer
>
> Laboratoire d'électronique et d'informatique technique

> Ecole d'Ingénieurs du Canton de Neuchâtel
> Av. de l'Hôtel-de-Ville 7
> CH-2400 Le Locle
>
>
0 Kudos
Message 2 of 3
(938 Views)
If you look in the "AI Sample channel" VI block diagram you will see "AI
Read one scan", which will call "AI config" every time unless you wire a
number greater than zero into it. I don't know if this is the problem but
you could try adding a front panel control to "AI Sample channel" (and of
course save it under a new name) so that you can pass your main DAQ loop
iteration number down into "AI Read one scan". Then the underlying AI
config only runs once, on iteration zero of your main DAQ loop, and the
same task ID just keeps getting reused, which is good. I notice that "AI
Read one scan" doesn't do an AI clear- at least it's not apparent from the
CIN call within "AI single scan", so you might want to add that to the
appropriate place (maybe near the end
of your program just before shutdown)
to be sure that NI-DAQ discards the task ID. I don't know if this will fix
your problem but it's easy enough to try.
- Vinny Recca

Antoine Jacot wrote:

> I use the VI "AI One point" to measure some of my analog channels every
> 10 seconds. But after 5 or 6 hours of run, the system free RAM goes
> extremly low and Labview hangs with an error message.
>
> I expect that "AI One point" allocates memory at every call and doesn't
> deallocate it after execution.
>
> Does anybody have the same problem ?
>
> Thanks for your answer.
>
> Antoine Jacot
> Engineer
>
> Laboratoire d'électronique et d'informatique technique
> Ecole d'Ingénieurs du Canton de Neuchâtel
> Av. de l'Hôtel-de-Ville 7
> CH-2400 Le Locle
Message 3 of 3
(938 Views)