EasyManuals Logo

Rigol DS1104Z Programming Guide

Rigol DS1104Z
172 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #161 background imageLoading...
Page #161 background image
Chapter 3 Programming Demos RIGOL
DS1000Z Programming Guide 3-7
Matlab Programming Demo
The program used in this demo: MATLAB R2009a
The function realized in this demo: make FFT operation on the waveform data and draw the
waveform.
1. Run the Matlab software and modify the current directory (namely modify the Current Directory at
the top of the software). In this demo, the current directory is modified to E:\DS1000Z_Demo.
2. Click File New Blank M-File in the Matlab interface to create an empty M file.
3. Add the following codes in the M file:
% Create VISA object
DS1000z = visa('ni','USB0::0x1AB1::0x04CE::DS1T00000006::INSTR');
% Set the device property. In this demo, the length of the input buffer is set to 2048.
DS1000z.InputBufferSize = 2048;
% Open the VISA object created
fopen(DS1000z);
% Read the waveform data
fprintf(DS1000z, ':wav:data?' );
% Request the data
[data,len]= fread(DS1000z,2048);
% Close the VISA object
fclose(DS1000z);
delete(DS1000z);
clear DS1000z;
% Data processing. The waveform data read contains the TMC header. The length of the header is 11
bytes, wherein, the first 2 bytes are the TMC header denoter (#) and the width descriptor (9)
respectively, the 9 bytes following are the length of the data which is followed by the waveform data
and the last byte is the terminator (0x0A). Therefore, the effective waveform points read is from the
12nd to the next to last.
wave = data(12:len-1);
wave = wave';
subplot(211);
plot(wave);
fftSpec = fft(wave',2048);
fftRms = abs(fftSpec');
fftLg = 20*log(fftRms);
subplot(212);
plot(fftLg);
4. Save the M file under the current directory. In this demo, the M file is named as
DS1000Z_Demo_MATLAB.m.

Table of Contents

Other manuals for Rigol DS1104Z

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Rigol DS1104Z and is the answer not in the manual?

Rigol DS1104Z Specifications

General IconGeneral
Bandwidth100 MHz
Channels4
Sample Rate1 GSa/s
Waveform Capture Rate30, 000 wfms/s
Vertical Sensitivity1 mV/div to 10 V/div
Time Base Range5 ns/div to 50 s/div
Vertical Resolution8 bits
InterfaceUSB Host, USB Device, LAN, AUX
Display7 inch TFT LCD (800 x 480)
Trigger TypesEdge, Pulse, Video, Slope
Power Supply100-240 V, 45-440 Hz
Memory Depth24 Mpts (Single Channel), 12 Mpts (Dual Channel)

Related product manuals