Programming Guide
SIGLENT
SDL1000X Programming Guide 70
%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
2)TCP/IP access code.
Write a function TCP_IP_Test:
function TCP_IP_test()
% This code demonstrates sending synchronous read & write commands
% to an TCP/IP instrument using NI-VISA
%Create a VISA-TCPIP object connected to an instrument
%configured with IP address.
vt = visa('ni',['TCPIP0::','10.11.13.32','::INSTR']);
%Open the VISA object created
fopen(vt);
%Send the string "*IDN?",asking for the device's identification.
fprintf(vt,'*IDN?');
%Request the data
outputbuffer = fscanf(vt);
disp(outputbuffer);
%Close the VISA object
fclose(vt);
delete(vt);
clear vt;
end
4.1.4 LabVIEW sample
Environment: Win7 32bit system, LabVIEW 2011
The functions of this example: use the NI-VISA, to control the device with
USBTMC and TCP/IP access to do a write and read.
Follow the steps to complete the example:
1、 Open LabVIEW, create a VI file.
2、 Add controls. Right-click in the Front Panel interface, select and add VISA
resource name, error in, error out and some indicators from the Controls