RIGOL Chapter 4 Programming Instances
4-6 DL3000 Programming Guide
MATLAB Programming Instance
Program used in this example: MATLAB R2009a
Function realized in this example: sending the *IDN? command and reading the instrument
information.
1. Run the MATLAB software and modify the current path (modify the Current Directory at the top of
the software). In this example, modify the current path to E:\DL3000_Demo.
2. Click File New Blank M-File in the MATLAB interface to create an empty M file.
3. Add the following codes to the M file:
dl3000= visa('ni','USB0::0x1AB1::0x0E11::DL3000A000001::INSTR'); %create VISA object
fopen(dl3000); %open the created VISA object
fprintf(dl3000, '*IDN?'); %send request
meas_CH1 = fscanf(dl3000); %read data
fclose(dl3000); %close the VISA object
display(IDN) %display the device information already read
4. Save the M file to the current path. In this instance, the M file is named as
"dl3000_Demo_MATLAB.m".
5. Run the M file and the running results are displayed as follows:
IDN=
RIGOL TECHNOLOGIES,DL3031A,LS000001,00.01.00.04.05