Siglent SDG810 10MHz Arbitrary Function Generator

Manual - Page 206

For SDG810.

PDF File Manual, 212 pages, Read Online | Download pdf file

SDG810 photo
Loading ...
Loading ...
Loading ...
Programming Guide
62
4.3 Example of MATLAB
Environment: Win7 32bit system, MATLAB R2010b
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.
Follow the steps to complete the example:
Open MATLAB, modify the current directory. In this demo, the current directory is
modified to D:\USBTMC_TCPIP_Demo.
Click File>>New>>Script in the Matlab interface to create an empty M file
Add codes:
1.1 Write a function Usbtmc_test.
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?');
Loading ...
Loading ...
Loading ...