Overview
This example demonstrates how to programmatically check if your PC is on AC or battery power by calling the GetSystemPowerStatus function from the Windows' kernel32.dll.
Description
Calls GetSystemPowerStatus and gets the ACLineStatus output. If this value is 1, the AC Power? indicator is true; otherwise it is false.
Steps to Implement or Execute Code
- Run VI
Requirements
Software
LabVIEW 2012 or later
Hardware
PC
Additional Images or Video