TCP/IP Instrument Communication

Communicate with instruments that use TCP/IP

The TCP/IP interface can be used for reading and writing both binary data and ASCII data. You use different functions for the different data types – fprintf and fscanf for ASCII operations, and fread and fwrite for binary data. You can also do asynchronous operations using other functions. These workflows are all described in Writing and Reading Data.


binblockread Read binblock data from instrument
binblockwrite Write binblock data to instrument
clear Remove instrument objects from MATLAB workspace
delete Remove instrument objects from memory
disp Display instrument object summary information
echotcpip Start or stop TCP/IP echo server
fclose Disconnect interface object from instrument
fopen Connect interface object to instrument
fprintf Write text to instrument
fscanf Read data from instrument, and format as text
get Instrument object properties
instrreset Disconnect and delete all instrument objects
instrhwinfo Information about available hardware
propinfo Instrument object property information
resolvehost Network name or network address
set Configure or display instrument object properties
tcpip Create TCPIP object
tmtool Open Test & Measurement Tool
fgetl Read line of text from instrument and discard terminator
fgets Read line of text from instrument and include terminator
flushinput Remove data from input buffer
flushoutput Remove data from output buffer
fread Read binary data from instrument
fwrite Write binary data to instrument
instrcallback Display event information when event occurs
instrfind Read instrument objects from memory to MATLAB workspace
instrfindall Find visible and hidden instrument objects
instrid Define and retrieve commands that identify instruments
instrnotify Define notification for instrument events
isvalid Determine whether instrument objects are valid
inspect Open Property Inspector
instrhelp Help for instrument object type, function, or property
length Length of instrument object array
load Load instrument objects and variables into MATLAB workspace
methods Class method names and descriptions
obj2mfile Convert instrument object to MATLAB code
query Write text to instrument, and read data from instrument
readasync Read data asynchronously from instrument
record Record data and event information to file
save Save instrument objects and variables to MAT-file
scanstr Read data from instrument, format as text, and parse
size Size of instrument object array
stopasync Stop asynchronous read and write operations

Was this topic helpful?