- Can continue using ‘visa’ objects with icdevice in R2022a. Support for icdevice with ‘visadev’ is planned for a future release.
- If your instrument model has an IVI-C driver, you can use the new ividev interface instead of icdevice.
visade, not able to use instrument driver
6 views (last 30 days)
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");
interfaceObj = tcpclient('127.0.0.1', 1861);
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', '127.0.0.1', 'RemotePort', 1861, 'Tag', '');
interfaceObj = tcpip('127.0.0.1', 1861);
interfaceObj = interfaceObj(1);
deviceObj = icdevice('lecroy_basic_driver.mdd', interfaceObj);
any suggestion is wellcome
Pravarthana P on 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:
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: https://www.mathworks.com/help/instrument/supported-ivi-drivers.html
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!