Matlab usage of NationalIn​struments.​VisaNS.Res​ourceManag​er.ParseRe​source

2 次查看(过去 30 天)
Hello everyone,
As an analog chip designer, I am absolutely an amateur in high level programming. However some ready made codes for controlling test equipment proved useful. using VISA from NI, i wanted to find alias names of instruments. Following is my code
% Add the National Instruments VISA .NET assembly:
% The NI VISA drivers have to be installed before this script can be used.
ni=NET.addAssembly(fullfile('NationalInstruments.VisaNS'));
% Create a new ResourceManager object:
res=NationalInstruments.VisaNS.ResourceManager.GetLocalManager.FindResources('?*').cell
This code returns names of resources for example "GPIB0::3::INSTR" However I would like to know the alias and there is a function for finding alias which "ParseResource", and the implementation was as follows:
NationalInstruments.VisaNS.ResourceManager.GetLocalManager.ParseResource(res(5), hwit , intNum , resClass , unAlias , Alias)
However i get an error saying "No method 'ParseResource' with matching signature found for class 'NationalInstruments.VisaNS.ResourceManager'."
How do i pass arguments to this function? Are there any examples on how to do it? Any help will be highly appreciated.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Microsoft .NET 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by