visadevllist won't show usb/tcpip type devices, only gpib is displayed

14 ビュー (過去 30 日間)
jiansong wan
jiansong wan 2023 年 5 月 31 日
コメント済み: Shivam Kumar 2024 年 5 月 17 日
my script on the same PC & equipment.
In the last few weeks, visadevlist refuses to display any other type of device other than gpib.
However, useing Matlab-App Test and Measurment tool, I can see my tcpip and usb devices, and I can connect to them.
It seems just the visadevlist won't show them. My script relies on visadevlist to auto-determin available resources.
Please advise.

採用された回答

Manoj Mirge
Manoj Mirge 2023 年 8 月 18 日
I understand that you have the USB and TCPIP devices connected to the machine but still the "visadevlist" function is not listing those devices in its output.
To resolve the issue kindly verify that the devices are properly connected to the machine. You can use the "visadev" function to connect to your device. Kindly refer to the below code for the same:
% ResourceName is a valid resource name string for the device you are trying to connect to
>> device = visadev(ResourceName)
To learn more about the "visadev" function, please refer to the following documentation link:
If "visadev" fails, please ensure that you have a valid VISA driver installed, either from National Instruments or Keysight, and the VISA conflict manager in either NI MAX or Keysight Connection Expert is configured so at least one VISA driver is enabled and set as preferred.
If "visadev" works with all connected devices, this issue might occur because "visadevlist" tries to ping all connected devices, and some devices might sometimes take up more time than timeout to connect. Please try to increase the timeout length in the "visadevlist" function:
>> visadevlist("Timeout", 60);
% Above code sets the timout of 60 seconds.
To learn more about the "visadevlist" function, please refer to the following documentation link:
Hope this helps.
  2 件のコメント
jiansong wan
jiansong wan 2023 年 8 月 18 日
Hi Manoj,
I solved this problem by re-installing NI-MAX software.
It seems like a software glitches, preventing Matlab to discovering any device other than GPIB.
The command you mentioned can be helpful, especially the time out option.
Thanks!
Jiansong
Shivam Kumar
Shivam Kumar 2024 年 5 月 17 日
Thank you so much Manoj. Your answer helped me a lot.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInstrument Control Toolbox Supported Hardware についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by