Where was my IVI driver installed on Windows, and how can I use it in MATLAB for instrument control?
12 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2022 年 2 月 1 日
回答済み: MathWorks Support Team
2022 年 2 月 1 日
I installed a specific IVI-C driver on Windows 10 and I'd like to use this in MATLAB to control an instrument connected to my computer. However, I'm not sure where the driver was installed, so I'm not sure how to use it.
I know it is supported by MATLAB because I downloaded it at the following MathWorks page, which lists my device (a CPX400DP) as supported:
採用された回答
MathWorks Support Team
2022 年 2 月 1 日
You should be able to check the installed drivers on your system by using 'instrhwinfo', as specified on the following documentation page: https://www.mathworks.com/help/releases/R2021a/instrument/getting-started-with-ivi-drivers.html#br9tor8-1
Specifically, the devices supported by your drivers may appear as a "Module". For example, with your CPX400DP power supply, after installing the IVI driver:
>> out = instrhwinfo('ivi')\n>> out.Modules\n\nans = \n'CPX400DP' 'niScope' % et cetera ...
If your driver shows up here, this means it is correctly installed. If it doesn't show up here, it's possible that you are using 64-bit MATLAB and your driver is 32-bit (or vice versa). Note that your driver must have the same bitness as your MATLAB release, and that the latest release of 32-bit MATLAB was R2015b.
If you don't know where the driver was installed, check the "MasterConfigurationStore" XML file:
>> out = instrhwinfo('ivi')\n>> out.MasterConfigurationStore\n\nans =\nC:\ProgramData\IVI Foundation\IVI\IviConfigurationStore.xml
Open this XML file and search for your device or driver name. You may see a <ModulePath> which points to a DLL - this is the "installation" of your driver.
<IviSoftwareModule id="p454">\n<Name>CPX400</Name>\n...\n<ModulePath>CPX400DP_32.dll</ModulePath>\n<Prefix>CPX400</Prefix>\n<ProgID/>\n<SupportedInstrumentModels>CPX400DP</SupportedInstrumentModels>\n...\n<ModulePath64/>\n</IviSoftwareModule>
You can then create a MATLAB instrument driver for your IVI driver to use it in MATLAB, if you would like. To do this, use the 'makemid' function with your module name:
>> makemid('CPX400')\n% No output is expected, but an error happens if things don't work
For more info about this function, see the following documentation page:
Then, you can use the MATLAB instrument driver. For more info on using this MID, see the following documentation page:
https://www.mathworks.com/help/releases/R2021a/instrument/instrument-driver-editing-and-testing.html
More info about IVI drivers can be found on the following documentation page:
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!