How can I automatically enumerate all instruments connected within a LAN to a host PC?

9 views (last 30 days)
I am in a lab with many test and measurement tools connected to a central controller PC. This PC must, at this time, know the VISA resource string associated with each test or measurement tool. How can I used MATLAB to automatically enumerate all available test and measurement hardware over LAN? Right now, I have to know the IP address and am using TMtool to manage communication with the instrument. I want to avoid using TMtool in the future. I also want my code to be ignorant of what the IP address or VISA resource string happens to be during the time I want to establish a session with the instrument.
How can I obtain a list of IP addresses and VISA resource strings of test and measurement equipment in a generic way such that I can select an instrument to use from a list of all instruments connected to the controlling PC?
Thank you.

Answers (1)

Vinod
Vinod on 1 Oct 2015
Try the instrhwinfo function.
If all your devices are registered in your VISA vendor, you can do this:
>> a = instrhwinfo('visa','agilent')
assuming you are using Keysight IO Libraries (formerly called Agilent IO Libraries).
The devices are available from the output of
>> a.ObjectConstructorName
If you only want TCPIP instruments, filter this list for items with TCPIP:: in them.

Categories

Find more on Instrument Control Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!