LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Configure LabVIEW exe to prevent system sleep (Windows 10)

Solved!
Go to solution

I have a DAQ program I need to run continuously for over a week, when I run my software alone, it will work for about 6 hours and then log out my account (presumably for inactivity). However, if I also open VLC and play a video on loop, the DAQ works without issue for the whole test.

 

How can I get my compiled code to run in the same way VLC runs when it is playing a video (preventing windows sleep ) ?

0 Kudos
Message 1 of 2
(1,698 Views)
Solution
Accepted by topic author JScherer

You can check out this knowledge base:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019Y44SAE&l=en-US

 

Essentially there is some Windows APIs you can call into that can do this. In that KB there is a link to some examples:

 

https://forums.ni.com/t5/Example-Code/Preventing-Windows-computers-from-sleeping-or-hibernating/ta-p...

Message 2 of 2
(1,688 Views)