Filter löschen
Filter löschen

visade, not able to use instrument driver

10 Ansichten (letzte 30 Tage)
Maurizio am 24 Nov. 2022
Beantwortet: Pravarthana P am 30 Nov. 2022
moving to visadev, and old code no longer working and can't find anything useful on line to sovle this.
my simple code:
VisaObj = visadev("TCPIP0::VEN-L000015::inst0::INSTR");
if isempty(VisaObj)
interfaceObj = tcpclient('', 1861);
clear VisaObj;
interfaceObj = VisaObj(1);
deviceObj = icdevice('lecroy_basic_12bit_driver.mdd', VisaObj);
% Connect device object to hardware.
% Execute device object function(s).
groupObj = get(deviceObj, 'Util');
invoke(groupObj, 'sendcommand', "*IDN?");
val = invoke(groupObj, 'readresponse',"%s");
the bold line gives the error:
Error using icdevice
HWOBJ must be an interface object.
previous code still working but is deprecated:
interfaceObj = instrfind('Type', 'tcpip', 'RemoteHost', '', 'RemotePort', 1861, 'Tag', '');
if isempty(interfaceObj)
interfaceObj = tcpip('', 1861);
interfaceObj = interfaceObj(1);
deviceObj = icdevice('lecroy_basic_driver.mdd', interfaceObj);
any suggestion is wellcome

Antworten (1)

Pravarthana P
Pravarthana P am 30 Nov. 2022
Hi Maurizio Mastrofini,
The ‘visadev object with icdevice is not currently supported in MATLAB R2022a.
There are two possible workarounds to resolve this:
  1. Can continue using ‘visaobjects with icdevice in R2022a. Support for icdevice with ‘visadevis planned for a future release.
  2. If your instrument model has an IVI-C driver, you can use the new ividev interface instead of icdevice.
a. If a supported ividev MATLAB driver exists for the instrument’s IVI-C driver you can use ividev.
Refer to the following documentation page to check whether a supported MATLAB driver exists and for usage examples:
b. If supported ividev MATLAB driver does not exist for the instrument’s IVI-C driver, you can use ividev with the class compliant driver (IviScope, IviFgen etc) and the instrument’s IVI-C driver.
To use option b, the following setup has to be followed:
1. Install NI-VISAand IVI Complicance Package (IVI CP), this can be done simply by installing the "Instrument Control Toolbox Support Package for National Instruments VISA and ICP Interfaces" support package from Add-On Explorer.
2. Install Instrument Control Toolbox Support Package for IVI and VXIplug&play Drivers to get the class compliant “IviDCPwr” MATLAB Driver.
3. Install “hp66xxa” IVI-C driver for the DC Power supply 'HP 6654A'. The “hp66xxa” driver is authored by NI and you can download it from their weblink below -- use the LabWindows/CVI version link inside.
4. Reboot computer
If your instrument model has an IVI-C driver and if you use ividev, follow the below steps:
% Check if IVI-C driver for DC Power Supply is installed
Follow the documentation link for ‘iviconfigurationstore’ steps
Kindly refer to the following links to get more information on "ividev":
Hope this information helps you!




Community Treasure Hunt

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

Start Hunting!

Translated by