EasyManuals Logo

Rigol DS1054Z Programming Guide

Rigol DS1054Z
260 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 #249 background imageLoading...
Page #249 background image
Chapter 3 Programming Demos RIGOL
MSO1000Z/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:\MSO1000Z_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
MSO1000Z = visa('ni','USB0::0x1AB1::0x04CE::DS1ZA160801111::INSTR');
% Set the device property. In this demo, the length of the input buffer is set to 2048.
MSO1000Z.InputBufferSize = 2048;
% Open the VISA object created
fopen(MSO1000Z);
% Read the waveform data
fprintf(MSO1000Z, ':wav:data?' );
% Request the data
[data,len]= fread(MSO1000Z,2048);
% Close the VISA object
fclose(MSO1000Z);
delete(MSO1000Z);
clear MSO1000Z;
% 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
MSO1000Z_Demo_MATLAB.m.

Table of Contents

Other manuals for Rigol DS1054Z

Questions and Answers:

Question and Answer IconNeed help?

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

Rigol DS1054Z Specifications

General IconGeneral
Channels4
Bandwidth50 MHz
Sample Rate1 GSa/s
Memory Depth24 Mpts
Display7 inch TFT LCD (800x480)
Vertical Sensitivity1 mV/div to 10 V/div
Time Base Range5 ns/div to 50 s/div
Vertical Resolution8 bits
Trigger TypesEdge, Pulse, Video, Slope
ConnectivityUSB Host, USB Device, LAN
Input Impedance1 MΩ
Power Supply100-240 VAC, 45-440 Hz

Related product manuals