LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

(Reference#3123798) Server logging application

Hey MicV,

 

did you already try the trick with the open and closing front panel? It really sounds like Windows is setting the thread your application is running on idle after a couple of hours.

 

From what I can see from other forum posts, the only way to prevent this is making certain user actions windows will recognize as activity on the program.

Opening and closing the program should be recognized as such an action (like moving the mouse on the front panel etc.)

 

If you don't know how to write the code to do this I can also make a small example for you.

 

Andreas

Andreas
CLA, CTA
0 Kudos
Message 11 of 18
(842 Views)

Hey Andreas,

 

I have tried it with the sub vi that is getting the samples. It comes up when it is getting a sample and closes after it is finished.

But it still freezes after 1846 samples and goes further if I look the other day on the PC.

But if You have a small example I would like to try it, maybe that I am missing somthing in my program.

 

MicV

0 Kudos
Message 12 of 18
(840 Views)

Hey MicV,

 

I don't that opening and closing the FP of the subVI should work the same, as it is the main VI which is stopping.

 

I have created a little code snipped which should do the trick if placed on the block diagram of the main VI.

It is essentially minimizing and maximizing the FP every time the specified time has elapsed.

MaxMinFP.png

 

Andreas
CLA, CTA
0 Kudos
Message 13 of 18
(832 Views)

I have tried the snipped VI code but the result was not good.

I started the program at 06-04-2018 11:10 and I am logging every minute and after 753 points at 06-04-2018 23:42 it stops logging.

And this morning I was looking at the PC were the program is running and the program goes on.

Every time the program goes through the timer-loop (one second) a couter is increased by 1 and logs the countervalue in a separate file.

At 06-04-2018 23:42 the counter is 45083 and this morning it goes on at 09-04-2018 08:22 the counter is 45084 and increases every second.

What is going wrong?

0 Kudos
Message 14 of 18
(817 Views)

Hi MicV,

 

It still looks like Windows 10 decides to put your application to sleep and I have also no clue why this is happening.

The only thing we can try are different tactics to prevent this and my previous idea is clearly not working.

 

The next thing we could try would be to let your computer automatically click on your front panel to simulate user activity:

- there are a couple of mouse jigglers to keep your computer awake: https://www.cnet.com/how-to/how-to-keep-your-computer-awake-without-touching-the-mouse/

However, I am a bit afraid that those will not work as they only keep awake your computer and not necessarily a particular program.

- You could also try to use the following example to let your computer do the clicking automatically. Choose a spot on your front panel which is unoccupied and let it click there to keep it awake.

http://digital.ni.com/public.nsf/allkb/9BB3211F3469623649257360000E272C

 

 

By the way: Did you try to run the application on a different computer? It would be useful to know if the program only stops on this particular computer.

 

Andreas

 

Andreas
CLA, CTA
0 Kudos
Message 15 of 18
(811 Views)

Hi MicV,

 

Did you try any of the suggestions from my post?

Have there been any improvement over the last week?

 

Andreas

Andreas
CLA, CTA
0 Kudos
Message 16 of 18
(806 Views)

Hi Andreas,

 

Finally I have tested the program on another PC (standalone) without all workaround and it worked well for more than 70 Hours.

Problem solved.

But thanks for your effort and time. I really appreciate it.

 

MicV

0 Kudos
Message 17 of 18
(803 Views)

Hi MicV,

 

Thanks for the update.

It is still very strange that this happened on the other PC, but we will probably never find out why.

 

Andreas

Andreas
CLA, CTA
0 Kudos
Message 18 of 18
(801 Views)