LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I resume labview execution after windows hibernation or automatic restarting?

Hi all, what I'm trying to do is to pause a labview vi (the vi take continous measurements through an usb sensor) execution if the PC enters a stand by or hibernation state because of power issues. Any ideas on how to do this programmatically?

 

I'm programming this on windows 10 with labview 2016.

 

Thanks

Carlos

0 Kudos
Message 1 of 7
(3,636 Views)

I think the best thing to do is set the PC so that it doesn't go into hibernation.

 

Now if there are power issues such as loss of Main AC Power, there isn't much you can do easily.  Lose power, your PC goes down and there is no pausing.  You could set your PC's BIOS to automatically reboot boot after power loss.  You could create a an application or service that runs automatically on startup.

 

If power loss is a big concern, you should get a battery backup for the PC.  Many brands (I know APC does) can communicate with the PC about its status.  There is a LabVIEW example out there that can read that status so you can build it into your app to detect when it went on battery and allow your VI got go into this "pause" state programmatically.

Message 2 of 7
(3,634 Views)

Thank you, that is a good answer, I will take a look for the vi you mentioned,

regards

 

0 Kudos
Message 3 of 7
(3,632 Views)

I had a chance to search for what I've used in the past which was found here.

 

https://decibel.ni.com/content/docs/DOC-1154

Message 4 of 7
(3,579 Views)

@fmow wrote:

Hi all, what I'm trying to do is to pause a labview vi (the vi take continous measurements through an usb sensor) execution if the PC enters a stand by or hibernation state because of power issues. Any ideas on how to do this programmatically?


Wouldn't the VI automatically pause when the PC goes into hibernation or sleep Smiley Happy?

 

The .net event is the way to go if you want your program to go to a controlled pause state on power state change.

 

Message 5 of 7
(3,556 Views)

If you'd like to prevent your computer from sleeping/hibernating programatically then please check out my Power Requests VIs at : https://github.com/benmanthey/Power-Requests.


 

Don't make your user search through settings, do it with your program.

—Ben
Prevent your computer from sleeping programmatically!
Use Power Requests
Download from GitHub

Message 6 of 7
(3,513 Views)

Thanks Ben

0 Kudos
Message 7 of 7
(3,505 Views)