Fabrice Prieur
2010-02-12 09:56:05 UTC
Hi!
I am trying to write a program controlling Agilent instruments. I would like the program to be able to communicate with one type of instrument but not one particular instance of this type. For example, any signal generator of type 33220A.
When creating a visa object, one argument of the function (rsrcname) contains the serial number of the instrument. Since I cannot hardcode a serial number, I need to find the value for this argument.
I can find the value of rsrcname by using instrhwinfo('visa','agilent'). But this works only if the instrument has been found by Matlab.
To do that, I can of course choose 'Tools', 'Scan for all instruments' in the Test and measurement tool. But I wonder if it is possible to do this automatically in my code.
In other words, is there a function I can call to scan for instruments?
Thanks for your help.
I am trying to write a program controlling Agilent instruments. I would like the program to be able to communicate with one type of instrument but not one particular instance of this type. For example, any signal generator of type 33220A.
When creating a visa object, one argument of the function (rsrcname) contains the serial number of the instrument. Since I cannot hardcode a serial number, I need to find the value for this argument.
I can find the value of rsrcname by using instrhwinfo('visa','agilent'). But this works only if the instrument has been found by Matlab.
To do that, I can of course choose 'Tools', 'Scan for all instruments' in the Test and measurement tool. But I wonder if it is possible to do this automatically in my code.
In other words, is there a function I can call to scan for instruments?
Thanks for your help.