Instrument Control Toolbox | ![]() ![]() |
Communicating with a Serial Port Instrument
This example illustrates how to communicate with an instrument via the serial port. The instrument is a Tektronix TDS 210 two-channel digital oscilloscope connected to the COM1 port of a PC, and configured for a baud rate of 4800 and a carriage return (CR) terminator.
You should modify this example to suit your specific instrument control application needs. If you want detailed information about communicating with an instrument connected to the serial port, refer to Controlling Serial Port Instruments.
s
associated with the COM1 serial port.
s
to match the instrument's baud rate and terminator.
s
to the instrument. This step occurs after property values are configured because serial port instruments can transfer data immediately after the connection is established.
*IDN?
command to the instrument and then read back the result of the command. *IDN?
queries the instrument for identification information.
s
, you should disconnect it from the instrument, remove it from memory, and remove it from the MATLAB workspace.
![]() | Communicating with a GPIB-VXI Instrument | Understanding the Toolbox Capabilities | ![]() |