User Manual
SIGELNT
SPD1000X User Manual 57
(USBTMC) instrument.
Create a VISA-USB object to connect to the USB instrument
vu = visa ('ni', 'USB0 :: 0xF4EC :: 0x1300 :: 0123456789 :: INSTR');
fopen(vu);
fprintf(vu,'*IDN?');
outputbuffer = fscanf(vu);
disp(outputbuffer);
fclose(vu);
delete(vu);
clear vu;
end
(2) Based on the LAN port code:
Write to the TCP_IP_Test function.
function TCP_IP_test( IPstr )
% This code demonstrates using NI-VISA to send synchronous
read and write commands to a TCP / IP instrument.
% Create a VISA-TCPIP object to connect to an instrument with
an IP address configured
vt = visa('ni',['TCPIP0::',IPstr,'::INSTR']);
% Open the created VISA object
fopen(vt);
% Send the string "* IDN?" To query device information