Can we get Battery laptop indicator in simulink??
4 views (last 30 days)
Show older comments
hi all
i just wanna ask, can we get battery laptop indicator level in simulink??? how???
thanks
0 Comments
Accepted Answer
Kaustubha Govind
on 24 Jun 2011
There is no direct way to do this, but you could use an API function provided by the operating system and call it from an S-function. For Windows, I found a related answer on a different forum: Monitor battery charge with Win32 API.
2 Comments
Kaustubha Govind
on 1 Aug 2011
Luhur: Sorry, missed your comment. I think you might need to hunt down an API function for querying the WiFi signal status also. :)
More Answers (1)
Ken Atwell
on 1 Aug 2011
Using .NET may be easier than win32:
NET.addAssembly('System.Windows.Forms')
powerStatus = System.Windows.Forms.SystemInformation.PowerStatus
powerStatus.BatteryLifePercent % returns a number between 0 and 1
0 Comments
Communities
More Answers in the Power Electronics Control
See Also
Categories
Find more on Programmatic Model Editing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!