LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView Locking up when laptop goes to sleep

Hi everyone,
 
I'm having a problem with LV 8.2 where I have to completely stop LabView and restart if the laptop goes to sleep.  I can't just stop and restart the VI.  Is this a known problem?
 
Thanks,

Jason
0 Kudos
Message 1 of 4
(2,624 Views)
I've seen this type of problem with other applications as well, so the problem isn't really LabVIEW, in my opinion. Simple solution: prevent the laptop from going to sleep?Smiley Wink

Message Edited by smercurio_fc on 03-15-2007 09:08 AM

0 Kudos
Message 2 of 4
(2,621 Views)
Sorry about hijacking this thread but my question might be relevant. Is there a way to disable the sleep mode of a laptop in the vi? Perhaps through ActiveX? Does anyone know the correct call to make?
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 3 of 4
(2,601 Views)

"GovBob" <x@no.email> wrote in message news:1173976818521-492443@exchange.ni.com...
Sorry about hijacking this thread but my question might be relevant. Is there a way to disable the sleep mode of a laptop in the vi? Perhaps through ActiveX? Does anyone know the correct call to make?


You can set and modify power schemes, with a few functions (SetActivePowerScheme), but those functions are nasty. I'd use a c program as a wrapper, in LabVIEW it will be very difficult to get working.


There is an easier function, that applications can use to prevent the computer from going to sleep mode. This function, SetThreadExecutionState, has four flags (one parameter, bitwise complementairy) that inform the system if the system is needed, if a display is needed, etc. Look it up at the msdn (or simply google). Using this, you could even tell the laptop to enter sleep mode when the application is done.


Regards,


Wiebe.
0 Kudos
Message 4 of 4
(2,586 Views)