Interface-Based Communication
R2026bWith interface-based communication, the basic workflow comprises common steps regardless of interface type. First, you create an object of the interface type you are using to connect to the instrument. Then, you can set connection and communication properties based on your workflow and instrument configuration. Next, write data to and read data from the instrument. Finally, when you are done working with your instrument, disconnect from it by clearing the object from the workspace.
Functions
aardvark | Total Phase Aardvark Adapter connection (Since R2023a) |
ni845x | NI USB-845x connection (Since R2023a) |
device | I2C peripheral device connection (Since R2023a) |
spi | Create SPI object |
tcpclient | Create TCP/IP client connection with TCP/IP server |
tcpserver | Create TCP/IP server |
udpport | Connect to UDP socket |
serialport | Connection to serial port |
visadev | Create connection to device using VISA |
Apps
| Instrument Explorer | Connect to and communicate with instruments using MATLAB driver (Since R2024a) |
| Oscilloscope Explorer | Connect to and communicate with oscilloscopes (Since R2026b) |
| Serial Explorer | Communicate with devices connected to serial port |
| TCP/IP Explorer | Connect to and communicate with TCP/IP server |
| UDP Explorer | Create UDP socket and communicate over networks using UDP (Since R2022a) |
| VISA Explorer | Connect to and communicate with instruments over VISA (Since R2022b) |
Topics
- Create Interface Object
Communicate with your instrument by creating an object that represents a connection to the instrument.
- Configure and Return Properties
Configure instrument object behavior by assigning values to properties.
- Write and Read Data
Write and read ASCII string data, binary data, or binblock data with the instrument.
- Use SCPI Commands
Use SCPI commands to control multiple instruments using similar functions.