LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Power saving feature for harddisk in OS

It's a reoccuring problems on various LabVIEW systems I have created, that resource problems arise if the Windows

operating system is set with power saving active on the harddisk, instead of having it set to Never.

Is there any way I can in LabVIEW read and check the status of this feature in the OS, and

hence give a warning if it is set to anything else that Never ?

Martin    Smiley Happy

0 Kudos
Message 1 of 5
(2,216 Views)

I don't know if you can (or even should be able to) do that in LabVIEW, but you can prevent the hard drive from "going to sleep" by, say, doing some file operation every 5 minutes or so.  One particularly cheap one, it seems to me, is to ask for File information for the current VI, which should take very little time --
Do not sleep.png

Bob Schor

0 Kudos
Message 2 of 5
(2,185 Views)

I am interested in what exact issues you are having, as I have not ran into any LabVIEW  issues with the HDD sleeping. 

 

I have had problems with Windows power management turning off USB ports to save power.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 5
(2,180 Views)

I guess the main problem is delayed operations because of the spin up time.

Maybe an SSD would solve that. 🙂

 

I don't know how Windows implements disk caching, but just asking for the same info at regular intervals might not need to spin the disk if the cache is smart enough. Not sure.

0 Kudos
Message 4 of 5
(2,172 Views)

Not sure how to query it, but this may be a method to prevent it even if system admins have set it out so.

 

Check out

https://docs.microsoft.com/en-us/previous-versions/windows/hardware/download/dn550976(v=vs.85)

 

then follow the link for Power Availability Requests

I won't post it here, since it is a docx.

 

Ben Manthey has written a set a VI that hooks into the Windows Power Request API. see https://github.com/benmanthey/Power-Requests

 

I have used these VIs to disable the screen saver and sleep while acquiring data for days on end. You can try them and see if they prevent the computer from sleeping, they have worked for me.

 

Side IT where I work is locked down, I have no way of disabling the screen saver, which is a problem in the field. Using the aforementioned VIs the screen saver was disable only while my program was running; this allowed multiple users to check the system.

 

mcduff

 

 

 

Message 5 of 5
(2,155 Views)