visadev cannot close connection

조회 수: 6 (최근 30일)
Yue Xiao
Yue Xiao 2022년 5월 25일
편집: chrisw23 2023년 3월 2일
I use visadev to connect instrument through LAN. It can connect and send commands, no problems. But when I want to disconnect the instrument, sometimes MATLAB just shows busy. It will take very long time to disconnect. Sometimes I have to close MATLAB. Does anyone have the same issue, or any suggestions? Thanks.
Below it shows when I close the connection, it calls Channel.m and line 177 takes 9 minutes.
  댓글 수: 2
Akshayaa Pandiyan
Akshayaa Pandiyan 2023년 3월 1일
How do you disconnect the instrument?
chrisw23
chrisw23 2023년 3월 2일
편집: chrisw23 2023년 3월 2일
I recommend to install the vendor specific VISA tools (typically niMax or Keysight ConnectionExpert) and use the IOTrace Tool to monitor communication, when trying to close the instruments session. Probably there's Matlab polling (loop functionality) active and it takes a long time to get the slot to execute your close cmd.
Another point maybe that there are multiple unclosed (older) session objects from debug runs that cause sooner or later communication blocks until Matlab was restarted. So be sure to clear up your object references when debugging will be stopped.
Unfortunately the code provided is not suited to analyze the problem deeper.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Instrument Connection and Communication에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by