07-06-2012 09:41 AM
VeeJay,
I pretty sure the problem is with the USB driver. I had similar problems with an application that uses a USB cDAQ chassis that runs for days on end.
07-06-2012 10:01 AM
Trying to open a Desktop Exercution NEW TRACE and it pops a dialog box that tells me to setup up some VI Server. But, the Pop up message does not give proper information on what to do. Sometimes I gotta tell ya, NI Documentation is incredibly HORRIBLE and frustrating.
07-06-2012 10:17 AM
In LabVIEW go to tools/options and select VI Server Configuration and check TCP/IP under Protocols. The port should have a default (3364 on my machine). Then scroll down to Machine Access and add 127.0.0.1.
07-06-2012 10:31 AM
I had a default POrt number. I changed the IP to one that you said. What am I supposed to see? Do I have the exe running and then open Trace Toolkit or other way around? I added a new trace (gave me the same popup againl ignored it), nothing appeared on Local Application instances even though have the executable running. Chose Remote aapplication instances with default port. (No IP address) found Main Application Instance. Started the Trace, but no data fills up in the table.
I guess I will stick to Windows TaskManager to figure out memory leaks. Thanks!
07-06-2012 10:41 AM
Ahh, an executable. I know it is possible to connect to an executable but have not done it. You have to enable debugging on the exe and configure the ini for that exe to allow VI Server to connect. It should show up in the Application or Shared Library section of New Trace Connection. Sorry that I cannot give specific instructions but you can probably find something with a search.
But it is probably easier to look at the unbuilt code. If you have the project open then you should see it under Local application instances.
07-06-2012 10:44 AM
@Steve Under Task Manager, which Memory I should look at. There are a couple options.
Working Set (Memory)
Peak working Set (Memory)
Working Set delta (memory)
memory (private working set ) etc.
I can see that Working set (memory) increases when used. when idle it stays at the same value unlike a web browser that keeps increasing.
07-06-2012 10:52 AM - edited 07-06-2012 10:53 AM
I think just working set.
07-06-2012 10:58 AM
OK working set does not increase at all when program is not being used. i.e. when application sits idle in wait state. When front panel is accessed, events are run, I see the working set increase by not by much. So I think I would have to check USB driver shutting down when idle issue.
To be more conservative, I have made the program close and reopen everymidnight, that way, there are NO memory leaks at all. Thanks a bunch Steve. Hope this solves all my probblems with this application
07-06-2012 11:11 AM - edited 07-06-2012 11:12 AM
I don't think a memory leak is the cause of your problem. I initially brought it up to answer the general question about running 24x7. There should be no problems at all as long as there are no memory leaks or unclosed references. There may be other things as well that you have to watch out for but these are the two big ones that come to mind. Other things that came up in this thread are problems due to power management and possibly connections closing due to inactivity.
I think the best thing to do is to isolate the specific error and conditions that cause it. You will probably be able to fix this in your code. But some errors are unavoidable and you need to anticipate and deal with them. One example of an unavoidable error is when using TCP/IP the server might close the connection. If the problem you are experiencing is of that nature then you could deal with that by handling the error when it happens. If you just restart the program every 24 hours and that seems to fix it then OK. But it only "seems" to fix it so don't bet your life that it won't happen again.
07-06-2012 11:58 AM - edited 07-06-2012 11:59 AM
@VeeJay wrote:
@Wayne, Yes, I am using a USB 6008 OEM card. Pretty basic one but works when it works. But, doesn't when application is run the way I want it to. (atleast most of the time, it fails and I have to close and reopen the application)
DAQmx shouldn't have any problems keeping tasks open indefinitely. TCP/IP does have timeouts.
Windows7 and serial ports... i have issues where windows decides COM7 is now COM9, even when a session is open and I'm communicating with the instrument. Have to account for that with some retries, and a close/auto-detect/reopen connection VI. Kind of a pain, but that's what you deal with in windows.
Other big thing is power management. Turn off all the power-saving nonsense. The sneaky one is all the Root Hubs in device manager, turning the power saving off in there. Uncheck "Allow the computer to turn off this device to save power"... everything on that device goes when it goes.