10-12-2009 03:42 PM
Is there a way to check in LabVIEW (or otherwise) if a laptop is running on battery power?
The reason I would like to do this is that running on battery power would be indicative of a power outage in the field where we are testing, which would be problematic for other equipment.
Is there some function I can call in LabVIEW to check this? Or something I can call through the command prompt (Windows)?
Solved! Go to Solution.
10-12-2009 03:46 PM
See this recent thread.
http://forums.ni.com/ni/board/message?board.id=170&message.id=444393&query.id=966596#M444393
10-12-2009 04:08 PM
Thanks Ravens Fan. That was exactly what I was looking for.
I just looked here for details about this dll, and this is what it says for
'ACLineStatus'
- 0 for offline
- 1 for online
So does 'offline' mean that the AC is offline, so it is running on battery?
10-12-2009 04:11 PM
By looking at the code, if the value =1 then it is on AC power (not =1 means on battery). So offline means on battery.