Know when the computer goes to sleep mode
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I write here today because I would like to know if it is possible, when I launch a function in Matlab, to get the time before the computer goes to sleep mode.
Why? Because I am developing a GUI which communicate with electronic devices (oscilloscope and function generators) and I have a mode "oscilloscope" in my GUI which permits to the user to see the signals he wants (I get the signals from the oscilloscope and refresh with a timer). BUT, I intend the case where the user leave the computer and let the function generators output on "ON" and the oscilloscope in the "NORMAL" mode. And what I wish is to stop the acquisition of the oscilloscope just before the computer goes to sleep and then avoid to let the oscilloscope acquired hours and hours for nothing.
I know that in a previous program on Matlab I used getenv('PROGRAMDATA') to find the folder ProgramData of Windows. But the documentation is not really provided for this function. Maybe I have to continue my research in this direction?
The last information I have is I am using insomnia function (from FileExchange) which permit to avoid the computer goes to sleep, but it is not what I want.
I thank you in advance for all advice you could give me.
Best regards
0 Kommentare
Akzeptierte Antwort
KSSV
am 17 Jun. 2016
Interesting question....I am not an expert. A wild suggestion/ advice. I guess you can control the sleep, wake activities through dos prompt. We can run dos prompt in matlab. The following link might give an insight on how to control sleep through cmd.
5 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!