MATLAB Answers

Visa and Timeout error handling?

63 views (last 30 days)
Leor Greenberger
Leor Greenberger on 19 Jun 2013
Commented: Cijy Mathai on 2 Sep 2021
Hi.
I am using the instrument control toolbox to create a VISA connection to my instrument using
visa('ni','TCPIP0::<ip>');
Occasionally, when running my matlab procedure, I get the following message,
Warning: Unsuccessful read: VISA: Timeout expired before operation completed.
This usually occurs when the connected instrument is in a weird state and needs to be reset. However, there doesn't seem anyway to handle this warning. I want to basically dump the connection when this happens and exit the matlab script. Any ideas how to do this?
  2 Comments
Cijy Mathai
Cijy Mathai on 2 Sep 2021
My problem is not with this solution yet... :(

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!