MATLAB INSTRUMENT CONTROL TOOLBOX - RELEASE NOTES Instrukcja Użytkownika Strona 21

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 30
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 20
Using MATLAB's Interface for External Libraries
1MA171_5e Rohde & Schwarz How to use Rohde & Schwarz Instruments in MATLAB
®
21
if ( instr_session ~= 0 )
[errCode, errMsg] = calllib( vxipnpLib, 'rssmu_error_message',
instr_session, errCode, errMsg );
errString = sprintf('%s', char(errMsg));
disp( errString );
errMsg = '';
[DummyErr, errCode, errMsg] = calllib( vxipnpLib, 'rssmu_error_query',
instr_session, errCode, errMsg );
errString = sprintf('%s', char(errMsg));
disp( errString );
% ... and we must make sure to disconnect from the device !
calllib( vxipnpLib, 'rssmu_close', instr_session );
e
nd
e
nd
%% clean up
u
nloadlibrary(vxipnpLib);
clear all
3.7 Application Example using the 64-bit rssmu
Instrument Driver
Please refer to section 1.2 for software prerequisites before executing the following
MATLAB source code.
Due to a not supported calling convention of MATLAB, the following workaround has to
be installed to successfully load the 64-bit VXIplug&play instrument driver library.
Please create a file workaround_rssmu.h for the rssmu 64-bit application example with
the following content:
#undef _LDSUPPORT
#define __fastcall
#include "rssmu.h"
This file has to be copied to the VXIplug&play include directory. This is typically stored
in the following environment variable: VXIPNPPATH64 (e.g. c:\Program Files\IVI
Foundation\VISA\Win64\Include).
Example source code for MATLAB 2010b
%% Rohde & Schwarz GmbH & Co. KG
% MATLAB calllib example for Vector Signal Generator
% R&S SMU200A or R&S SMBV100A (etc) instrument driver (rssmu)
%
% Purpose: Test of loadlibrary/calllib for rssmu 64-bit VXIplug&play instrument
% driver
% The example configures 3GPP on a Vector Signal Generator
% Author: Juergen Engelbrecht, customersupport@rohde-schwarz.com
%% setup up the mex compiler before the first run
%mex -setup
%% add library path
Przeglądanie stron 20
1 2 ... 16 17 18 19 20 21 22 23 24 25 26 ... 29 30

Komentarze do niniejszej Instrukcji

Brak uwag