Checking available hardware in instrhwinfo function

1 次查看(过去 30 天)
I am using 2 serial ports connected to controllers with my computer. When I use the function instrhwinfo('serial'), it shows the correct available hardware that are currently connected. However, after I unplug one or more hardware or plug in(basically change the hardware availability status), the command doesn't update the change in hardware availability.
I've tried to track down why it is not updating, so I looked at the source code, and it seems like the script calls a method from a java object.(com.mathworks.toolbox.instrument.Instrument) I believe that this object is not re-created when I call the function instrhwinfo('serial') again, and uses the same object created on the first iteration. Is this a bug or am I wrong? Also, is there any function that MATLAB can detect the available hardware every time I call? Thanks.
BJ

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Speech Recognition 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by