07-06-2012 08:23 AM
Hello there,
Is it advisible to run an exe application 24x7? It is actually being used only a couple times a week for an hour each time. But, the reason it runs 24x7 is because it is a driver application and I want to simplify the experience for the end user so that they don't have to do additional steps by opening the driver everytime.
Basically, when it is not being used, it sits in a "wait" state and when they are ready to use, another programs signals my application to start state. Problems I am seeing are that some channels are erring as soon as they start, but closing and opening the program again makes it work right.
Effectively, DAQmx resources are opened when the program is opened and they are not closed at all, unless someone actually closes the exe and opens it again. Any suggestions? Hope this is clear. Thanks!
V
07-06-2012 08:38 AM
07-06-2012 08:48 AM
I wonder if the DAQmx tasks will randomly close on you due to inactivity. I've seen that with TCP/IP connections.
07-06-2012 08:48 AM
What would I be looking for? Just the memory being used by my application itself or any other parameter. Would you mind elaborating a little bit, I would really appreciate it. Thanks!
V
07-06-2012 08:50 AM
@crossrulz, you have worded my exact problem beautifully. 🙂 I have been figuring out the best way to pose my question. That would exactly be my question. Any inactivity on daqmx, would it respond immediately after maybe 5 days of inactivity? Thanks!
07-06-2012 09:18 AM
VeeJay,
I have apps that use DAQmx PCI cards that run all the time with no problems. Are you by chance using a USB DAQmx device?
07-06-2012 09:20 AM - edited 07-06-2012 09:22 AM
@VeeJay wrote:
What would I be looking for? Just the memory being used by my application itself or any other parameter. Would you mind elaborating a little bit, I would really appreciate it. Thanks!
V
Just find your application under the processes tab of Task Manager. Note the memory usage and then look at it again later to see if it is increasing. But from the description I don't think that is your problem.
Connections closing due to inactivity is something to look at. I don't have DAQmx but maybe there is some kind of timeout that can be set to -1.
Are you opening a reference and holding it open 24x7? Maybe it would be better if, when signaled to start, you open the reference and then close it. If that isn't it then take a look at the specific error. If it is some kind of invalid reference error you could reopen it.
You can get away with unclosed references a lot of the time and not notice any problems. But with something that runs all the time you really want to make sure they are being handled properly. The Desktop Execution Trace Toolkit will show errors and unclosed references. It comes with the LabVIEW-2011 Developer Suite and used to be a $1,000 addon. If you don't have it you can get a thirty day trial.
07-06-2012 09:21 AM
@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)
07-06-2012 09:24 AM
VeeJay,
Most likely that the USB driver is being unloaded because the pc goes into an idle or standby state. You can configure the pc to always stay "awake" and prevent the drivers from being unloaded.
07-06-2012 09:26 AM
I will try the options you have suggested. Very valid suggestions. I am trying to figure out if it is a software related issue or hardware USB related one as #crossrulz pointed out.
Yes, my references are opened outside the while loop before starting the first iteration and they are open throughout 24x7. I have to experiment with opening and closing DAQ channels within while loop. Although, last time I did that using "daqmx reset device" function, it closed all the channels and had to close and reopen the program again.
If I have a STOP state, can I place "STOP" task inside that case, and have a "START" task in the reset case of my SM?