Know when the computer goes to sleep mode
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mathieu
el 17 de Jun. de 2016
Comentada: KSSV
el 24 de Jun. de 2016
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 comentarios
Respuesta aceptada
KSSV
el 17 de Jun. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!