Matlab Example - Teledyne T3DSO1000 Programming Manual

Digital oscilloscopes
Hide thumbs Also See for T3DSO1000:
Table of Contents

Advertisement

MATLAB Example

Environment: Windows7 32-bit, MATLAB R2010b
Description: The function of this example: Use the NI-VISA, to control the
device with USBTMC or TCP/IP access to do a write and read.
Steps:
1.Open MATLAB, and modify the current directory. In this demo, the current
directory is modified to D:\USBTMC_TCPIP_Demo.
2. Click File>>New>>Script in the Matlab interface to create an empty M file.
3. Coding:
a) USBTMC:
function
USBTMC_test()
% This code demonstrates sending synchronous read & write commands
% to an USB Test & Measurement Class (USBTMC) instrument using %
NI-VISA
%Create a VISA-USB object connected to a USB instrument
vu =
visa('ni','USB0::0xF4EC::0xEE38::0123456789::INSTR
%Open the VISA object created
fopen(vu);
%Send the string "*IDN?",asking for the device's identification.
fprintf(vu,'*IDN?');
%Request the data
outputbuffer = fscanf(vu);
disp(outputbuffer);
%Close the VISA object
fclose(vu);
delete(vu);
clear vu;
end
b) TCP/IP:
Digital Oscilloscope Series
');
213

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

T3dso2000

Table of Contents