LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running an executable 24 hours

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

I may not be perfect, but I'm all I got!
0 Kudos
Message 1 of 21
(2,660 Views)
If you have no memory leaks or unclosed references then I see no problem running 24x7. Have you checked for those with the Desktop Execution Trace Toolkit? You can also check for memory leaks using the Windows task manager.
=====================
LabVIEW 2012


0 Kudos
Message 2 of 21
(2,652 Views)

I wonder if the DAQmx tasks will randomly close on you due to inactivity.  I've seen that with TCP/IP connections.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 21
(2,648 Views)

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

I may not be perfect, but I'm all I got!
0 Kudos
Message 4 of 21
(2,646 Views)

@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!

I may not be perfect, but I'm all I got!
0 Kudos
Message 5 of 21
(2,641 Views)

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?

0 Kudos
Message 6 of 21
(2,627 Views)

@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.

=====================
LabVIEW 2012


0 Kudos
Message 7 of 21
(2,622 Views)

@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)

I may not be perfect, but I'm all I got!
0 Kudos
Message 8 of 21
(2,621 Views)

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.

0 Kudos
Message 9 of 21
(2,617 Views)

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?

I may not be perfect, but I'm all I got!
0 Kudos
Message 10 of 21
(2,614 Views)