09-21-2014 02:16 PM
@brian19876 wrote:
if my que status never goes above 0 what else could be causing me to get memory full message
That would imply that you are not putting anything into your queue at all. Where are you reading the queue status?
Based purely on your example, the only thing that would cause memory to grow is that queue. You will need a not-so-simplified code set for us to diagnose your problem any more.
09-21-2014 02:28 PM
here is a copy of my code im having memory problems with i know it is messy this was one of the first things I did in labview about 2 months ago
09-21-2014 02:48 PM - edited 09-21-2014 02:50 PM
09-21-2014 03:16 PM
here is my subvi
a cluster would be better you are right
read time frome devices are aroun 2 seconds
sub vi is reentrant
Have to look into to coercion dots
dup code was trying to read from all 10 device as fast as i can
09-21-2014 03:33 PM
Actually, use an array for all of the booleans going into the subVI. You can replace most of your code in the subVI with a FOR loop. Why? Notice that all of your case structures that are strung together are exactly the same, just slightly different inputs to look at. Using an array of booleans, you can autoindex and run as many iterations as you need without any extra code. I would also then change your numeric outputs to be an array as well (autoindex output tunnel on the FOR loop).
Duplicate code = subVI (make it reentrant if needed).
09-21-2014 03:41 PM
Do you see anything in my code that might be causing a memory leak
09-21-2014 04:08 PM
As crossrulz said, arrays will simplify your code considerably. Also you seem to have an aversion to straight wires (although that may be due in part to the stupid autowiring tool).
Lynn
09-21-2014 04:17 PM
Your subVI contains missing subVIs. Why is there a coercion at the visa resource going into them?
09-21-2014 05:35 PM
I wanted to subscribe to this thread, just in case it gets interesting .
But I do have a question.
[crossrulz said:]
> since you probably don't want to be losing data. do NOT stop the consumer loop with the error by releasing
>the queue once the producer loop is complete.
If the producer loop is complete (and therefore no longer producing data), how can data be lost?
steve
09-21-2014 05:49 PM
Looks alot better and more simple than my layout but if i run this program i sent you after a hour i will use 250mb more ram and after 6-8 will get out of memory that why i was asking if you seen any where there could be a memory leak. Its driving me crazy