With interface-based communication, there are common steps that comprise the basic workflow. You create an object of the interface type you are using, and connect to the instrument. Setting properties is optional, but common. You read and write data, and disconnect and clean up.
|Create Bluetooth object|
|Create I2C object|
|Create SPI object|
|Create TCPIP object|
|Create UDP object|
|Create serial port object|
|Open Test & Measurement Tool|
|Disconnect interface object from instrument|
|Connect interface object to instrument|
|Write text to instrument|
|Read binary data from instrument|
|Read data from instrument, and format as text|
|Write binary data to instrument|
|Read data asynchronously from instrument|
|Stop asynchronous read and write operations|
|Read binblock data from instrument|
|Write binblock data to instrument|
|Remove data from input buffer|
|Remove data from output buffer|
|Instrument object properties|
|Configure or display instrument object properties|
|Instrument object property information|
|Display instrument object summary information|
|Information about available hardware|
|Disconnect and delete all instrument objects|
|Remove instrument objects from MATLAB workspace|
|Remove instrument objects from memory|
|Read line of text from instrument and discard terminator|
|Read line of text from instrument and include terminator|
|Open Property Inspector|
|Display event information when event occurs|
|Read instrument objects from memory to MATLAB workspace|
|Find visible and hidden instrument objects|
|Help for instrument object type, function, or property|
|Define and retrieve commands that identify instruments|
|Define notification for instrument events|
|Determine whether instrument objects are valid|
|Length of instrument object array|
|Load instrument objects and variables into MATLAB workspace|
|Class method names and descriptions|
|Convert instrument object to MATLAB code|
|Write text to instrument, and read data from instrument|
|Record data and event information to file|
|Save instrument objects and variables to MAT-file|
|Read data from instrument, format as text, and parse|
|Create serial port object|
|Size of instrument object array|
|Test and Measurement Tool||Control oscilloscopes and other instruments|
You need to create a MATLAB® object that represents the instrument to communicate with the instrument.
Before you can use the instrument object to write or read data, you must connect it to the instrument whose address or port is specified in the creation function.
You can configure the instrument object behavior by assigning values to properties.
You can write text or binary data to the instrument and read text or binary data from the instrument.
You can use SCPI commands with the Instrument Control Toolbox™ and the MATLAB programming environment to control multiple instruments using similar functions.
Disconnect the object from the instrument, and remove the object from memory and from the workspace.