Can we get Battery laptop indicator in simulink??

1 回表示 (過去 30 日間)
Luhur
Luhur 2011 年 6 月 24 日
hi all
i just wanna ask, can we get battery laptop indicator level in simulink??? how???
thanks

採用された回答

Kaustubha Govind
Kaustubha Govind 2011 年 6 月 24 日
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 件のコメント
Luhur
Luhur 2011 年 6 月 24 日
what about wifi signal Kaustubha??? can we get the signal status level in simulink also?? or we us API function also??
anyway, THANKS A LOT FOR THE LINK!! :)
Kaustubha Govind
Kaustubha Govind 2011 年 8 月 1 日
Luhur: Sorry, missed your comment. I think you might need to hunt down an API function for querying the WiFi signal status also. :)

サインインしてコメントする。

その他の回答 (1 件)

Ken Atwell
Ken Atwell 2011 年 8 月 1 日
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

コミュニティ

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by