05-15-2009 04:42 AM
I am reading Relative Humidity and Temperature using Hygroclip-2 (Rotronic) sensor. The VI is running OK for 24-26 hrs and after that if gives error saying Possible reason: Labview: Memory if Full
NI488: Write detected no listeners.
I am using a Main VI and in that 3 sub VI's. One for calculating JD based on system time( julian_day.vi), 2nd for averaging data over 5 seconds (average.vi) , and 3rd for opening port and getting data from the port (hygroclip.vi). I am using 3 hygroclip.vi in the main VI for 3 such instruments. I thought it may be an array issue so removed any array being used but still!! If anyone can Help!!
Thanks
Solved! Go to Solution.
05-18-2009 03:42 AM
I tried to modify the Sub VI by closing the reference in the Sub VI itself. But of no help.
Now the Error is : LabVIEW: Memory is Full
NI-488: No listeners on the GPIB
I have attached the Sub VI hygroclip.vi and the main VI HC2_sensors.vi where i am using 3 such sub VI's for reading 3 hygroclip sensors.
05-18-2009 04:00 AM
Some thoughts:
To help find the exact source of the error, make sure you wire the error cluster throughout your code. Your Hygroclip.vi subvi uses the error cluster well internally, but it doesn't pass it out to the calling HC2_2 sensors.vi.
Have you tried monitoring memory usage in Task Manager to see if the memory full error you are getting is correct?
You neglected to include average.vi, so I can't check it to see if there's any continuous memory allocation problems.
05-18-2009 04:06 AM
Thanks for your quick reply and suggestion.
I have attached the Julian day VI and the average VI ( it averages the humidity and temperature data over 5 seconds).
I have checked the memory usage in the Tsak manager. It is less than 50% and when Labview is running it occupies approx 250 Mb of memory.
Earlier I was passing the reference and error from the Sub VI into main VI. but then also I used to get the same error. Then I tried to close the reference in the Sub-Vi itself in hope that that may be an issue. But it is of no help.
05-18-2009 04:25 AM
Without getting into a discussion about the quality of the code here, I cannot see from first glance any particular reason why there could be a memory full error being raised.
Personally, I would suggest using other techniques to create your 5 point average than MathScript. A simple shift register coud be used to store a 5 element array of values, using the new value as an input, inserting this into the rotated array and returning the mean of the array as an output.You'd want to set this to reentrant to keep the three instances unique though.
I'm not familiar with Mathscript so it's not impossible that it's the source of a memory leak, but it's unlikely.
The sequence structure in Julian Day is unnecessary. The data flow will work without the need for the sequence. However, this is aesthetical, and also is not likely the source of any error.
For testing purposes, could you speed this thing up? Currently you're acquiring once per second,and it take about 24 hours to report an error, which throws up a suspicion regarding date and time. What if you put the timer to 10 ms, does the error occur within 15 minutes? If so, this error isn't date-related.
05-18-2009 04:31 AM
Out of interest, why do you coerce the data within Hygroclip.vi to two Fixed Point values, to only then convert back to Doubles in Main vi?
Also, are you aware than by placing these indicator terminals into the case structure, they will retain their old values when the case runs False?
You say you close the reference within the subvi Hygrovlip.vi, but you are only closing one reference - there are quite a number in there, it may be an idea to close them all.
05-18-2009 09:33 AM
Hello Thoric..
Thanks for pointing out the loop holes in the VI......i have patched them up 🙂
I changed the avg. tiem to 10ms but it is more than 4 hrs no error is there!! I did a 100ms loop time before and I got the same error 24 hrs after. So it seems its not the time......but something else!
"..................., but you are only closing one reference - there are quite a number in there, it may be an idea to close them all. " ?? I didnt got this point? i opened 1 port and subsequently close it at the end. So where r other references? can you elaborate this?
Also i didnt get the point about how to use shift register? I use them in Fortran but in LabVIEW 😞 i dont know truly!
05-18-2009 10:27 AM - edited 05-18-2009 10:28 AM
Ok, so the error could be related to the hardware? For the error message there were two possible sources, and if it's not the memory full error then maybe it's truly a hardware error?
There are many open references in yor vi, I would close them all to be safe:
The shift register could be implemented as below:
I haven't test this vi, but it should be enough to start you off.
05-20-2009 03:49 AM
Hello Thoric..
I have tried to make the modification as per ur suggestion.
this time the VI run for approx. 32 hrs......and the same error encountered.
i have attached the screenshots of error and memory usage. have a look.
05-20-2009 04:08 AM
Hi Aidy,
Sorry my suggestions haven't helped yet. In the WTM.jpg I see that LabVIEW is using nearly 600Mb of RAM and 770Mb or Virtual Ram. That seems like a lot to me!? Does it use this much normally? Importantly, is it using this much RAM from first launch? If this is much smaller at the start of the vi run, and slowly increases over the hours, then it is quite probably a memory issue. In which case we need to track down the source.
You show two error dialogues. One for out of memory, and another for invalid input parameters. Which occurs first? Is the second one the result of pressing Continue on the first?
It might be useful to track the exact point in the code at which the error occurs. There are a few ways to do this: