From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI488: Write detected no listeners

Solved!
Go to solution

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

 

 

0 Kudos
Message 1 of 15
(6,752 Views)

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.

 

 

Download All
0 Kudos
Message 2 of 15
(6,724 Views)

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.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 3 of 15
(6,720 Views)

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.

Download All
0 Kudos
Message 4 of 15
(6,716 Views)

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.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 5 of 15
(6,710 Views)

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.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 6 of 15
(6,709 Views)

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!

 

0 Kudos
Message 7 of 15
(6,683 Views)
Solution
Accepted by topic author Aidy

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.

 

 

Message Edited by Thoric on 05-18-2009 04:28 PM
Thoric (CLA, CLED, CTD and LabVIEW Champion)


Download All
0 Kudos
Message 8 of 15
(6,678 Views)

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.

Download All
0 Kudos
Message 9 of 15
(6,654 Views)

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:

  • Use conditional break points (probes that pause the code upon a problem). Place probes on the error wires within Hygroclip.vi. For each probe, select the Condition tab and set it to pause on Error. You need as many of these as you can fit to be able to capture the error at the moment it occurs. Looking at Incorrect function.jpg there are about 6 error wires that need a probe.
  • Place blocks of the code into subvis. The error dialogue will then declare within which subvi the error occurs, helping to narrow the source down a little

It would help to be able to speed up the code to encourage the error to occur sooner than 32 hrs, if possible.
Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 10 of 15
(6,650 Views)