04-04-2018 01:44 AM
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
04-04-2018 02:23 AM
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
04-04-2018 11:52 AM
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.
04-09-2018 01:43 AM
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?
04-10-2018 04:14 AM
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
04-18-2018 03:56 AM
Hi MicV,
Did you try any of the suggestions from my post?
Have there been any improvement over the last week?
Andreas
04-18-2018 04:22 AM
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
04-18-2018 04:28 AM
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