
Using MATLAB's Interface for External Libraries
1MA171_5e Rohde & Schwarz How to use Rohde & Schwarz Instruments in MATLAB
®
17
3 Using MATLAB's Interface for External
Libraries
The basic MATLAB
®
package supports an interface for using 32-bit and 64-bit external
libraries. This functionality is called calllib interface.
Rohde & Schwarz VXIplug&play instrument drivers come with a dynamic linked library
(DLL). As a result, the remote-control drivers can be used directly without utilizing the
Instrument Control Toolbox. This approach is described in the following.
3.1 calllib: An interface to Generic Libraries
The calllib interface makes it easy to access already existing dynamic linked libraries.
MATLAB
®
supports this feature for 32-bit and 64-bit libraries on Windows operating
systems.
3.2 Installing VXIplug&play Instrument Drivers
Having an installed VXIplug&play instrument driver on the host PC is a prerequisite
before remote controlling any instrument from MATLAB
®
by using instrument driver.
Rohde & Schwarz VXIplug&play instrument drivers and installation manuals are
available in the Drivers download area on the Rohde & Schwarz website:
http://www.rohde-schwarz.com/drivers/
.
3.3 Loading and Acquiring Information about Libraries
Generally any library needs to be loaded into MATLAB
®
before it is used. It is important
to propagate the path where the libraries are accessible to MATLAB
®
as shown below.
The example below shows how to load a 32-bit VXIplug&play instrument driver library.
%% add library path
% check VXIPNPPATH environment variable on a 32-bit system
addpath 'c:\Program Files\IVI Foundation\VISA\WinNT\Include';
addpath 'c:\Program Files\IVI Foundation\VISA\WinNT\Bin';
Note that the crucial part of these paths is stored in the environment variable
VXIPNPPATH on your operating system. On a 64-bit operating system the variable
VXIPNPPATH64 points to the 64-bit VXIplug&play installation directory.
Commentaires sur ces manuels