- 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
4 次查看(过去 30 天)
显示 更早的评论
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('127.0.0.1', 1861);
else
clear VisaObj;
interfaceObj = VisaObj(1);
end
deviceObj = icdevice('lecroy_basic_12bit_driver.mdd', VisaObj);
% Connect device object to hardware.
connect(deviceObj);
% Execute device object function(s).
groupObj = get(deviceObj, 'Util');
invoke(groupObj, 'sendcommand', "*IDN?");
val = invoke(groupObj, 'readresponse',"%s");
disp(val);
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', '');
if isempty(interfaceObj)
interfaceObj = tcpip('127.0.0.1', 1861);
else
fclose(interfaceObj);
interfaceObj = interfaceObj(1);
end
deviceObj = icdevice('lecroy_basic_driver.mdd', interfaceObj);
any suggestion is wellcome
0 个评论
回答(1 个)
Pravarthana P
2022-11-30
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
>>ividriverlist
Follow the documentation link for ‘iviconfigurationstore’ steps
Kindly refer to the following links to get more information on "ividev":
Hope this information helps you!
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!