12-12-2014 03:39 AM
Hello,
Can a User Interface on an RT target be made to run for long?
If I run it for long (about 30 mins), my RT target loses its connection. I get a pop up saying "RT connection has been lost".
12-12-2014 03:54 AM
I don't normally have any problems running RT VIs in the development system for extended periods of time. You could think about using remote front panels which will continue to run your RT VI and you can just connect/reconnect to it if you have network troubles.
Do you know the reason for the disconnection - is it a network issue (e.g. unreliable wifi) or could it be that your RT controller is running out of CPU/Memory and is becoming unstable?
12-12-2014 04:04 AM
I have attached a screenshot of what I get. I think I have a memory problem (The "available bytes" continuously decreases). Can you please confirm it?
12-12-2014 04:22 AM
Yes, Your CPU load is also showing as 100% which will almost certainly cause your RT controller to become unresponsive (and as such you lose connection to the front panel).
Make sure that you have no free-running loops (i.e. without some sort of execution timing) and be careful about memory usage, for example around where you use arrays or open references.
12-12-2014 07:11 AM
Yep, you have some issues with your code somewhere. At this point, I recommend posting your code and we can help you reduce that CPU usage and also likely the memory leak.
12-12-2014 07:28 AM - last edited on 04-13-2015 11:14 AM by dcarva
Hi,
Attached is my folder containing the project. I have modified the code as much as possible to fix the memory issue, but still there is a memory loss.
Hope I get to know what is eating up the memory.
I also log data onto the sbRIO. I have removed this log loop in the attached folder. (As I believe that the log loop does not cause memory issues). Let me know if you need that too.
[edited 04/13/2015 by moderator to remove confidential information]
12-12-2014 07:43 AM
Well, there is a loop inside of your Sensirion_SubVI new_one.vi that doesn't have a wait in it. You are polling the FPGA for a signal and waiting for it to go low. But you are slamming the CPU by not having a wait of some sort.
You are also loading up the FPGA multiple times. You should load it ONCE in your top level VI. You then pass it into the subVIs (like Sensirion_SubVI new_one.vi).
And since your top loop has so many waits inside of the code, you should not make that a timed loop.
12-14-2014 10:39 PM - last edited on 04-13-2015 11:16 AM by dcarva
Hi crossrulz,
Even after modifying the code according to your suggestions, the memory space keeps decreasing. I am totally clueless as to how there is a memory leak.
Attached is my modified code.
Help!
-kdm
[edited 04/13/2015 by moderator to remove confidential information]
12-15-2014 05:09 PM
you are opening multiple references to the FPGA (even inside your subroutines that do not use the open reference and don't close it.
remove them all (except one) and see if it clears up your memory leak. Even on your main VI.