Communication basée sur l’interface
Quel que soit le type d’interface, le workflow de base de la communication basée sur l’interface comprend des étapes communes. Vous commencez par créer un objet correspondant au type d’interface utilisé pour vous connecter à l’instrument. Vous pouvez alors définir les propriétés de connexion et de communication en fonction de votre workflow et de la configuration de l’instrument. Ensuite, vous écrivez et lisez des données à partir de l’instrument. Enfin, lorsque vous avez fini d’utiliser votre instrument, vous vous déconnectez de celui-ci en effaçant l’objet de l’espace de travail.
Fonctions
aardvark | Connexion à un adaptateur Total Phase Aardvark (depuis R2023a) |
ni845x | NI USB-845x connection (depuis R2023a) |
device | I2C peripheral device connection (depuis 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 |
Applications
| TCP/IP Explorer | Connect to and communicate with TCP/IP server (depuis R2021b) |
| UDP Explorer | Create UDP socket and communicate over networks using UDP (depuis R2022a) |
| Serial Explorer | Communicate with devices connected to serial port (depuis R2021b) |
| VISA Explorer | Connect to and communicate with instruments over VISA (depuis R2022b) |
Rubriques
- 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.